-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Backpressure
-
None
Context
Clean up and import the latency load testing package to enable validation of driver behavior under load, supporting DRIVERS-3320 (client backpressure testing): https://github.com/prestonvasquez/dev/tree/main/mongo-go-driver/v1/metrics/latency
The framework generates load by spawning workers until a target latency threshold is reached, then runs user-defined experiments while capturing metrics. This simulates real-world conditions where the driver is under pressure:
- Preloads a test collection with random documents
- Spawns workers that execute FindOne operations, measuring latency
- Dynamically adds workers until average latency exceeds target threshold
- Once under load, triggers user-defined experiment functions
- Collects and reports metrics at completion
Currently the following metrics are captures:
- Connection pool: closed count, close reasons/errors, ready durations, pending read success/failure
- Commands: started/succeeded/failed counts
- Operations: count, timeout errors, average/median duration
Definition of done
- Import the latency package and update for V2 compatibility.
- Create an evergreen task that runs the workload. If possible, Use send-perf-data for the metrics so that this data can be compared over time.
- Determine which metrics should be supported.
- Determine an architecture that can be extended for different workloads.
Pitfalls
The framework tests a narrow workload pattern (concurrent FindOne on non-existent keys). Results may not generalize to workloads with mixed operations, large documents, aggregations, or write-heavy patterns. This ticket should be for implementing an extendable baseline and not to create comprehensive coverage.
- has to be done before
-
GODRIVER-3709 Test all drivers under load with backpressure changes
-
- Backlog
-
- is related to
-
GODRIVER-3709 Test all drivers under load with backpressure changes
-
- Backlog
-