Overview
Design a notification service that dispatches millions of messages a day through several vendor gateways and respects each user's preferences and rate limits.
Requirements
- 01Send over push (APNs, FCM), SMS (Twilio), email (SendGrid), and in-app channels
- 02Send OTP and 2FA alerts ahead of low-priority promotional batches
- 03Honour per-user opt-outs, frequency caps, and quiet hours
- 04Never send the same transactional alert twice
- 05Retry with exponential backoff when a vendor gateway fails
Concepts in play
Push NotificationsAPNs/FCMKafkaIdempotencyCircuit Breaker