Skip to content
We areTOP 1%

Design a notification system

HardConceptWeb Services
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

Requirements: send push, SMS and email notifications triggered by other services or on a schedule, respect user preferences and opt-outs, and deliver reliably at high volume with soft real-time latency.

  • Components: a notification API that validates requests, a preference and device-token store, a template service, and a separate message queue per channel so that a slow provider does not block the others.
  • Workers: channel workers call third-party providers such as APNs, FCM, an SMS gateway or an email service, retrying with exponential backoff and moving repeated failures to a dead-letter queue.
  • Safeguards: per-user rate limits, deduplication keys, and delivery tracking for analytics.
  • Trade-off: queues give at-least-once delivery, so duplicates are possible; deduplication reduces them, but exactly-once delivery to a device cannot be guaranteed.

More in Web Services

Web Services questions
#ProblemPlatformDifficultyOpen1st1st Visit2nd2nd VisitRevRevise
1Design a URL shortener
MediumConcept
ConceptMedium Read the answer to Design a URL shortener
2Design a pastebin service
MediumConcept
ConceptMedium Read the answer to Design a pastebin service
3Design a rate limiter
MediumConcept
ConceptMedium Read the answer to Design a rate limiter
4Design a notification system
HardConcept
ConceptHard Read the answer to Design a notification system

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account