Design a scalable notification system
Company: Airbnb
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
## Problem
Design a **notification system** for a company at Airbnb-like scale that can send notifications to different user types (e.g., customers/guests, hosts, employees) through multiple delivery channels:
- **Email**
- **SMS**
- **Push notifications**
- **Social/Tweet-like channel** (optional integration)
The system must support two delivery modes:
1. **Single / Event-triggered notifications**: triggered by a real-time event (e.g., booking confirmed → email to guest; check-in day → SMS with lock code).
2. **Bulk / Batch notifications**: triggered by a scheduled or ad-hoc campaign to a target group (e.g., promotional content to potential hosts).
## Expectations
Describe an end-to-end design that covers:
- Core components and data flow for both event-triggered and batch sends
- How messages are authored (templates), personalized, and routed to channels
- User preferences (opt-in/out), frequency limits, and compliance (unsubscribe)
- Reliability: retries, deduplication, ordering (if needed), idempotency
- Scalability: high throughput, fan-out, backpressure, and rate limiting
- Observability: logging, metrics, tracing, and auditing
You may assume existing product services emit events (booking, check-in, campaign creation, etc.) and your system consumes them to deliver notifications.
Quick Answer: This question evaluates expertise in large-scale system design and distributed messaging, assessing competencies in event-driven and batch processing, multi-channel delivery, message templating and personalization, user preference and compliance handling, reliability concerns like retries and deduplication, scalability strategies, and observability. It is commonly asked to probe architectural reasoning about throughput, fault tolerance, backpressure, rate limiting, routing and trade-offs between real-time versus bulk delivery, and it falls under the System Design and distributed systems/messaging domain with emphasis on practical application of high-level architectural patterns rather than low-level implementation details.