Skip to content
RED SAGSkills
hardBackend Developer interview question

Design a notification service that sends email, SMS and push messages for many products, up to tens of millions of messages a day.

What the interviewer wants to hear

  • Single API that accepts requests and writes them to a durable queue
  • Per-channel workers with provider integrations and failover
  • User preferences, quiet hours, templates and deduplication
  • Retries with backoff, rate limits per provider, dead-letter handling
  • Priorities so urgent messages like OTPs are not stuck behind bulk campaigns
  • Delivery tracking and metrics

Model answer

Products call one API with a template id, recipient and data, plus an idempotency key. The API validates the request, stores it, and publishes it to a durable queue like Kafka or SQS, so producers are never blocked by slow providers. A routing step loads user preferences and opt-outs, applies quiet hours and deduplication, renders the template, and puts the message on a per-channel queue. I keep separate high and low priority queues so a marketing blast of five million emails cannot delay one-time passwords. Channel workers call providers such as an email service, SMS gateway, APNs and FCM, respecting each provider's rate limits, retrying with backoff, failing over to a backup provider, and sending permanent failures to a dead-letter queue. Provider callbacks update delivery status in a store built for heavy writes. Metrics on queue lag, send rate and failure rate per provider drive alerts.

Can you answer it under time pressure?

Take a timed hard round and get scored on every answer.

Start mock interview

More hard Backend Developer questions