The Real Fullstack

Design a Notification System

A campaign must reach 5 million users. What stops it from sending duplicates, ignoring opt-outs or getting your sender banned?

Ingeniero sénior12 minConstructor de arquitectura
kafkaredispostgresqlpushemail

Este reto aún no está traducido al Español. Estás leyendo la versión en inglés.

Misión:Assemble a notification pipeline: asynchronous fan-out per channel, user preferences, deduplication, dead-lettering and provider rate limits — within a budget of 17.Contexto · Objetivos de aprendizaje ▾

Brightcart's services emit business events (order shipped, price drop). Today the notification API calls the e-mail provider synchronously; during campaigns it times out, retries, and some customers receive the same e-mail three times. Push notifications are next.

Misión: Assemble a notification pipeline: asynchronous fan-out per channel, user preferences, deduplication, dead-lettering and provider rate limits — within a budget of 17.

Objetivos de aprendizaje

  • Decouple producers from slow providers with a queue.
  • Fan out to channel-specific workers.
  • Combine at-least-once delivery with deduplication, DLQs and rate limits.
SimulaciónSimulado
Business events → Notification APINotification API → PreferencesNotification API → notifications topicNotification API → E-mail providernotifications topic → E-mail workersnotifications topic → Push workersE-mail workers → E-mail providerPush workers → Push providerE-mail workers → Dedupe storePush workers → Dedupe storeE-mail workers → DLQPush workers → DLQE-mail workers → Rate limiterBusiness eventsNotification APIPreferencesnotifications topicE-mail workersPush workersE-mail providerPush providerDedupe storeDLQRate limiter

Selecciona componentes y conexiones. Teclado: usa las listas bajo el diagrama.

Ejecutar simulación

Ejecuta la simulación para ver la salida.

Simplificación

Structural checks only. Real systems also need templating, scheduling, quiet hours and bounce handling. Modelo educativo: los números ilustran un comportamiento, no son benchmarks.

Conceptos

Útil antes de este

Retos relacionados

Referencias