Design Webhook Delivery With Retries, Ordering Hints and Per-Endpoint Isolation
Last updated: November 29, 2026
Quick Overview
Design the system that delivers event notifications (such as `payment_intent.succeeded`) to millions of merchant webhook endpoints, with retries over days, signing, and protection against slow or failing endpoints affecting everyone else.
Stripe
November 29, 20260
0
0 solved
Design the system that delivers event notifications (such as `payment_intent.succeeded`) to millions of merchant webhook endpoints, with retries over days, signing, and protection against slow or failing endpoints affecting everyone else.
Webhooks are how most Stripe integrations learn that money moved, so delivery has to be at-least-once and durable even when merchant servers are down for hours. The interviewer checks durable fan-out from the event log, per-endpoint isolation so one bad endpoint cannot starve others, and an honest treatment of ordering and duplicates.
What the Interviewer Expects
- Separate event creation (durable, in the API transaction path) from delivery (asynchronous)
- Guarantee at-least-once delivery and give merchants an event id for de-duplication
- Isolate endpoints so a slow or failing one cannot consume shared worker capacity
- Define a retry schedule with exponential backoff and jitter over a multi-day window
- Explain why strict ordering is not promised and what merchants should do instead
- Cover observability for merchants: delivery attempts, response codes, manual resend
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How would you handle an endpoint that times out on every request for three days?
- How would you let merchants replay all events from a time range after an outage?
- How do you prevent the delivery fleet from being used to attack internal networks (SSRF)?
- What changes if you add thin events that carry only ids and require a fetch?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: emit events for state changes, deliver to each subscribed endpoint (filtered by event type), sign payloads with a per-endpoint secret, retry failures for up to three days, show attempt his...
High-Level Design
- Transactional outbox: the API service writes the event row in the same database transaction as the object change, so an event exists if and only if the change committed. A relay tails the outbo...