Design a Rolling Top Error-Services Monitor
Ingest high-volume service logs and return the top error-producing services in the trailing five minutes.
Problem statement
For this exercise, assume that an operator opens a live view of the services contributing the most errors and drills into the evidence behind a spike. Accept normalized service error events from many regions with stable event identity.
Return top-k services by error count for the trailing five minutes with a result watermark. Link a ranked service to bounded aggregate dimensions and representative trace or log references. Continue ingesting through a regional or processor failure and reconcile replayed data.
Assume two million log events per second across 50,000 services, with five percent classified as errors. Refresh top-k within ten seconds and answer dashboard reads within 300 milliseconds at p95. Retain raw searchable error references for seven days and aggregated five-minute buckets for ninety days.
Preserve this invariant: regional replay cannot inflate a service count, and the response states the completeness watermark of every included region. Keep unrelated product features and company-specific infrastructure outside the first version.
What to build
- Accept normalized service error events from many regions with stable event identity.
- Return top-k services by error count for the trailing five minutes with a result watermark.
- Link a ranked service to bounded aggregate dimensions and representative trace or log references.
- Continue ingesting through a regional or processor failure and reconcile replayed data.
At scale
- For this exercise, assume two million log events per second across 50,000 services, with five percent classified as errors.
- For this exercise, refresh top-k within ten seconds and answer dashboard reads within 300 milliseconds at p95.
- For this exercise, retain raw searchable error references for seven days and aggregated five-minute buckets for ninety days.