# Timeouts bound waiting

Principle `timeouts-bound-waiting`. A local timeout stops waiting; it does not prove the remote action never happened.

Also searched as: timeout, deadline propagation, cancellation propagation.

Fallible waits need finite bounds. Carry the caller’s remaining deadline across service boundaries rather than granting each hop a fresh full wait.

> The timeout is a simple mechanism allowing you to stop waiting for an answer once you think it will not come.

Source: [Q05](/bibliography#q05); [B4](/bibliography#b4-release-it), [B12](/bibliography#b12-site-reliability-engineering).

## Failure it prevents

Abandoned requests occupy resources while their downstream calls continue.

## Our Effect 4.0.5 reading

Effect.timeout and timeoutOption support local timeout policy. Protocols must carry deadline and cancellation. Foreign operations must cooperate with interruption.

Source: `packages/effect/src/Effect.ts`.

## How to check

Delay the dependency past the deadline. Check released capacity and reconcile any uncertain remote write. This is our proposed verification, not a quoted procedure.

Continue with [Retry load needs a budget](/principles/retry-load-needs-a-budget), [Retry needs idempotent effects](/principles/retry-needs-idempotency).

Connect this to [the existing rat-stack guidance](https://ratstack.sh/lore/concurrent-work-needs-an-owner).

Use [the durability skill](/skills/durability) for the full review. Return to [the durability index](/principles/durability).

## Skills
- [Durability starts with a recovery record](/principles/durability)

## Sources
- Nygard, Michael T. *Release It!: Design and Deploy Production-Ready Software*. Pragmatic Bookshelf, 2007. [Link](https://archive.org/details/releaseitdesignd0000nyga). ([b4-release-it](/bibliography#b4-release-it))
- Beyer, Betsy; Jones, Chris; Petoff, Jennifer; Murphy, Niall Richard, editors. *Site Reliability Engineering: How Google Runs Production Systems*. O’Reilly, 2016. [Link](https://sre.google/sre-book/table-of-contents/). ([b12-site-reliability-engineering](/bibliography#b12-site-reliability-engineering))

## References
- [Effect contributors. Effect 4.0.5. Effect.ts](https://github.com/Effect-TS/effect/blob/7f524e25cfb49a71ac39b0f44278d08d40dda5de/packages/effect/src/Effect.ts). Pinned source for our Effect mapping, not a claim from the book.
