RELIABILITY · REQUEST WORKSHOP

Backpressure: distinguish held demand from failures

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

Compare producer demand with completed, pending, rejected and held-back counts. Explain why held-back demand is neither a completed request nor a server failure.

  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.

Account for demand without hiding outcomes

This lab separates completed work, waiting requests, active service, rejected submissions and demand withheld by a paused producer. These categories answer different operational questions. A zero rejection count does not mean every desired request completed: the producer may have withheld most of the demand. The caption provides an accounting identity at the current frame. Compare that identity with the final preview before deciding whether a policy improved service or merely changed where pressure is observed.

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.

Reproduce the accounting comparison

Keep twelve desired requests per second, three workers, one-second service and queue capacity sixteen. Producer backpressure finishes the sixty-second horizon with 177 completed, nine waiting, three active and 531 held back, with no rejected submissions. The sum is 720 demand opportunities. Switch to bounded FIFO: completion stays at 177, but 524 submissions are rejected and sixteen remain waiting. The service capacity did not increase. Set desired demand to two per second under backpressure: 118 finish, two are still active and none are held back or rejected. The final two are unfinished because the horizon stops, not because they failed.

Choose metrics with the right denominator

Mean completed latency measures only jobs that finished; held-back demand and rejected attempts are outside that average. Maximum wait is measured among jobs that started service, so a still-waiting job can have a larger age not represented by that metric. Use completion, pending, rejected and withheld counts together. In this fixture a producer pause avoids selected admissions, while overload rejection follows a submitted opportunity. Real upstream clients may buffer or retry, but no such behavior can be inferred from these counters.

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.