Add latency-based load testing framework for validating driver behavior under stress

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Backpressure
    • None
    • None
    • Go Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • 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:

      1. Preloads a test collection with random documents
      2. Spawns workers that execute FindOne operations, measuring latency
      3. Dynamically adds workers until average latency exceeds target threshold
      4. Once under load, triggers user-defined experiment functions
      5. 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.

            Assignee:
            Unassigned
            Reporter:
            Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: