Design Webhooks and Metric Aggregation
Design a Multi-Tenant Webhook Delivery Platform
Design a multi-tenant webhook system for external customers. Internal product services emit business events such as order.created, order.updated, and trip.completed. Customers can register HTTPS endpoints and subscribe to selected event types.
System Requirements
The system should:
- Accept event publications from internal services.
- Fan out events to subscribed customer endpoints.
- Deliver webhooks with low latency.
- Support retries with exponential backoff on failures.
- Provide at-least-once delivery semantics.
- Include payload signing and secret rotation.
- Help consumers deduplicate repeated deliveries.
- Expose delivery status, logs, and metrics.
- Isolate tenants and protect the platform from slow or failing endpoints.
Discussion Points
Be prepared to discuss APIs, storage, queueing, retry strategy, security, observability, and scaling bottlenecks.
AI interview prep
Core dilemma
Balancing reliable, at-least-once, low-latency delivery to potentially unreliable external endpoints with high fan-out, multi-tenancy isolation, and robust error handling, all while maintaining system stability and comprehensive observability.
3 tradeoffs and 3 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Design Webhooks and Metric Aggregation
Design a Multi-Tenant Webhook Delivery Platform
Design a multi-tenant webhook system for external customers. Internal product services emit business events such as order.created, order.updated, and trip.completed. Customers can register HTTPS endpoints and subscribe to selected event types.
System Requirements
The system should:
- Accept event publications from internal services.
- Fan out events to subscribed customer endpoints.
- Deliver webhooks with low latency.
- Support retries with exponential backoff on failures.
- Provide at-least-once delivery semantics.
- Include payload signing and secret rotation.
- Help consumers deduplicate repeated deliveries.
- Expose delivery status, logs, and metrics.
- Isolate tenants and protect the platform from slow or failing endpoints.
Discussion Points
Be prepared to discuss APIs, storage, queueing, retry strategy, security, observability, and scaling bottlenecks.