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

Cosmos DB components should handle throttling #1611

Closed
ItalyPaleAle opened this issue Mar 24, 2022 · 4 comments · Fixed by #1614
Closed

Cosmos DB components should handle throttling #1611

ItalyPaleAle opened this issue Mar 24, 2022 · 4 comments · Fixed by #1614
Assignees
Labels
kind/bug Something isn't working P2 size/S 1 week of work triaged/resolved
Milestone

Comments

@ItalyPaleAle
Copy link
Contributor

Expected Behavior

While making requests to Cosmos DB, in case of 429 responses (throttling), the components should automatically retry the requests after a back-off.

Actual Behavior

While making requests with the Cosmos DB components (state store and binding), if the service throttles the requests, the components just fail with an error without re-trying.

Release Note

RELEASE NOTE: FIX Cosmos DB components now handle throttling from database

@ItalyPaleAle ItalyPaleAle added the kind/bug Something isn't working label Mar 24, 2022
@ItalyPaleAle
Copy link
Contributor Author

/assign

@berndverst
Copy link
Member

The 429 on init (due to metadata rate limit exceeded) are already being handled but operations are not.

The idea was it could be handled by resiliency. Of course we could add additional retry on 429 for operations directly in the component also.

Please do include the randomness factor provided by the cenkalti/backoff library -- see the retry on init for inspiration.

@ItalyPaleAle
Copy link
Contributor Author

As per discussion, I think that re-trying on a 429 should be a core part of components, something that should be table stakes, and we should not expose that complexity to end-users. Most other components (including Redis, those who use the official Azure SDKs, etc) already handle 429's automatically. This should be the case for Cosmos DB too.

Agree on mirroring what's being done for init.

@armandvanderwalt
Copy link

Was this change reverted? Looks like automatic retries are not working when using cosmos db as a state store

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working P2 size/S 1 week of work triaged/resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants