Q28: How would you design a rate-limited notification service?

Difficulty:MediumTopic:Design Problems

Accept notification requests through an API, validate and persist them, then enqueue delivery jobs. Workers select providers, apply per-user and per-provider rate limits, retry transient failures with exponential backoff and jitter, and route permanent failures to a dead-letter queue. Store delivery state and deduplication keys. Add preference checks, quiet hours, priority handling, provider failover, and metrics for queue age, success rate, and delivery latency.

Key Takeaways
  • Persist requests before asynchronous delivery.
  • Use deduplication, bounded retries, and provider-specific throttling.