Skip to content

Lesson 11 of 13 · 16m

Slow Is More Dangerous Than Down

A dependency answering in 30 seconds instead of 30 milliseconds does more damage than one that refuses connections — and your retry policy can keep the outage alive after the cause heals.

Down is the failure you budgeted for. Health checks fail, the load balancer ejects the node, retries find a healthy one. The failures that burn companies are partial: a dependency that answers every request — thirty seconds late; a node that passes the health check and 500s every write; one rack where the kernel's TCP retransmits make everything "eventually fine."

Huang et al. named this in "Gray Failure" (HotOS 2017): the system is healthy from its own observation point and broken from the user's. The health check returns 200 because it hits /healthz, a handler that opens no connection and checks no write path. Traffic keeps flowing to a node that cannot serve it. This is why black-box probing — an external check that exercises the real path, e.g., Envoy's outlier detection on consecutive_5xx — matters more than a heartbeat.

The cascade is arithmetic, not drama

Little's Law does the damage: L = λW. At constant request rate λ, doubling latency W doubles in-flight work L. A dependency whose p99 degrades from 50 ms to 5 s inflates the callers' in-flight requests by a factor of 100. The caller's worker pool or connection pool saturates; every unrelated request queues behind the stalled calls; the whole service starts timing out — even though 99% of its requests needed nothing from the degraded dependency. Thread-pool exhaustion is how one slow dependency buys itself a full outage.

Then the retry policy finishes the job. Callers time out and retry; the dependency now receives the original load plus retries; queued work grows; latency worsens; more timeouts; more retries. The metastable-failures paper (Bronson et al., HotOS 2021) describes the exact shape: a trigger plus a sustaining feedback loop. When the dependency recovers, the queued retries keep the system saturated anyway. The outage persists after the cause has healed, which is the part nobody believes until they have watched it.

The toolbox is about boundaries

Timeouts first — real numbers on every call, as the earlier lesson covered; "no timeout" is a pool-exhaustion plan. Then:

  • Circuit breakers at the caller: stop spending on a dependency that is not paying out. Resilience4j's CallNotPermittedException, Polly's BrokenCircuitException, Envoy outlier detection — all implement the same CLOSED → OPEN → HALF_OPEN state machine.
  • Bulkheads: isolate pools per dependency so a stalled one cannot starve the rest. Hystrix did this with dedicated thread pools — it is in maintenance mode since 2018, but the pattern survived it; Netflix moved to adaptive concurrency limits, same instinct, cheaper mechanism.
  • Load shedding: reject early and cheap. A server that 503s in 2 ms protects itself better than one that times out in 30 s after doing the work. Bounded queues that reject fast; maxConcurrentStreams on HTTP/2.
  • Backpressure: propagate the "slow down" signal instead of buffering until OOM.

February 28, 2017: an AWS operator debugging S3's billing system removed more capacity than intended from two index and placement subsystems. Those subsystems needed a full restart to recover — a restart that took hours because it had not been done in years — and S3 in us-east-1 degraded for about four hours, taking a visible fraction of the internet down with it. A routine fix metastasized into a restart-duration outage. Metastable is the right word.

What to actually do

Bound every queue and every pool; unbounded queues do not relieve pressure, they defer it to the heap. Circuit-break callers, bulkhead dependencies, shed load before pools drain. Measure queue depth and in-flight counts, not just error rates — depth is the cascade in motion. And drill the slow-dependency case in staging: tc qdisc add dev eth0 root netem delay 5000ms teaches more in an afternoon than a year of reading postmortems.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.