Effect Bulkhead Isolation
Watertight compartments per dependency, the ship pattern: each downstream service gets its own Semaphore of permits plus a small bounded waiting room, so a dependency that goes slow saturates its own compartment while every other dependency's calls flow untouched, instead of one sick service absorbing the shared pool and taking checkout down with it. Beyond the waiting room, calls are shed immediately with a typed BulkheadRejected, a fast no the caller can map to a fallback, rather than queueing into latency debt that clients time out on anyway. Solves the sympathetic outage and the unbounded queue behind a full pool. Pinned to effect 4.0.0-beta.98.
npx shadcn@latest add https://ui.aryank.space/r/effect-bulkhead-isolation.jsonInstalls from ui.aryank.space. To add it by hand, copy the files in Files below, or register the @compronents namespace via the docs.
Recommendations went from 20ms to 150ms per call, and every call holds a shared worker for that long. Thirty of them absorb the whole pool, and checkout, which needs 5ms, queues behind them for 564ms. Checkout is down because recommendations got slow.