[SERVER-78391] Improve performance for API version metrics Created: 23/Jun/23  Updated: 17/Nov/23

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Judah Schvimer Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-77087 Make the retention period of metrics.... Closed
is depended on by SERVER-77088 Introduce a metric that lists the num... Closed
is depended on by SERVER-77103 Cache the APIVersionMetrics::update Closed
Related
Assigned Teams:
Query Execution
Sprint: Repl 2023-08-07
Participants:

 Description   

API Version parsing and metrics take a non-trivial amount of time in command execution. We should investigate if we can improve that.

UPDATE: In offline discussions, we determined that the current structure of tracking API metrics is not worth the performance cost we incur for every write. Instead of what we do today (track recently used API version metrics per application name, which can explode in size if there are many connections), we should instead:

  • Track # of connections with a default appName for each API version
  • Track # of connections with a non-default appName for each API version
  • Ensure the appName and API version is available in currentOp and/or serverStatus so that customers can view it
  • Log the appName and API version upon connection establishment

This will reduce the amount of overhead for API metrics while still providing enough information for DBMs to manage API versioning for their own projects.


Generated at Thu Feb 08 06:38:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.