Skip to content

[Drivers] Note about Adaptive Rate Limiting#155

Open
rachel-mack wants to merge 3 commits into10gen:mainfrom
rachel-mack:DOCSP-58635-IVM-adaptive-rate-limiting
Open

[Drivers] Note about Adaptive Rate Limiting#155
rachel-mack wants to merge 3 commits into10gen:mainfrom
rachel-mack:DOCSP-58635-IVM-adaptive-rate-limiting

Conversation

@rachel-mack
Copy link
Copy Markdown
Collaborator

JIRA: https://jira.mongodb.org/browse/DOCSP-58635

Purpose: This note will be added to drivers that support the progressive back-off workflow.

@rachel-mack rachel-mack requested a review from Copilot March 24, 2026 17:34
@rachel-mack rachel-mack review requested due to automatic review settings March 24, 2026 17:36
@@ -0,0 +1,13 @@
.. note::

You may find errors with ``SystemOverloadedError`` or ``RetryableError`` in
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An important thing to note here is that even with newer drivers, users can/will still see these errors if the overload is sustained and strong enough. This will happen when a driver exhausts its retry count for a given request or, in the future pending design finalization, when the driver's retry budget/token bucket is emptied. They will see a lot fewer of these errors, and in the cases of transient or minor overload, they won't see them at all.

So while this guidance to upgrade is certainly still true and recommended, users of newer drivers should still be encouraged to make an informed decision on their end in response to overload (e.g. alerting their systems, inducing their own queueing/throttling, etc).

For the purposes of this PR, I think we can reword this slightly to still encourage upgrade without implying the errors are purely an old-driver problem, and separately we come up with further guidance on how all users can handle these errors that may end up here or in the Atlas docs. We're having discussions with product on this currently.

@@ -0,0 +1,14 @@
.. note::

If you find errors with ``SystemOverloadedError`` or ``RetryableError``
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This language reads a bit vague to me: users will start getting application failures due to these errors, they won't just log errors and continue running.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to clearly communicate to users that these errors WILL cause application failures when they occur without either code changes to explicitly ignore them or upgrading their driver to a backpressure-supported release.

@rachel-mack rachel-mack requested a review from NoahStapp March 30, 2026 20:28
Comment on lines +3 to +9
If errors with ``SystemOverloadedError`` or ``RetryableError``
labels are causing application failures, or appearing in your application
logs, you can consider changes to your retry settings. One option is to
enable adaptive rate limiting. Adaptive rate limiting helps
manage server load by dynamically adjusting request rates based on current
conditions, while also managing client-side retry requests to mitigate
errors. This feature is available on MongoDB 8.3 and supported by the
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cause and effect are a little backward here. Adaptive rate limiting is one of the few features that can cause SystemOverloadedErrors to be returned.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think the old phrasing of this text was closer to what we want here, with the modifications I suggested before.

@@ -0,0 +1,15 @@
.. note:: Adaptive Rate Limiting
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still want to include the guidance to upgrade drivers that was here before.

Comment on lines +3 to +9
If errors with ``SystemOverloadedError`` or ``RetryableError``
labels are causing application failures, or appearing in your application
logs, you can consider changes to your retry settings. One option is to
enable adaptive rate limiting. Adaptive rate limiting helps
manage server load by dynamically adjusting request rates based on current
conditions, while also managing client-side retry requests to mitigate
errors. This feature is available on MongoDB 8.3 and supported by the
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think the old phrasing of this text was closer to what we want here, with the modifications I suggested before.

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.

4 participants