Preparing your design workspace

Loading the problem and your latest saved attempt…

Design Server Latency Detection and On-Call Paging

Design a small latency-monitoring pipeline that detects sustained degradation and manages a useful, recoverable on-call paging lifecycle.

Problem statement

Build a pipeline to monitor the latency of dozens of web servers. Each server reports its average response time every second. Design an algorithm to detect degraded performance and decide when to page an on-call engineer, including management of the human-in-the-loop paging system.

For this exercise, assume 60 servers in one region and one operations team. Choose and justify a conventional statistical or rule-based detector using the reported averages; do not assume unavailable request counts, tail percentiles or labels.

Make warm-up, baseline updates, sustained degradation and recovery criteria explicit. Distinguish missing observations from healthy latency.

Track one open degradation episode per server: send an initial page, record engineer acknowledgement, optionally escalate an unacknowledged episode, and resolve it after measured recovery. Acknowledgement stops escalation but does not itself prove recovery.

For this exercise, use versioned configuration and durable incident/page-intent state, accept retryable agent deliveries, and assume the paging provider accepts idempotency keys and supports delivery-status lookup.

Cross-region failover, automatic remediation and a general-purpose monitoring dashboard are outside scope.

What to build

  1. Receive per-server average response-time observations and distinguish healthy, warming, degraded and insufficient-data states using a justified detector.
  2. Open one degradation episode per server, decide when to page, record acknowledgement and escalation state, and close the episode only after the configured recovery evidence.
  3. Persist incident and delivery intent, reconcile uncertain provider outcomes, and recover from retries or worker crashes without duplicating a logical page.

At scale

  • The source describes dozens of servers reporting average response times once per second; for this exercise, use 60 servers.
  • For this exercise, after the configured sustained-degradation criterion is met, create a durable page intent within 10 seconds and submit it within another 10 seconds when the provider is healthy.
  • For this exercise, accept observations up to 5 seconds late, retain raw observations for 24 hours and incident history for 30 days, and never treat absent samples as zero latency.
  • For this exercise, use one multi-zone region, survive a worker crash, and bound provider retries and unacknowledged escalation; provider outages delay delivery but must not erase the open incident.