advanced

Notification system

Design preferences, channels, deduplication, scheduling, retries, provider failures, and observability.

Notification platforms route events to email, SMS, push, and in-app channels respecting user preferences, quiet hours, deduplication, and provider rate limits. Pipeline: event ingestion, preference lookup, template rendering, channel router, delivery workers, retry/DLQ, and delivery analytics.

Idempotency prevents duplicate charges of user attention on retried events. Batch digest mode aggregates low-priority items. Third-party provider failures need circuit breakers and fallback channels.

On interviews: trace order-shipped event to push notification, explain dedup key, and handle provider outage.

Common pitfalls: thundering herd on marketing blast; no per-user rate cap; template rendering blocking hot queue.

The trade-off is flexibility versus complexity—know when the simpler path is enough.

Checklist:

  • Model preferences and channel rules.
  • Dedup and idempotency per event/user.
  • Retry with DLQ for provider failures.
  • Observability on delivery and open rates.