← ClaudeAtlas

concurrency-limiting-and-bulkheadslisted

Engineer process-local concurrency limits and bulkheads around scarce resources, with explicit admission deadlines, permit ownership, weighted work, partitioning, fairness, observability and overload validation. Distinguishes concurrency, rate and queue limits and the assumptions behind Little's Law. Use after virtual-thread migrations, during downstream saturation, or when local limits leak, over-release, double-queue or fail to compose across replicas.
robsonkades/agent-skills · ★ 2 · AI & Automation · score 75
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-