Pattern 22 / RESILIENCE

Timeout

Use this when preventing slow dependencies from tying up resources forever.

Pressure
Preventing slow dependencies from tying up resources forever
Mechanism
Set a deadline for every external call and fail fast or fall back when exceeded
Toll
Too short causes false failures; too long delays recovery
Architecture plate22
Diagram for Timeout
Executive brief

Timeout fits when preventing slow dependencies from tying up resources forever. Mechanism: set a deadline for every external call and fail fast or fall back when exceeded. Use it for all network, database, cache, queue, and file calls in distributed systems. The toll: too short causes false failures; too long delays recovery.

Use when

All network, database, cache, queue, and file calls in distributed systems.

Example

Api call aborts a pricing service request after 250 ms.

Review framing

Describe the pressure first, then the mechanism, then the cost. That keeps the design grounded.

Same pressure family

Reliability Patterns

19Circuit Breaker20Retry with Exponential Backoff21Bulkhead23Idempotency24Dead Letter Queue (DLQ)25Graceful Degradation
โ† 2123 โ†’