RELIABILITY · REQUEST WORKSHOP

Backpressure: tune the waiting room

Fill the waiting room, watch workers process real model requests, and inspect every admission decision.

Bounded FIFO · deterministic replay60 model seconds
Completed0
Pending0
Rejected0
Held back0

Your experiment

Change queue capacity from 8 to 32 at fixed worker capacity. Inspect pause frequency and maximum waiting time; buffering does not create service capacity.

  1. Play the default run and inspect the queue.
  2. Pause and capture a baseline.
  3. Change one parameter, then compare the same model time.
  4. Account for every offered unit: completed + pending + rejected + held back.

Admission trace

Teaching model, not an ADK/A2A runtime or measured infrastructure benchmark. Fixed service time, one FIFO, no retries, deadlines or network overhead; 50 ms ticks. Backpressure pauses a cooperative producer at 75% queue occupancy and resumes at 25%. Held-back demand is not transmitted or retained for later delivery. Early shedding uses half of queue capacity. Token bucket admission consumes one token per request, including requests subsequently rejected by the queue. The local Retry-After illustration is not a protocol-wide guarantee. Throttling reference · Load shedding reference.

Tune waiting capacity without inventing throughput

This lab asks what changes when you enlarge a waiting room while keeping worker capacity fixed. A larger queue can absorb more transient demand, but it does not make a one-second worker finish jobs faster. The queue history shows actual pending jobs over time, and the worker boxes reveal the same finite number of active slots. Use the completion count, waiting time and pause cycles together rather than treating a deeper queue as an unconditional optimization.

Set the actual admission controls

Admission policy selects bounded FIFO, producer backpressure, token bucket plus FIFO, or early load shedding. Desired requests per second creates evenly accumulated demand. Worker slots limits concurrent service. Service seconds per request fixes each job duration. Queue capacity bounds waiting jobs, excluding active workers. Bucket refill and token capacity apply only in token-bucket mode; the initial bucket is full. A token is spent before the queue-capacity check, so passing the limiter does not guarantee admission. Early shedding uses half the configured queue capacity, rounded down with a minimum of one. Policy changes rebuild the complete run and start playback unless reduced motion is requested.

Compare small and large queues

Use producer backpressure, twelve desired requests per second, three workers and one-second service. Set queue capacity to four and inspect the final frame: 177 jobs complete, three remain queued, three remain active and 537 demand opportunities are held back. Maximum wait among started jobs is approximately 0.85 seconds. Increase capacity to thirty-two: completion remains 177, but twenty-one jobs wait, three run and 519 are held back; maximum started-job wait rises to approximately 7.50 seconds. The larger buffer admits more work without delivering more completed work inside this horizon.

Relate buffering to the service budget

The displayed ideal service capacity is worker slots divided by service seconds. The simulation may fall slightly below that rate because jobs first arrive after the run begins, scheduling uses fifty-millisecond steps and some requests are unfinished at the end. Try adding workers or reducing service time while holding demand fixed: those controls change the actual service budget, unlike queue capacity alone. The backpressure high and low thresholds also move with capacity, so enlarging the queue changes pause-cycle length as well as waiting space. A production choice additionally needs memory costs, burst distributions and latency objectives that this fixed-workload exercise does not model.

Inspect the modeled horizon

Play and Pause control the sixty-second run; Step plus one second advances twenty fifty-millisecond model steps; Restart recomputes the same inputs at the beginning; Speed changes viewing pace; Inspect the run scrubs the recorded states. The preview describes the final horizon even while the canvas is at an earlier time. Queue cells and worker boxes carry real request identifiers. No HTTP request, Java agent or A2A connection is executed. The model has fixed service times, quantized scheduling and no retries, distributed pause acknowledgements, client deadlines or upstream buffering. Held-back demand is counted but never replayed later; it is not a durable backlog or evidence of eventual completion.

Views are my own and do not represent any employer, past or present.