Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-Emptive Client Backoff #36

Closed
mfortini opened this issue Mar 15, 2021 · 2 comments
Closed

Pre-Emptive Client Backoff #36

mfortini opened this issue Mar 15, 2021 · 2 comments

Comments

@mfortini
Copy link

mfortini commented Mar 15, 2021

Client should backoff nearing saturation

We used the Limit and Remain values in one of our client applications that was migrated from a legacy SOAP service to our REST based API in order to ensure we never get a 429 response (this is because the legacy code could not gracefully retry requests without major refactoring).

When we get to 80% of quota (20% Remain) we start respecting the value in the Reset header. In section 7 you touched on a concept ‘A client SHOULD NOT exceed the "quota-units" expressed in "RateLimit-Remaining" before the "time-window" expressed in "RateLimit-Reset".’

Would it be an idea to document that clients should be coded to pre-emptively back-off when nearing “saturation”?

We don't want to mandate a strict behavior on client, but we can surely add this sentence as an example behavior.

Note

Would one want to have to option to provide a saturation hint in the Limit definition ?

The current spec allows Limit comments, so you can already do it. The spec allows to address this use-case transparently, by artificially lowering the values provided in the fields.

@ioggstream
Copy link
Collaborator

We should probably integrate and remove FAQ 8 since it's already in the spec.

@unleashed
Copy link
Collaborator

Would one want to have to option to provide a saturation hint in the Limit definition ?

This is something I quickly commented on #34 (comment) but the alternative of dynamically modifying the values as the rate saturates is fairly reasonable, so those informational parameters might as well be part of an extension document.

unleashed added a commit that referenced this issue Mar 16, 2021
Fix: #36. No specific throttling behavior.
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

No branches or pull requests

3 participants