Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Downstream-Service Alert Notification System

Design a message-queue-backed platform that routes durable alerts to subscribed services with isolated retries, replay, and backpressure.

Problem statement

For this exercise, assume authenticated producer services submit immutable alert events and registered downstream services subscribe to selected alert types.

The platform durably accepts each alert, expands it into independent destination deliveries, and notifies downstream services rather than sending email, SMS, push, or other notifications directly to end users. Delivery is at least once with a stable alert ID that consumers use for idempotent processing.

Transient failures retry with exponential backoff and jitter; poison deliveries move to a dead-letter queue after a bounded attempt count, and operators can inspect and replay them without minting a new alert identity. One slow or unavailable destination must not block other destinations.

Design producer and subscription contracts, routing, queues, delivery state, concrete retry mechanics, failure isolation, replay, scaling, and observability. Alert detection, metric evaluation, end-user channel delivery, and downstream business logic are outside scope.

What to build

  1. An authenticated producer can idempotently submit an immutable alert event and receive a durable accepted or rejected outcome without waiting for downstream delivery.
  2. An authorized service owner can create and version alert-type subscriptions for a downstream service and inspect the active routing configuration.
  3. The platform creates one logical delivery per matching destination, delivers it at least once, and lets each destination progress independently.
  4. Producers and operators can inspect delivery state, retry history, backlog, and dead-letter reasons and safely replay eligible work under the original alert identity.

At scale

  • For this exercise, assume 50,000 accepted alerts per second at peak and up to 20 matching downstream subscriptions per alert.
  • For this exercise, target 200 milliseconds p95 for durable healthy admission and delivery of 99.9 percent of healthy-destination work within five seconds.
  • For this exercise, retain alert, delivery, attempt, and dead-letter history for seven days so operators can diagnose and replay failures.
  • For this exercise, tolerate a queue-worker zone failure and a downstream outage without losing accepted alerts, blocking unrelated destinations, or allowing retry traffic to collapse healthy delivery.