Course contentsShow
← System Design
Lesson 1696 of 1,91941. Real-World System: Notification SystemFree lesson

Notification System High-Level Architecture

Overview of components: API layer, processing pipeline, delivery services, and storage for a scalable notification system.

Notification System High-Level Architecture

You'll learn: How to structure a notification system into modular layers that handle everything from receiving requests to delivering messages at scale.

The Architectural Layers

A notification system is like an airport: requests arrive at the terminal (API), get processed through security and logistics (pipeline), board different carriers (delivery services), and records are kept in hangars (storage).

Here are the four essential components:

1. API Layer

The entry point where services submit notification requests. This layer:

  • Validates incoming requests
  • Authenticates and authorizes clients
  • Performs initial rate limiting
  • Returns acknowledgments quickly (asynchronous pattern)

2. Processing Pipeline

The orchestration engine that enriches and routes notifications:

  • Determines which channels to use (email, SMS, push, in-app)
  • Applies user preferences and opt-out rules
  • Enriches with templates and personalization
  • Queues messages for delivery workers
  • Handles deduplication and coalescing

3. Delivery Services

Channel-specific workers that handle the actual sending:

  • Separate services for each channel (EmailService, SMSService, PushService)
  • Integrates with third-party providers (SendGrid, Twilio, FCM/APNs)
  • Implements retry logic and fallback strategies
  • Tracks delivery status and receipts

4. Storage Layer

The persistence backbone that maintains:

  • Notification metadata and content
  • User preferences and subscriptions
  • Delivery logs and tracking data
  • Templates and configuration
  • Typically uses separate databases for hot (recent) and cold (archived) data

Data Flow

Requests flow unidirectionally: API → Pipeline → Delivery → Storage updates. This separation allows each layer to scale independently based on load patterns.

Key Takeaway: A scalable notification system separates concerns across four layers—API ingestion, processing pipeline, channel-specific delivery, and persistent storage—enabling independent scaling and clear ownership boundaries.