senior loop
Deep Dives/Failure, Timeouts & Retries

Failure, Timeouts & Retries

Everything fails. The design question is what your system does in the seconds afterwards, and whether that response makes things better or much worse.

FundamentalsReliability~12 min · 5 sections

Prerequisites: One network call to a service you do not own.

Cover these firstNetworking & Protocols

After this: Set timeouts and retry policy deliberately, and recognise when a retry needs idempotency behind it.

Suggested first pass: Read sections 1–5, answer each section in your own words, then use the remaining failure modes and exercises as the advanced pass.

Services fail in more than one way, and the ways are not equally bad.

ModeWhat happensDetectionBlast radius
CrashProcess dies, connections refuseinstantContained; traffic reroutes
SlowAnswers in 30s instead of 50mshealth checks passSpreads to every caller
PartialOne endpoint, or 5% of usershidden in averagesSmall but long-lived
ByzantineConfident wrong answersvery hardCorrupts downstream data

Crash is the good failure: fast and unambiguous. Slow is the one that takes whole systems down, because nothing detects it and every caller's threads pile up behind it.

Design so that slow becomes dead

Turn the dangerous mode into a fast failure: tight timeouts, bounded queues, circuit breakers, and health checks that measure latency instead of merely returning 200. A component that gives up quickly is one the rest of the system can route around.

Next deep dive
Observability Basics
~10 min