GuidesCore concepts
Retries
How Relay retries failed deliveries, and how to control it.
A delivery fails when the endpoint returns anything other than a 2xx status, takes longer than 15 seconds, or can't be reached. Relay then retries it with exponential backoff.
Retry schedule
| Attempt | Delay after the previous one |
|---|---|
| 1 | Immediately |
| 2 | 30 seconds |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
| 6 | 8 hours |
| 7–9 | 24 hours |
That's nine attempts over roughly three days. Each delay gets up to 10% random jitter so a recovering server isn't hit by every retry at the same time.
Respecting Retry-After
If your endpoint answers 429 or 503 with a Retry-After header, Relay waits that long before the next attempt, up to one hour.
HTTP/1.1 503 Service Unavailable
Retry-After: 120Which responses are retried
| Response | Retried |
|---|---|
2xx | No, delivered |
410 Gone | No, and the endpoint is disabled |
Other 4xx | Yes |
5xx, timeout, connection error | Yes |
Respond fast, process later
Return 200 as soon as you have stored the event, then do the work in a background job. Long handlers cause timeouts, and timeouts cause duplicate deliveries.