01Chapter 1: Clarifying requirements and scopeEvery design starts with a question: what must this system do, and how well? A notification system looks simple. A service receives an event and sends a message. The hard parts only show up once you pin down volume, latency, channels, and failure behavior. This chapter covers how to turn a vague req6 min read
02Chapter 2: Choosing channels: push, SMS, email and in-appThis chapter assumes you know how HTTP APIs work, what a queue is, and how to read short Python snippets. You do not need to know any provider's API yet. By the end you should be able to compare the four main channels and decide which ones a given notification should use.5 min read
03Chapter 3: A high-level architectureThis chapter assumes you know how HTTP APIs work, what a message queue is, and how to read short Python snippets. It shows how the parts of a notification system fit together. Later chapters cover each part in detail.5 min read
04Chapter 4: Accepting notification eventsThis chapter covers the front door of the notification system: the API that producers call to say "something happened, tell the user". It assumes you know HTTP status codes and JSON, understand what a message queue does, and can read short Python snippets. Queues, workers and retries get their own c5 min read
05Chapter 5: Respecting user preferences and quiet hoursThis chapter assumes you have read the architecture and event ingestion chapters. It also assumes you can read short Python snippets and know what a key-value store or relational table does. Here you decide, for each event, which channels a user wants and whether now is a good time to interrupt them4 min read
06Chapter 6: Templates and localizationThis chapter assumes you know the pipeline from the earlier chapters: producers emit events, workers pick them up, and each channel worker hands a message to a provider. You should also be comfortable reading short Python snippets. Here we cover how a worker turns an event into the text a user sees,4 min read
07Chapter 7: Decoupling with queues and channel workersThis chapter assumes you know the earlier chapters' architecture sketch, how HTTP APIs hand off work, and what a message queue is (producers add messages, consumers take them). You should also be able to read short Python snippets.5 min read
08Chapter 8: Integrating with delivery providersThis chapter assumes you know the architecture from earlier chapters: events enter a queue, and channel workers take them off it. It also assumes you can read short Python snippets and know the basic HTTP status code classes. Here we look at the last hop, where a worker calls a third-party service t4 min read
09Chapter 9: Managing device tokensThis chapter assumes you have read the chapters on provider integration and retries. You should know that a worker calls a push provider such as APNs (Apple) or FCM (Firebase Cloud Messaging) and that some failures are transient. You should also be comfortable reading short Python snippets and think5 min read
10Chapter 10: Handling failures with retries and backoffThis chapter assumes you know the pipeline from earlier chapters: producers publish events, queues hold them, and channel workers call third-party providers such as an email API or a push gateway. It also assumes you can read short Python snippets. Here you will see what to do when a provider call f5 min read
11Chapter 11: Avoiding duplicate notificationsA user who gets the same "Your order shipped" push three times loses trust in the app. Duplicates are also costly for SMS, where each message is billed. This chapter explains why duplicates happen in a notification pipeline and how to prevent them with idempotency keys.6 min read
12Chapter 12: Rate limiting and throttlingThis chapter assumes you know the pipeline from the earlier chapters: producers publish events, workers consume them from queues, and workers call third-party providers. You should also be comfortable with token counters and reading short Python snippets.5 min read
13Chapter 13: Prioritizing urgent notificationsThis chapter assumes you know the queue-and-worker design from the previous chapters, including how a notification event carries a priority field. You should also be able to read short Python snippets. Here you will see how that field changes the way work flows through the system.5 min read
14Chapter 14: Scheduling and batchingThis chapter covers two ways to change when and how often a notification reaches a user. Scheduling delays a send until a chosen time. Batching combines several events into one send. It assumes you know the queue and worker model from the earlier chapters, can read short Python snippets, and have us5 min read
15Chapter 15: Tracking delivery status and feedbackA notification is not done when your worker hands it to a provider. The provider may accept the message and still fail to deliver it. The phone may be off, the email address may not exist, or the push token may have expired. This chapter covers how to record what happened to each notification and ho5 min read
16Chapter 16: Scaling and reliabilityThis chapter covers how a notification system keeps working as load grows and as parts of it fail. It assumes you know message queues, key-value stores, and the retry and idempotency ideas from earlier chapters. The code is short Python.6 min read
17Chapter 17: Monitoring and observabilityThis chapter assumes you have read the chapters on queues and workers, retries and backoff, and delivery tracking. You should be comfortable reading short Python snippets and know what a counter and a percentile are.5 min read
18Chapter 18: Privacy, consent and complianceA notification system sends messages to real people through their phones, inboxes and handsets. It also stores personal data: email addresses, phone numbers, device tokens and a history of what each person was sent. Mistakes here can cost money and trust. This chapter covers how consent, data handli6 min read