Course map

Project 10

Notification platform

Queues, async delivery

Start after Part 7

Key topics 106, 117, 121

Architecture Services

Brief

A shared platform other services call to notify users by email, SMS, and push: templates, user preferences and quiet hours, batching and digests, delivery tracking.

Targets

10M notifications/day with 100× burst spikes · transactional messages (OTP) delivered p99 < 5 s while marketing may lag minutes · no duplicate sends · per-channel provider failover.

Must cover

  • Scheduled sends — digests and quiet-hours deferral (→ 121).
  • Retries and dead-letter queue per channel (→ 117).
  • User preferences and consent — checked before every send, with an auditable opt-out (P; → 170).
  • Priority — OTP never queues behind marketing (P).
  • Delivery receipts — provider callbacks updating tracking state (P).

Design challenges

  1. Queue topology (→ 106, 108): separate queues or topics per priority and channel; consumer-lag alerting per queue.
  2. At-least-once pipeline with idempotent senders (→ 115–116): deduplication key per (user, notification); no double OTP SMS.
  3. Preference and quiet-hours evaluation at send time vs. enqueue time — the staleness trade-off stated (→ 129).
  4. Provider adapters with rate limits, circuit breakers, and failover (→ 96; → 151 — ahead, Part 9).
  5. Poison-message handling with a replay procedure (→ 117).
  6. Delivery-status ingestion (webhooks, bounces) (→ 40).

Out of scope

In-app inbox (pairs with Project 12's infrastructure); campaign targeting and segmentation.

Search the guide