Design a Programmable SMS / Messaging Delivery System
Problem
Design Twilio's programmable messaging backend that sends and tracks billions of SMS/messages via carriers.
Requirements
Functional:
- Send messages via multiple carrier routes
- Track delivery receipts (DLRs)
- Retry/fallback on carrier failure
- Webhooks to customers on status change
Non-functional:
- Billions of messages/day
- Multi-region failover
- Exactly-once-ish delivery semantics
Discussion points
- Carrier routing and least-cost routing
- Async pipeline (queue + workers)
- Idempotency and dedup
- Outbox pattern for reliable webhooks
- Multi-region failover and back-pressure
added …