The interview question

Detect abnormal service behavior from thousands of operational time series.

Turn unusual measurements into actionable incidents with seasonality, alert budgets, and operator feedback.

01. Start with the operational decision

Ask who receives an alert and what action they can take. Unusual behavior is not necessarily a failure: a successful launch can produce a traffic spike. A useful baseline combines static safety thresholds with deviations from time-of-week behavior.

Separate missing telemetry from a measured zero. If an agent stops reporting, replacing the missing sample with zero can create a false interpretation of healthy latency or lost traffic. Track ingestion delay and data completeness independently from anomaly scores.

02. Build a contextual scoring pipeline

Measurements
Contextual scores
Grouped incidents

Collect versioned measurements with entity and event time, aggregate into windows, estimate an expected range, and compute a deviation score. Group related signals into incidents before routing them. Keep the underlying measurements and explanation available to the operator.

For a hypothetical hourly series with an expected count of 1,000, a count of 600 may deserve investigation; for a naturally volatile series, the same proportional change may be ordinary. Estimate variability from comparable periods and validate assumptions rather than applying one universal percentage threshold.

03. Control false alerts at scale

Suppose 10,000 series are checked each minute. Even a false-positive rate of 0.1% per check would produce an expected ten false flags per minute under that simplified assumption. Independence is not required for this expectation, though correlations affect clustering and bursts.

Use persistence requirements, severity tiers, deduplication, and ownership-aware routing. Measure incident-level precision, missed known incidents, detection delay, and operator workload. A pointwise benchmark can reward repeated detections of the same incident while overwhelming the on-call team.

04. Learn from feedback without erasing incidents

Maintain annotated incident windows and backtest against historical outages and routine changes. If the detector updates its baseline too quickly during an outage, it can normalize the failure. Bound adaptation and mark known incidents explicitly.

Unsupervised methods help when labels are scarce, but a high outlier score is not a calibrated probability of an outage. Follow-up: after deployment, fewer operator acknowledgments may mean fewer incidents or alert fatigue. Review sampled nonalerts and incident reports instead of interpreting a single feedback count as ground truth.

Practice the follow-up

Self-review

Describe a real outage that a purely unusualness-based detector might miss.

Connect this to production drift monitoring.

Sources & further reading

scikit-learn: outlier and novelty detection; Google SRE: monitoring distributed systems. The interview scenario, calculations, and proposed design choices are illustrative.

Continue your preparation

Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.