HLDArena
HLD-230·Messaging & Queues
Medium · 1,000 pts

Priority Multi-Channel Notification Router (Push/SMS/Email)

Design a ByteByteGo-classic centralized notification platform that enforces user opt-out preferences, deduplicates retries, and isolates critical OTPs from marketing blasts.

Max p99
≤ 62 ms
Availability
≥ 99.5%
Budget
≤ $5,550

Functional Requirements

  • FR-1POST /v1/notify — Validates user preferences, deduplicates idempotency key, and enqueues channel job.
  • FR-2GET /v1/notifications/{user_id}/preferences — Serves cached channel opt-in & quiet-hours settings.
  • FR-3PATCH & DELETE /v1/notify/{user_id} — Updates, cancels, or deletes user_id records and immediately invalidates or updates cached state (read-after-write).
  • FR-4Must keep P0 transactional alerts flowing under 65ms p99 during 100k-RPS marketing campaign bursts.

Workload Profile

Steady Transactional Traffic26,000 Pref Read RPS / 8,000 Dispatch Write RPS
Promo Blast + OTP Peak74,000 Read RPS / 25,000 Write RPS
Active Working Set20 GB user preference & dedup keys
Traffic DistributionBurst enqueue storms across tenant/campaign queues

Consistency Model

Read-after-write on user unsubscribe/opt-out toggles so opted-out users immediately stop receiving messages.

Design Write-up
0 boxes · 0 edges
0 words
Hidden Cases #4–#7 run automatically on Submit
Case 1: Smoke & API ContractInput Workload
Read RPS
2,000 rps
Write RPS
400 rps
Key Distribution
Uniform (Low Skew)
Chaos Fault
None (Healthy Cluster)
Expected Pass CriteriaASSERTIONS
• Tail Latency: p99 ≤ 124 ms
• Availability: ≥ 99.5%
Valid end-to-end Client → Compute → Storage topology