# What is a metastable failure?

> A metastable failure is a state where a system stays broken after the trigger that caused it is gone, because a feedback loop inside the system keeps the overload alive. Removing the original cause does not help. The system only recovers when load is cut or the loop is broken.

- Author: Zeeshan Adil (https://www.internalswithzee.com/about)
- Published: 2026-11-12
- Source: https://www.internalswithzee.com/concepts/metastable-failure

## Why it happens

The term comes from Bronson et al. Their point is that an outage is usually explained by its trigger: a spike, a deploy, a cache expiry. A metastable failure is different, because the trigger ends and the outage does not. The system has two stable states, a healthy one and a bad one, and a push moved it from one to the other. A feedback loop then holds it in the bad state.

The loop is often work that is wasted. Work is done, thrown away, and the next request has to do it again, so load grows instead of shrinking.

## How to recognize it

- The incident started with a small, short trigger that is long over.
- The system is busy but useful output is near zero (high CPU, low goodput).
- Retries and timeouts make it worse, not better.
- It only happens above a certain load. Below it, the same trigger is harmless.

## What fixes it (and what does not)

Waiting does not fix it, and a bigger machine may only move the threshold. What works is breaking the loop:

- Shed load early, so what is accepted can finish.
- Cap retries and refresh work with a budget, so recovery work cannot swamp the system.
- Serve an older answer instead of recomputing, so demand on the slow part drops.
- Share one in-flight computation per key instead of starting many.

The cheapest defense is to design so the loop cannot start, because once it is running the only recovery is to cut load by hand.

## Measured

In my [cache stampede challenge](/challenges/distributed-systems/a-popular-post-takes-down-the-database) (a simulation, not a real database), one popular post is read 20,000 times a second by 20 API processes, and an 8-core PostgreSQL can safely run 500 of these queries a second. When the cached entry expires, the 500 connections fill, each 12 ms query slows to about 750 ms, and the 500 ms read deadline cancels every query before it finishes. Nothing refills the cache, so every request misses again.

The expiry lasted a moment. The outage did not end: from 10 to 60 seconds, 0.0% of reads were served and no query finished in time. The loop was the deadline. With a 1,000 ms deadline the same run recovered in about 2 seconds, and at 5,000 reads a second a 500 ms deadline recovered too. At 10,000 reads a second it never did.

## Related

- Challenge to run: https://www.internalswithzee.com/challenges/distributed-systems/a-popular-post-takes-down-the-database
- Article: https://www.internalswithzee.com/blog/circuit-breakers
- Related concept: https://www.internalswithzee.com/concepts/cache-stampede
- Related concept: https://www.internalswithzee.com/concepts/request-coalescing
- Related concept: https://www.internalswithzee.com/concepts/stale-while-revalidate

## Sources

- [Bronson et al., Metastable Failures in Distributed Systems (HotOS 2021)](https://sigops.org/s/conferences/hotos/2021/papers/hotos21-s11-bronson.pdf)

