Skip to content

Better 429 support for stampede protection #367

@KorvinSzanto

Description

@KorvinSzanto

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions