When discovery itself fails
Step 1 · The pattern
Look up, then call
Before each call, checkout asks the registry where pricing is, then calls one of its instances. The lookup takes a moment and always works. Nobody thinks of the registry as part of checkout. (All numbers are illustrative.)
- a call
- after the lookup
- answered
In short
When discovery itself fails: how it works and how it breaks
Service discovery serves no user request, so it is easy to forget that every call between services waits on it. If callers look up a service before each call, or their cached answers expire after a few seconds, a registry outage stops every service at once, while each service is healthy. The registry often sits in shared infrastructure: the cluster's control plane, a DNS server, a Consul cluster. An unrelated change that overloads it, such as a new monitoring job, can take everything down. The fix is to fail static. Callers keep the last list that worked and keep using it when the registry does not answer, refreshing in the background, and they drop an instance only on direct evidence, a refused connection, not because the registry went quiet. Watch the registry's own load, and keep heavy jobs off it.
What this simulation simplifies
- Checkout looks up pricing before every call in the trap; many real clients cache for a few seconds, which delays the same failure rather than avoiding it.
- The registry here simply stops answering; real overloaded registries answer slowly first, which adds latency to every call before the failures start.
How this comes up in interviews
"Your service discovery system goes down. What happens to your services, and how would you design for it?"
Then they ask
- What does 'fail static' mean for a caller?
- How would a new process start while discovery is down?
- What kinds of load could take a registry down?
A strong answer covers
- If callers look up before every call, discovery is a hard dependency of every service.
- A registry outage then stops everything, though each service is healthy.
- Fail static: keep the last good list, refresh in the background, drop instances only on direct evidence.
- Persist the list so processes can start during an outage.
- Protect the registry: rate-limit clients, test heavy jobs at full scale, roll them out slowly.
Points to cover, not a script. Say them in your own words and tie them to a system you have worked on.
On one page: the track cheat sheet.
Sources: AWS Builders' Library: Static stability using Availability Zones ↗ · Envoy docs: Service discovery (endpoint lists kept when updates fail) ↗ · Kubernetes docs: DNS for Services and Pods ↗ · Report a problem
Diagrams are our own simulations: the timings, rates and counts in them are illustrative, not measurements. Captions are original wording.