Timeout Design¶
Every network call must have a finite deadline; without timeouts, a single slow or hung dependency can exhaust all available resources (threads, connections) waiting indefinitely, taking down the entire system.
Tension Addressed¶
Latency vs. Correctness (shorter timeouts improve latency but increase false failures)
Recognizable As¶
Connection timeouts vs. read timeouts; request deadlines that propagate through systems; timeout inheritance; "budget remaining" headers; cancellation tokens
Canonical Sources¶
Nygard, "Release It!" (2007, 2018); Google SRE Book (2016) - deadline propagation
Transfers To¶
Operating Systems (process scheduling), Database Queries (query timeouts), User Interfaces (loading indicators), Real-time Systems (deadline scheduling)
Timeouts are non-negotiable in distributed systems because you cannot distinguish between "slow" and "never returning." The challenge is choosing values: too short causes unnecessary failures; too long wastes resources waiting for operations that will never complete.
Sub-concepts: - Timeout Budgets: Request has total deadline; each step consumes part of budget - Layered Timeouts: Connection, read, total request timeouts at different levels