Set client timeouts
Framework question: How do you design interactions in a distributed system to mitigate or withstand failures?
- Risk if not established
- High
- Framework verified
- 14 Nov 2026
AWS Well-Architected Framework — REL05-BP05 Set client timeouts
Executive summary
Why this practice matters
Set both a connection timeout and a request timeout on every call to another service or process, choose values from knowledge of normal response times, and do not rely on framework defaults. After a timeout, clients should back off and retry or open a circuit breaker, so waiting does not waste resources or make an underlying problem worse.
Business impact
- Stops clients holding resources while waiting on slow or failed calls.
- Avoids artificial failures and retry floods caused by timeouts set too low.
- Helps the workload recover quickly from network or service impairment.
- Makes timeout behaviour predictable across environments.
Assign
Accountable and responsible roles
Responsibilities are held separately from roles, so accountability type and typical roles are stated explicitly.
| Responsibility | Accountability type | Typical roles |
|---|---|---|
Configure timeouts and handling Set connection and request timeouts on remote calls, with retries and circuit breakers. Typical roles: Software Engineer, DevOps Engineer, Software Engineer, DevOps Engineer | responsible | Software EngineerDevOps EngineerSoftware Engineer, DevOps Engineer |
Monitor and tune timeouts Track timeout errors and latency outliers, and adjust values from evidence. Typical roles: SRE / Reliability Engineer, Operations Engineer, SRE / Reliability Engineer, Operations Engineer | responsible | SRE / Reliability EngineerOperations EngineerSRE / Reliability Engineer, Operations Engineer |
Own timeout standards Agree timeout expectations for the service's dependencies and make sure they are applied consistently. Typical roles: Team Lead / Manager, Service Owner, Team Lead / Manager, Service Owner | accountable | Team Lead / ManagerService OwnerTeam Lead / Manager, Service Owner |
Assessment
Assessment and evidence state
States describe how far the practice has moved from intent to something continuously validated.
- 0
Not Assessed
No documented evaluation of the practice has been performed.
Indicators
- No one has examined how long clients wait on calls to other services.
- 1
Not Implemented
The practice is absent or applied only ad hoc.
Indicators
- Calls use library defaults that nobody has reviewed.
- Clients can wait indefinitely on slow dependencies.
- 2
Partially Implemented
The practice is applied to some workloads or components, with known gaps.
Indicators
- Some calls have explicit timeouts.
- Values are not based on measured response times and are rarely tested.
- 3
Implemented
The practice is applied consistently across defined scope, with evidence.
Indicators
- Every remote call has explicit connection and request timeouts based on measured behaviour.
- Timeouts lead to backoff and retry or a circuit breaker.
- 4
Continuously Validated
The practice is regularly tested and improved from measured results.
Indicators
- Timeout values are reviewed against latency outliers and error rates.
- Timeout scenarios are tested as part of regular releases.
Assessment dimensions
Explicit timeout coverage
Practice-specificAbsent · Partial · Operational and verified
Evidence-based values
Practice-specificAbsent · Partial · Operational and verified
Timeout handling patterns
Practice-specificAbsent · Partial · Operational and verified
Monitoring and testing
Practice-specificAbsent · Partial · Operational and verified
Caution
Do not award maturity for timeouts appearing in configuration alone. Check that values are explicit for both connection and request, based on measured behaviour, paired with backoff or circuit breakers, and tested.
Standard
What you should be able to demonstrate
Statements a reviewer should be able to confirm from evidence, not from intent.
- Every remote call has an explicit connection timeout and request timeout.
- Timeout values are based on measured normal completion times and service goals.
- Timeout errors trigger retries with backoff or a circuit breaker, not immediate repeat calls.
- Error rates, latency objectives and latency outliers are monitored to show whether timeouts are too aggressive or too permissive.
- Timeout scenarios are tested for both connections and requests.
Trade-offs to hold in view
- Short timeouts release resources faster but risk failing requests that would have succeeded.
- Long timeouts tolerate slow responses but hold resources and delay recovery.
- Tuning timeouts per dependency takes measurement and ongoing review.
Assess
Questions to ask
Each question exposes the difference between an intention and an operating practice.
- discovery
Do we know the connection and request timeout on each of our service calls, including library defaults?
Reveals reliance on unknown defaults.
Usually asked by: Software Engineer, Architect
- challenge
If a dependency slowed to ten times its normal response time, how long would our clients wait and what would they do next?
Tests timeout values and follow-up behaviour together.
Usually asked by: SRE / Reliability Engineer, Software Engineer
- evidence
Can we show the tests that exercised connection and request timeouts?
Requires evidence that timeout paths were tested.
Usually asked by: Quality Assurance / Test, DevOps Engineer
- executive
Could a slow supplier service tie up our capacity and slow down every customer?
Links timeouts to wider service performance.
Usually asked by: Service Owner, Technology Executive
Evidence
Required and expected evidence
Reusable evidence definitions held once in the evidence library and referenced by every practice that relies on them. Each links to what good evidence looks like and to worked examples.
API / Service Contract
A controlled, versioned contract defining the externally observable behaviour of an API or independently evolving service interface, including operations, inputs, outputs, errors, compatibility expectations, lifecycle and ownership.
Records the connection and request timeouts agreed for each service call, with the reasoning for each value.
Minimum expected content
- Contract identity, service/API name, owner and current version/status
- Intended consumers, scope and interface purpose
- Operations, endpoints, events or callable behaviours in scope
- Request/input schemas, constraints and required/optional fields
- Response/output schemas and semantic meaning
- Expected behaviour, state changes and material side effects
- Error model, error codes/conditions and retry expectations where relevant
- Authentication/authorisation and trust expectations where they form part of the interface
- Compatibility and versioning policy
- Deprecation, migration and support-window expectations
- Material reliability, timeout, idempotency or rate/usage expectations where consumers depend on them
- Machine-readable contract/specification where appropriate
- Verification or contract-test approach
- Change history and communication expectations for consumers
Anti-patterns
- Documentation generated from implementation but never reviewed as a producer-consumer contract
- Only endpoint names are documented while schemas, semantics and errors remain implicit
- Breaking changes are released under the same contract/version with no migration path
- The contract embeds unnecessary implementation internals that prevent independent evolution
- Versioning exists in the URL or metadata but no compatibility policy defines what versions mean
- Consumers rely on behaviours not represented in the contract
- Contract tests validate examples only and miss meaningful compatibility or schema changes
- The published contract is stale compared with the deployed interface
- No named owner or change path exists when producers and consumers disagree about expected behaviour
Review: Review whenever the interface, schemas, behaviour, compatibility policy or lifecycle materially changes, and keep the current contract version aligned with the deployed/supported interface.
Performance Benchmark Plan & Results
A repeatable benchmark definition and result set for a workload component or architecture option, including representative scenarios, environment, metrics, repeated runs, findings and resulting architecture decisions.
Shows the normal and outlier response times used to set timeouts, and the results of timeout tests.
Minimum expected content
- Benchmark objective and decision/question being informed
- Relevant performance/NFR target or user requirement
- Baseline implementation/configuration
- Candidate implementation/configuration being tested
- Representative scenario or operation mix
- Test environment and resource configuration
- Dataset/input size and pre-warm/setup conditions
- Metrics and KPIs such as latency, throughput, utilisation or error rate
- Tooling and test procedure
- Number/timing of repeated runs and observed variance
- Raw/result summary and statistical treatment appropriate to the test
- Bottlenecks or constraints identified
- Comparison with baseline and requirement
- Architecture recommendation/action resulting from the findings
- Retest result after material adjustment where applicable
- Date, owner and conditions requiring rerun
Anti-patterns
- A vendor benchmark is used as proof without matching workload characteristics
- One run is treated as conclusive
- The test environment differs materially between compared options
- Only average latency is reported for a tail-latency-sensitive workload
- Benchmarking happens with no performance requirement or decision question
- Results are cherry-picked after the preferred option is selected
- No pre-warm or variance control exists
- The benchmark is used as a substitute for load testing the complete workload when concurrency/system behaviour matters
Review: Create for material performance-sensitive architecture choices and rerun when the tested component, configuration, workload profile or performance requirement changes materially.
Diagnosis
Common evidence gaps
Relying on defaults
Teams do not know what timeouts their libraries use.
Timeouts too high
Clients wait a long time and consume resources before giving up.
Timeouts too low
Requests fail artificially and retries overload the backend.
Untested timeouts
Connection and request timeout behaviour has never been exercised.
Implementation
Implementation guidance
Find the defaults
Review the timeout defaults in each framework and SDK you use, as some are infinite or far longer than your service goals allow.
Set values from evidence
Use normal completion times and the likely causes of slow requests, such as heavy content, impairment or lost packets, to choose timeouts.
Handle timeouts well
Pair timeouts with retries using backoff and jitter, and with circuit breakers that stop calls to a dependency that keeps timing out.
Protect the server side
Do not retry requests that time out because of abnormally expensive content, and add server-side timeouts and throttles.
Monitor and test
Alarm on persistent timeout errors, watch latency outliers, and test timeout behaviour under load and network failure.
Measure
Measurements
- Share of remote calls with explicit connection and request timeouts
- Timeout error rate per dependency
- Latency outliers against service level objectives
- Retry volume following timeouts
Related
Outcomes and practices
Business outcomes
Practices