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

Better 429 support for stampede protection #367

Open
KorvinSzanto opened this issue Dec 20, 2024 · 0 comments
Open

Better 429 support for stampede protection #367

KorvinSzanto opened this issue Dec 20, 2024 · 0 comments

Comments

@KorvinSzanto
Copy link
Member

Some components, like the file selector component, make requests during the mounted event to load in state, when many of these components are used at once, like might be the case in a gallery block, you end up with a stampede that can cause rate limited servers to start sending 429 responses and cause the block edit to stop working once you get to an arbitrary file limit.

Rather than show an error and give up, we should make sure all components that make http requests support 429 responses using one of two strategies:

  • If the Retry-After header is provided in the response, retry after the value + 1 seconds
  • If the header is not provided, use an increasing backoff strategy with jitter

Doing this will allow all of the requests to complete eventually and will allow the block to be editable in the meantime.

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

1 participant