Preparing your design workspace

Loading the problem and your latest saved attempt…

Design Burst-Tolerant Notification Ingestion

Design a low-latency microservice that durably accepts notification intents, isolates sudden producer bursts, and hands accepted work to a downstream delivery pipeline.

Problem statement

For this exercise, assume authenticated product services submit transactional notification intents to a regional ingestion microservice. Each request carries a producer-scoped request ID, recipient reference, requested channel, template reference, schema version, and a bounded payload. The service validates the envelope, applies producer admission policy, durably accepts valid work, and hands accepted intents to an existing downstream delivery pipeline. An accepted response means the ingestion service owns the intent and will not silently lose it; it does not mean that email, push, or SMS delivery has occurred. A retry with the same producer, request ID, and content within 24 hours represents the same logical intent, while reuse of that identity with different content is a conflict. The service sustains 25,000 requests per second and absorbs 1,000,000 requests per second for five-minute bursts. Requests average 2 KiB and are at most 64 KiB. Target 99.99% ingestion availability, p99 accepted-or-rejected responses within 250 milliseconds, and p99 visibility to a healthy downstream pipeline within two seconds. One producer's burst or malformed traffic must not exhaust every tenant's reserved capacity. During overload, return an explicit throttled or unavailable outcome with retry guidance rather than claiming acceptance. Design the durable log, write-ahead or database authority, idempotency index, cache boundaries, partitioning, consistency, and recovery rather than assuming one named storage product is sufficient. Template authoring, user preferences, campaign scheduling, provider selection, and final channel delivery are outside scope.

What to build

  1. An authenticated producer can submit a notification intent and receive an accepted, invalid, throttled, unavailable, conflict, or recoverably uncertain outcome.
  2. The service validates the notification envelope and schema version and enforces producer-aware quotas so malformed or bursty traffic from one producer does not starve others.
  3. Every accepted intent is durably and observably handed to the downstream delivery pipeline without silently disappearing between acceptance and publication.
  4. An authorized producer or operator can resolve an ambiguous submission and inspect whether an accepted intent is awaiting downstream handoff or has been handed off.

At scalePractice assumption

  • Sustain 25,000 notification intents per second and absorb 1,000,000 intents per second for five-minute bursts.
  • Requests average 2 KiB, are at most 64 KiB, and use a producer-scoped idempotency identity retained for 24 hours.
  • Provide 99.99% ingestion availability and return an accepted-or-rejected response within 250 milliseconds at p99.
  • Make accepted intents visible to a healthy downstream pipeline within two seconds at p99 while preserving producer isolation and explicit backpressure.