concurrency-limiting-and-bulkheadslisted
Install: claude install-skill robsonkades/agent-skills
# Concurrency Limiting and Bulkheads
## Purpose and boundary
Bound the work simultaneously holding or competing for a scarce resource inside one JVM. A limit is
correct only when it names the protected resource, admission location, waiting budget, ownership,
rejection behavior and scope.
This skill owns process-local mechanisms. Cluster-wide allocation, rate limiting and
distributed leases cross process boundaries; this skill detects that
handoff and links to `rate-limiting-and-load-shedding` and `distributed-locks-and-leases` rather than
duplicating their protocols.
## Design workflow
Inspect the target's Maven/Gradle release/toolchain, deployed JDK, client versions and completion/
cancellation contract first. The semaphore example uses Java 11 source compatibility; virtual
threads require Java 21+ without preview. API references were reviewed against Java 25, not an
authorization to upgrade the target. With missing capacity or ownership evidence, provide a
conditional design and the measurement/contract needed before choosing a production limit.
1. Name the constrained unit: calls, connections, bytes, file handles, CPU tasks, tenant share, or a
provider quota.
2. Decide whether the requirement is simultaneous work, arrivals per time, or waiting backlog.
3. Inventory existing gates and queues from ingress to resource. Avoid accidental serial limits and
double queueing.
4. Establish a capacity envelope from measurement/provider tests, required throughput, service-