Notification System
Requirements: send push (APNs/FCM), SMS, email; triggered by services or scheduled; user preferences & opt-outs; rate limits; at-least-once delivery with dedupe.
services -> notification API -> validate, prefs, templates -> Kafka topics per channel
| | |
push wkrs sms wkrs email wkrs
| | |
APNs/FCM Twilio SES/SendGrid
retries + DLQ <-----------+--------+--------+
delivery status / tracking -> DB / analytics
Deep dives: per-channel queues isolate failures; idempotency key per notification to avoid duplicates on retry; respect quiet hours/time zones and frequency caps; template service; priority queues (OTP codes before marketing); track opens/clicks.