Interview Prep/Monitoring & Observability/Alerting and On-Call Design

A service normally handles 500 rps in daytime and 5 rps overnight. How do you detect a silent traffic loss?

AdvancedScenarioAlerting and On-Call Design
Answer

Situation read → A fixed floor (rps < 100) would page every night. Traffic drops are real incidents (broken DNS, routing, upstream auth) and produce no errors.

What I'd do → Compare current traffic with the same time last week and use a ratio:

- alert: TrafficDropVsLastWeek
  expr: |
    sum(rate(http_requests_total{job="api"}[10m]))
      / sum(rate(http_requests_total{job="api"}[10m] offset 1w)) < 0.4
    and sum(rate(http_requests_total{job="api"}[10m] offset 1w)) > 20
  for: 10m
  labels: {severity: page}
  1. The second condition avoids dividing tiny numbers overnight.
  2. Average several previous weeks to avoid learning from a past outage.
  3. Cross-check with the blackbox probe.

Why → Seasonality-aware comparisons detect "too quiet" without a static threshold.

Interview tip → Mention holidays and deploys as known false-positive sources, and add a silence process.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Alerting and On-Call Design