Q11 · How do you handle partial failures in distributed systems?

Back to 24 Architecture Questions.

The question is not “add retries”. The axis it turns on: what the system does with an answer it cannot get, and whether half an answer is usable. A fan-out that queries five services will sometimes get four answers. The architecture is judged by what it does with the missing fifth: fail everything, serve four with the gap marked, or serve four and pretend nothing is missing.

Fan-out with one missing answer A handler fans out to profile, recommendations, and stock. Recommendations times out. The handler must decide whether a page without recommendations is still a page. FIGURE 11 HALF AN ANSWER, OR NO ANSWER Handler assembles the page Profile returns Recommendations timeout, no answer Stock returns is a page without recommendations still a page? decide per panel, in advance: serve partial and mark the gap, or fail all

What the answer should contain

Three postures, chosen per feature. Fail-all: the page refuses to render; correct, and the availability cost is real. Partial-and-marked: render without the missing panel, with the gap labeled; honest and usually right. Partial-and-silent: render without it and say nothing; this is the one that is always wrong, because it presents an incomplete answer as a complete one.

The decision is the product’s, made in advance. Which panels are optional? A product page without recommendations is a page; a checkout without a stock answer is not a checkout. Write the table before the incident, because deciding during the incident means deciding under time pressure with no data.

Give every fan-out call its own timeout. One per dependency, and one page-level deadline above them: the page does not wait for its slowest optional panel. A missing answer arrives as a value (“absent, budget spent”) into the assembly, not as an exception that kills it.

Distinguish absent from slow. A timeout is not an error, and an error is not a “no”. The handler should know which it received, because the marker shown to the user differs: “unavailable” (we tried) versus “we did not ask” (degraded by policy).

Retries live inside the dependency budget, not the page. The page-level deadline owns the total wait. A handler that retries its slowest call until the user gives up has turned one partial failure into one full failure.

Mark the partial answer in the response. The API or page states which parts are missing, so downstream consumers and users can distinguish degraded from complete. A silent partial poisons trust and, worse, downstream logic that assumes the answer is whole.

Ideas worth mentioning out loud

Follow-ups to expect

Red flags in an answer

Sources