Design a notification service (email/SMS/push)

    A notification service delivers messages across channels (email/SMS/push) reliably and asynchronously. The design is a fan-out pipeline: one API, per-channel queues, worker pools calling vendors, with rate-limiting, preferences, and retries.

    Real-Time & Messaging, 15 components, about 35 min

    The full guide covers requirements, estimates, the API, the data model, deep dives, trade-offs, failure modes and the follow-up questions interviewers ask.

    Read the full guide on Substack

    Key points

    • Single API entry; payload includes user_id, template_id, params.
    • Notification Service writes to per-channel queue (email, SMS, push).
    • Workers render templates, call vendor APIs (SendGrid / Twilio / FCM).
    • Per-user rate limit (Redis) avoids spam — e.g., max 5 emails/hour.
    • Outbox pattern + retry with exponential backoff; DLQ after N failures.

    Sign in to track this guide in your curriculum progress.