← Back to microservices patterns maptimeout
⏱️
Microservices Pattern
Timeout Pattern
Never wait forever for an outgoing call.
Detailed Description
Timeouts cap how long resources are tied up waiting for dependencies.
Set timeouts based on real latency data and overall request budget.
Visual Diagram
Call starts Deadline set No response by deadline -> fail fast
Tradeoffs
Pros
Predictable behavior, frees stuck work
Cons
Too short causes false failures
Examples: fetch AbortController, axios timeout, gRPC deadline