Category: Forms and APIs

HTTP 429 Too Many Requests: How to Retry Safely

Read this guide in Polish

Integration receives 429 and begins to perform more and more repetitions instead of regaining action. The server limits traffic and aggressive retras of all customers increases overload.

How to determine the source of the error

Check the Retry-After header, schedule limitations and number of parallel requests.

Rate which operations can be cached and which require queues and idempotence.

What to do step by step

1. Enter exponential backoff with random jitter and a limited number of repeats. In metrics, also check the percentage of rejected requests, not just the average response time for retras.

2 . For expensive operations, reduce the frequency of queries and collect data group when the API allows it.

How to check the score

After the request limit has ceased, the requests return to normal without a duplicate avalanche.

What to do

Do not repeat POST creating a record without iddempotency key or duplicate detection mechanism.