KatInterview

Building Observability for Sub-5-Minute Error Budgets

System DesignModel answer
MediumModel answerSystem DesignobservabilityreliabilitySLI-SLO

Last updated

Design a monitoring and reliability system that protects a 99.99% availability target for a high-traffic SaaS platform handling 100k requests/second.

Context

You're working on a large-scale SaaS application serving enterprise customers—think project management, document collaboration, or similar workloads. A handful of critical services (issue management, authorization, live updates) must deliver 99.99% availability measured over rolling 30-day periods. This leaves roughly 4.3 minutes per month for any downtime or severely degraded responses.

Your task is to architect the observability and reliability infrastructure needed to consistently hit this target in production.

What You Need to Design

Build a monitoring system and reliability layer that:

  1. Defines measurable service health. Pick concrete metrics (SLIs) and thresholds (SLOs) tied to user experience. Base these on industry-standard observability dimensions: request success rate, response time, throughput, and resource usage.

  2. Alerts before catastrophe. Configure alerts that fire early enough for intervention, balancing speed of detection against noise. Calculate how quickly different failure modes consume your monthly budget and set alert thresholds accordingly.

  3. Isolates failure impact. Ensure that a problem in one dependency (external API, database, cache layer) doesn't cascade and violate the top-level availability promise. Design fault boundaries and fallback strategies.

  4. Automates common recovery. For predictable failure patterns—overload, partial outages, bad deployments—trigger automatic remediation without waiting for humans.

  5. Validates resilience continuously. Establish a testing regime (chaos experiments, canary rollouts, synthetic probes) that proves your recovery mechanisms actually work under realistic conditions.

Scale and Constraints

  • Traffic volume: 100,000 requests per second spread across three geographic regions.
  • Telemetry lag: Metrics must flow from application to queryable alert rules in under 15 seconds.
  • Monitoring independence: The observability stack should not share critical infrastructure (clusters, accounts, network paths) with the services being monitored.

Areas to Address

  • Metric collection pipeline: agents, transport, aggregation, storage, and query evaluation architecture.
  • SLI and SLO definitions with concrete numbers; error budget calculations and multi-window burn-rate alert logic.
  • Architectural patterns for containing failures: circuit breakers, request hedging, capacity isolation, traffic shaping.
  • Rollback automation and chaos validation frameworks.

Provide a structured design covering these components, including trade-offs and failure modes.

Hints

Hint 1

Start with the math: how many failed requests or minutes of downtime does 99.99% allow per month? How fast does a complete outage burn through that budget?

Hint 2

Design alerts using multiple time windows—one for statistical confidence, one for fast reset after recovery—to avoid both missed incidents and alert storms.

Hint 3

Treat response latency as part of availability: a request that times out or takes 10 seconds is effectively a failure from the user's perspective.