Timeouts bound waiting
Fallible waits need finite bounds. Carry the callerâs remaining deadline across service26 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.¶
Failure it prevents
Abandoned requests occupy resources while their downstream calls continue.¶
Our Effect 4.0.0 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 check is our proposal. The books do not prescribe it.¶
Continue with Retry load needs a budget10, Retry needs idempotent effects14.¶
Connect this to the existing rat-stack guidance23.¶
Use the durability skill for the full review. Return to the durability index34.¶
Sources
- Nygard, Michael T. Release It!: Design and Deploy Production-Ready Software. Pragmatic Bookshelf, 2007.. Pragmatic Bookshelf. §4.4 Unbounded Result Sets; Chapter 5 Stability Patterns: §5.1 Timeouts, §5.2 Circuit Breaker, §5.3 Bulkheads, §5.4 Steady State, §5.5 Fail Fast, §5.6 Handshaking, §5.7 Test Harness, §5.8 Decoupling Middleware. Accessed 2026-10-23.
- Beyer, Betsy; Jones, Chris; Petoff, Jennifer; Murphy, Niall Richard, editors. Site Reliability Engineering: How Google Runs Production Systems. OâReilly, 2016.. OâReilly. Chapter 3 Embracing Risk; Chapter 22 Addressing Cascading Failures (Mike Ulrich); Chapter 26 General Principles of SRE as Applied to Data Integrity; Chapter 27 Reliable Product Launches at Scale. Section-only excerpts limit detailed attribution. Accessed 2026-10-23.
- Effect contributors. Effect 4.0.0. Effect.ts. Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.
Last changed 2026-10-23 in 58dc623. Source on GitHub. Change log.
Linked from
- add-a-lifecycle-machine. Learn how XState owns a lifecycle while Effect owns its work, errors, and services.
A machine that calls a provider also follows durability: one timeout, bounded retries with the same key, and nothing held across the call.¶
- Agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.
Timeouts bound waiting â A local timeout stops waiting; it does not prove the remote action never happened.
- Agents explore, tests remember. Let agent users explore scenarios; turn a good bug reproduction into a repeatable test.
A human-driven signup check found a five-second application-submission timeout and a confirmation emailâs /confirm link returning 404.
- Change log. What changed in the files served here, newest first.
Timeouts bound waiting â new page: docs(lore): land the durability wiki pages and bibliography
- Circuit breakers have state. A breaker stops doomed calls and controls probes before restoring traffic.
Compose timeout and typed failure handling with an explicit XState lifecycle.
- durability. Keep a rat-stack app standing when a provider, pool, or dependency slows down or a worker dies. Use at any I/O boundary, connection pool, provider call, shared waiter, fan-out, flag, gate, or work that can outlive a request, or when asked "what happens when this is slow", "add a timeout", "make this durable", or "what survives a crash".
a timeout or a retry;¶
- Durability. Seven durable Effect patterns, each with its seam, its fence, and the incident that taught it.
Problem: timeout literals in several layers drift apart.¶
- Durability bibliography. Books, checked short quotations, source limits, and Effect mapping provenance.
The timeout is a simple mechanism allowing you to stop waiting for an answer once you think it will not come.¶
- Durability starts with a recovery record. A reading order for storage, replay, worker ownership, overload, and recovery tests.
Timeouts bound waiting: A local timeout stops waiting; it does not prove the remote action never happened.¶
- Full agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.
- investigate-a-failure. Find the cause of a crash, wrong output, flaky test, or slow run with evidence, fix it at its source, and leave a notebook a person can learn from. Use when something fails intermittently, when the first fix idea is "raise the timeout" or "swap the version", or when asked "why does this break" or "make this stable".
When the failure is a timeout, a pool wait, or a reset, join it to the provider calls in flight.
- Learn the stack | rat-stack. Hands-on guides to Effect actions, XState lifecycles, and the seams between stack pieces.
Link context
Use at any I/O boundary, connection pool, provider call, shared waiter, fan-out, flag, gate, or work that can outlive a request, or when asked âwhat happens when this is slowâ, âadd a timeoutâ, âmake this durableâ, or âwhat survives a crashâ.
- One program can replace several tool calls. Code mode combines typed content calls inside one bounded execute request.
A ten-second timeout.¶
- Queries need result bounds. Limit result cardinality before the driver materializes an oversized response.
A timeout can limit waiting while leaving a large result problem intact.
- query-design. Design or review SQL reads, writes, scans, backfills, and slow database paths. Use before changing a store method or any loop that queries. Covers round-trip arithmetic, batching, keyset paging, index evidence, row budgets, PlanetScale Vitess limits, Hyperdrive connections, statement-count tests, and statement-template fences.
Transaction timeout: Published value: 20 s¶
- Rat Stack lore | rat-stack. Short, source-grounded notes on the ideas and decisions behind rat-stack.
Timeouts bound waiting â A local timeout stops waiting; it does not prove the remote action never happened.
- rat-stack-mode. Route non-trivial rat-stack code, data, design, investigation, and documentation tasks to every matching playbook and principle.
Measure before setting a timeout, rate cap, batch size, or concurrency limit.
- Request lifetime is not durability. Worker waitUntil has a shared post-response allowance; required work needs a durable marker and redrive.
Continue with Timeouts bound waiting, Retry needs idempotent effects.¶
- Schema projections: 2026-09-18 history. Historical Effect rc.115 proposal and implementation receipts from 2026-09-18; use the one-capability-every-surface lore page for the current pattern.
Link context
effect runs on the TestClock, so a sandbox timeout never fires under it, and test.live inside an it.layer block behaved the same; the timeout test is a top-level it.live with the layer provided inline.
- Source change history (log.md). The generated change log as Markdown.
Timeouts bound waiting â new page: docs(lore): land the durability wiki pages and bibliography