Lesson 11 of 15
33. Design a Notification System

33.10 What would you say in the last five minutes?

3 min read+10 XP

Step 6: Wrap-up (5 minutes)

  • Bottlenecks: provider rate limits, not our servers. Covered by per-provider limits, separate quotas for OTP and bulk, and multiple providers.
  • Single points of failure: a single SMS provider (failover pair), the preferences store (cache with fallback to defaults for transactional messages), the queue (replicated).
  • Correctness: idempotency keys at the API, sent-records before every provider call, dead-letter queues with alerts.
  • Abuse and cost: OTP request limits, SMS pumping detection, and preferring push over SMS where allowed.
  • Next with more time: in-app notification inbox, A/B testing of templates, digests ("3 updates today") instead of 3 separate messages, and analytics on delivery and opens.

Memory code: "The provider is the bottleneck; the OTP is the priority; the duplicate is the bug."