Skip to content

DRIVERS-3427: Finalize client backpressure implementation for phase 1 rollout#1919

Merged
dariakp merged 14 commits intomongodb:masterfrom
NoahStapp:DRIVERS-3427
Apr 10, 2026
Merged

DRIVERS-3427: Finalize client backpressure implementation for phase 1 rollout#1919
dariakp merged 14 commits intomongodb:masterfrom
NoahStapp:DRIVERS-3427

Conversation

@NoahStapp
Copy link
Copy Markdown
Contributor

@NoahStapp NoahStapp commented Mar 30, 2026

This PR updates the client backpressure specification and related specifications to align with the finalized backpressure retry policy.

A summary of these changes with brief reasonings:

  • Token buckets are removed entirely. Jitter + exponential backoff is now the sole backpressure retry strategy. Token buckets may be added in the future pending additional analysis and telemetry.
  • MAX_RETRIES now defaults to 2 rather than 5. Without token buckets, retry storms occur much more easily. Lowering the default number of maximum retries reduces this risk while still alleviating server overload.
  • Server deprioritization (renamed to overload retargeting) is disabled by default. Edge cases with primaryPreferred and secondaryPreferred cause semantic differences that we want users to explicitly opt-in to.
  • Two new client options have been added: maxAdaptiveRetries, which configures MAX_RETRIES, and enableOverloadRetargeting, which enables overload retargeting for non-sharded servers. Both are configurable as both client and URI options.
  • All tests have been updated to reflect the above, and new tests have been added.

Please complete the following before merging:

  • Is the relevant DRIVERS ticket in the PR title?
  • Update changelog.
  • Test changes in at least one language driver. Python.
  • Test these changes against all server versions and topologies (including standalone, replica set, and sharded
    clusters).

@NoahStapp NoahStapp changed the title Drivers 3427 - Finalize client backpressure implementation for phase 1 rollout DRIVERS 3427 - Finalize client backpressure implementation for phase 1 rollout Mar 30, 2026
@NoahStapp NoahStapp changed the title DRIVERS 3427 - Finalize client backpressure implementation for phase 1 rollout DRIVERS-3427 - Finalize client backpressure implementation for phase 1 rollout Mar 30, 2026
@NoahStapp NoahStapp marked this pull request as ready for review March 30, 2026 20:44
@NoahStapp NoahStapp requested review from a team as code owners March 30, 2026 20:44
@NoahStapp NoahStapp requested review from JamesKovacs, alcaeus, dariakp, stIncMale and tadjik1 and removed request for a team and JamesKovacs March 30, 2026 20:44
@NoahStapp NoahStapp requested a review from a team as a code owner March 31, 2026 14:58
@NoahStapp NoahStapp requested review from isabelatkinson and removed request for a team March 31, 2026 14:58
Comment thread source/retryable-reads/tests/README.md Outdated
Comment thread source/client-backpressure/tests/README.md
Comment thread source/client-backpressure/tests/README.md
NoahStapp and others added 2 commits March 31, 2026 15:48
Co-authored-by: Isabel Atkinson <isabelatkinson@gmail.com>
Comment thread source/client-backpressure/tests/README.md Outdated
Comment thread source/client-backpressure/tests/README.md
Co-authored-by: Isabel Atkinson <isabelatkinson@gmail.com>
@NoahStapp NoahStapp removed request for a team, alcaeus, stIncMale and tadjik1 April 1, 2026 16:51
Comment thread source/client-backpressure/client-backpressure.md
Comment thread source/client-backpressure/client-backpressure.md Outdated
@isabelatkinson
Copy link
Copy Markdown
Contributor

Rust second implementation: mongodb/mongo-rust-driver#1654

@NoahStapp NoahStapp requested a review from isabelatkinson April 2, 2026 15:25
@NoahStapp NoahStapp requested a review from stIncMale April 2, 2026 16:13
@dariakp dariakp requested review from connorsmacd and jyemin April 2, 2026 21:13
Comment thread source/client-backpressure/client-backpressure.md Outdated
@NoahStapp NoahStapp requested a review from stIncMale April 10, 2026 15:27
Comment thread source/client-backpressure/client-backpressure.md
@dariakp dariakp dismissed stIncMale’s stale review April 10, 2026 18:28

Feedback has been incorporated within the constraints of the design decision.

@dariakp dariakp merged commit 1b15cd2 into mongodb:master Apr 10, 2026
6 checks passed
@dariakp dariakp changed the title DRIVERS-3427 - Finalize client backpressure implementation for phase 1 rollout DRIVERS-3427: Finalize client backpressure implementation for phase 1 rollout Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants