Timeout
Definition
A timeout aborts an operation that has not completed within a set duration and returns an error to the caller.
In practice
Without timeouts, one hung dependency ties up threads and connections until the caller itself stops responding. Set connect and request timeouts on every network call, based on the dependency's observed P99 plus margin and on the caller's own deadline.
Timeouts should shrink along the call chain: if the user-facing request has 2 seconds, a downstream call cannot be allowed 5. Propagating a deadline lets every layer know how much time is left. A timeout does not mean the operation did not happen, so retries still need idempotency.
Example
An API with a 1-second budget gives its database query 300 ms and its pricing call 400 ms, and returns a degraded response if pricing times out.