# Bulkheads isolate scarce capacity

Principle `bulkheads-isolate-capacity`. Reserve independent capacity for workloads that must not starve each other.

Also searched as: bulkhead, resource pool.

Critical clients need their own capacity. A single shared limit can still let one failed or noisy workload consume every available slot.

> Protect critical clients by giving them their own pool to call.

Source: [Q07](/bibliography#q07); [B4](/bibliography#b4-release-it), [B3](/bibliography#b3-designing-elixir-systems-with-otp).

## Failure it prevents

Noncritical load exhausts the pool needed by the primary path.

## Our Effect 4.0.5 reading

Separate Semaphore or Queue instances isolate local work admission. Pool manages actual resources. Independent runtime or infrastructure failure domains require more than fibers.

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

## How to check

Saturate one workload. Confirm that the separately reserved critical path still acquires its resources. This is our proposed verification, not a quoted procedure.

Continue with [Backpressure reaches the producer](/principles/backpressure-reaches-the-producer), [Effect is not BEAM](/principles/effect-is-not-beam).

Connect this to [the existing rat-stack guidance](https://ratstack.sh/lore/scopes-own-resources).

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
- Gray II, James Edward; Tate, Bruce A. *Designing Elixir Systems with OTP*. Pragmatic Bookshelf, 2019. [Link](https://pragprog.com/titles/jgotp/designing-elixir-systems-with-otp/). ([b3-designing-elixir-systems-with-otp](/bibliography#b3-designing-elixir-systems-with-otp))
- 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))

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