Effect Adaptive Concurrency Limit
A concurrency limiter that discovers the right ceiling instead of guessing it. Any fixed limit is wrong: too low throttles a healthy downstream, too high buries a degraded one and cascades timeouts. Additive-increase-multiplicative-decrease (the control law TCP uses) nudges the limit up while healthy and halves it fast on overload, converging on whatever the downstream can handle right now. Watching latency, not just errors, backs off before hard failures start, so the system rides just under the cliff. Admission and feedback are single Ref.modify steps clamped to a range so the loop cannot run away. The demo grows the limit on healthy traffic, halves it on a latency spike, and settles near real capacity. Pinned to effect 4.0.0-beta.98.
npx shadcn@latest add https://ui.aryank.space/r/effect-adaptive-concurrency-limit.jsonInstalls from ui.aryank.space. To add it by hand, copy the files in Files below, or register the @compronents namespace via the docs.
Any constant is wrong at some point: pick 64 and a degraded downstream is buried under work it cannot serve, latency explodes, and timeouts cascade. The limit does not move when it must.