[ INFO ]category: System Design difficulty: medium freq: Optional first seen: 2026-04-20
[MEDIUM][SYSTEM DESIGN][OPTIONAL]
$catproblem.md
Here is the full interview question "Design a Webhook Delivery System - Stripe System Design Interview | ShowOffer" from Stripe on ShowOffer.io:
Problem Statement
Stripe uses webhooks to notify you in real-time about events that happen in your account. For example, when a charge succeeds or fails, or when a new customer is created. You can set up webhooks to listen for specific events and then handle those events in your application.
Design a system that delivers webhooks to your customers. The system should be able to handle the following requirements:
High Availability: The system should be highly available and should not lose any events.
Reliability: The system should ensure that each event is delivered at least once.
Scalability: The system should be able to handle a large number of events and customers.
Idempotency: The system should not deliver duplicate events.
Rate Limiting: The system should handle rate limiting to avoid overwhelming the customer's server.
Retries: The system should handle retries in case of failures.
Monitoring: The system should provide monitoring and alerting for failures and other issues.
Examples
Event Creation: When a charge is created, an event is created in the system.
Webhook Delivery: The system delivers the event to the customer's webhook endpoint.
Retry: If the delivery fails, the system retries the delivery after some time.
Constraints
Event Volume: The system handles millions of events per day.
Customer Volume: The system has thousands of customers.
Event Size: Each event is around 1KB in size.
Delivery Latency: The system should deliver events within a few seconds.
Hints
Message Queue: Use a message queue to buffer events and handle retries.
Database: Use a database to store events and their delivery status.
Caching: Use caching to store recently delivered events and avoid duplicates.
Load Balancing: Use load balancing to distribute events across multiple servers.