Microservices: The Cascade
Hard · system design problem
A deploy drops an index: one database gets slow. Three layers of retries, timeouts below the new latency and a non-critical dependency on the critical path turn it into a full outage.
Inspired by the cascading failures described in many public postmortems, where one slow database becomes a site-wide outage through retries and thread exhaustion. Here: the API gateway calls order-svc (2 retries); order-svc calls menu-svc, pricing-svc and eta-svc, each with 3 retries and a 200 ms timeout; menu and pricing query PostgreSQL. At T+20s a deploy drops an index — PostgreSQL queries become 10× slower at 60% of its capacity — and the same deploy pins eta-svc’s CPU, for the rest of the hour. ETAs are nice to have; menus rarely change; prices are needed for every order.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.