Delivery and retries
Drum delivers each event at least once. Each delivery is recorded, and you can read it through the subscription endpoints.
Rules
| Rule | Detail |
|---|---|
| Endpoint | Must be https, with a valid certificate, on a public address. Private, loopback and cloud metadata addresses are blocked when Drum sends, and a blocked URL disables the subscription |
| Who receives an event | Every subscription in the account that is active and lists the event. Paused and disabled subscriptions get nothing, and the events they miss are not sent later |
| Timeout | 10 seconds to connect, 30 seconds for the whole request |
| Success | Any 2xx response |
| Retries | A timeout, a connection error, or a 5xx, 408 or 429 response is sent again, with increasing delays, up to 5 attempts in all. Every attempt carries the same X-Webhook-Delivery-Id. Between attempts the delivery is pending and shows the last error |
| Failure | Any other 4xx response, a TLS error, or the last of the 5 attempts. The delivery is recorded as failed and is not sent again automatically. Send it again with the retry endpoint |
| Auto-disable | After 10 failed deliveries in a row, Drum disables the subscription and emails the person who created it. A delivery counts once, however many attempts it took. A successful delivery resets the count |
| Duplicates | Drum skips sending the same state of a record for the same event to a subscription twice within 30 seconds. A delivery sent again with the retry endpoint gets a new X-Webhook-Delivery-Id |
| Redirects | Not followed. A 3xx response is a failure |
| Order | Not guaranteed. Deliveries are sent independently |
Retry timing
The delays between automatic attempts grow with each attempt, with some random jitter:
| Attempt | About this long after the one before |
|---|---|
| 2 | 3 seconds |
| 3 | 20 seconds |
| 4 | 1.5 minutes |
| 5 | 4.5 minutes |
The last attempt comes roughly 6 minutes after the first. An endpoint that is down for longer than that loses the delivery until you retry it.
Delivery states
status |
Meaning |
|---|---|
pending |
Not sent yet, or waiting for its next attempt. error_message shows the last attempt’s error |
success |
Your endpoint answered 2xx. delivered_at is set |
failed |
Drum gave up. error_message, response_status and response_body show why |
Deduplicating
An automatic retry keeps the delivery id, but a retry through the endpoint makes a new one, and the 30-second duplicate check does not cover everything. Deduplicate on event, data.type, data.id and data.attributes.updated_at rather than on the delivery id alone.
What Drum stores
For each delivery, Drum stores the body it sent, your endpoint’s status code, up to 10,000 characters of the response body, and the response headers. Values that look like tokens, passwords or secrets in your response are replaced with [REDACTED], as are Authorization, Cookie and API key headers.
| Delivery | Kept for |
|---|---|
success |
30 days |
failed |
90 days |
Deleting a subscription stops its deliveries. Drum keeps the delivery history until it expires, but it can no longer be read through the API.