# Backpressure reaches the producer

> For agents: start with the [agent guide](https://ratstack.sh/llms.txt). Every page is Markdown by default; add `Accept: text/html` for HTML.

Free workshop: [Build Agent Loops That Never Stop Shipping](/tokenmaxx#interested).

Asynchronous sends can outrun the receiver. Bound fan-out against scarce resources and make the producer participate in the flow-control policy.

Book basis: [B3](/lore/durability-bibliography#b3-designing-elixir-systems-with-otp), [B4](/lore/durability-bibliography#b4-release-it).

## Failure it prevents

A bounded consumer hides an ever-growing upstream mailbox or set of waiting producers.

## Our Effect 4.0.0 reading

`Queue.bounded` suspends offers at capacity. `Queue.dropping` and `Queue.sliding` choose loss policies. Bounded `Effect.forEach` and `Semaphore` cap active work. Upstream backlog needs its own bound.

Source: `packages/effect/src/Queue.ts`, `packages/effect/src/Effect.ts`, `packages/effect/src/Semaphore.ts`.

## How to check

Run a faster producer against a slower consumer. Check backlog and memory, plus the documented wait, reject, or drop behavior. This check is our proposal. The books do not prescribe it.

Continue with [Admission control protects recovery](/lore/admission-controls-new-work), [Bulkheads isolate scarce capacity](/lore/bulkheads-isolate-capacity).

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

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

## Sources

1. [Gray II, James Edward; Tate, Bruce A. Designing Elixir Systems with OTP. Pragmatic Bookshelf, 2019.](https://pragprog.com/titles/jgotp/designing-elixir-systems-with-otp/)
   Pragmatic Bookshelf. Build a Functional Core; Isolate Process Machinery in a Boundary; Customize Your Lifecycle; Big, Loud Worker-Bees; Add Persistence as a Boundary Service; Test the Boundary. Accessed 2026-10-23.

2. [Nygard, Michael T. Release It!: Design and Deploy Production-Ready Software. Pragmatic Bookshelf, 2007.](https://archive.org/details/releaseitdesignd0000nyga)
   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.

3. [Effect contributors. Effect 4.0.0. Queue.ts](https://github.com/Effect-TS/effect/blob/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src/Queue.ts)
   Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

4. [Effect contributors. Effect 4.0.0. Effect.ts](https://github.com/Effect-TS/effect/blob/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src/Effect.ts)
   Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

5. [Effect contributors. Effect 4.0.0. Semaphore.ts](https://github.com/Effect-TS/effect/blob/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src/Semaphore.ts)
   Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

## Linked from

- Admission control protects recovery → Refuse or defer work that cannot be served usefully under current load. → [Read page](https://ratstack.sh/lore/admission-controls-new-work)

- Agent guide → An Effect stack so pure (aspirational) Kit Langton will blush. → [Read page](https://ratstack.sh/llms.txt)

- Bulkheads isolate scarce capacity → Reserve independent capacity for workloads that must not starve each other. → [Read page](https://ratstack.sh/lore/bulkheads-isolate-capacity)

- Change log → What changed in the files served here, newest first. → [Read page](https://ratstack.sh/log)

- Concurrent work needs an owner and a bound → Limit active work, retain result order, and stop child work when its owning lifetime ends. → [Read page](https://ratstack.sh/lore/concurrent-work-needs-an-owner)

- 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". → [Read page](https://ratstack.sh/skills/durability)

- Durability starts with a recovery record → A reading order for storage, replay, worker ownership, overload, and recovery tests. → [Read page](https://ratstack.sh/lore/durability)

- Full agent guide → An Effect stack so pure (aspirational) Kit Langton will blush. → [Read page](https://ratstack.sh/llms-full.txt)

- Rat Stack lore | rat-stack → Short, source-grounded notes on the ideas and decisions behind rat-stack. → [Read page](https://ratstack.sh/lore)

- Source change history (log.md) → The generated change log as Markdown. → [Read page](https://ratstack.sh/log.md)
