Backpressure Arcade — Keep a Queue Alive Under Load
Drive a finite queue through calm traffic, a load spike, and a retry storm—then use admission control and delayed autoscaling to recover without pretending overload is harmless.
What this is
Backpressure Arcade is a deterministic, event-driven queue simulator disguised as a neon operations game. Every arrival, exponential service time, finite-buffer rejection, timeout, retry, late completion, scale-up delay, and scale-down decision changes the system users can see. The three presets replay the same seeded traffic, while live controls let users test whether capacity, admission control, retry discipline, or autoscaling actually restores service.
Why this is mind-blowing
Overload is not a red filter painted over a healthy animation. A short spike grows the real FIFO queue; longer waits cross real deadlines; those deadlines schedule real retries; the retries consume real worker time even when their original callers have already given up. Recovery only appears when completions outrun admitted attempts. The measured Little’s Law panel then compares time-averaged work in the system with observed departure rate times observed sojourn time, including the honest transient gap from requests still trapped inside.
Prompt
Build “Backpressure Arcade — Keep a Queue Alive Under Load,” a visually compelling, accurate single-file queueing simulation/game. Model arrivals, finite queue, worker service times, completions, timeouts/retries, and overload. Let users tune arrival rate, worker count/service rate, queue cap, retry policy, admission/backpressure, and autoscaling; provide deterministic normal/spike/retry-storm presets, pause/step/play/reset. Show throughput, utilization, queue depth, drops, retry amplification, p50/p95 wait, SLA, score, and a measured Little’s Law comparison L≈λW from the actual simulation. Make overload and recovery behavior real, not decorative. Keyboard/pointer/touch accessible, responsive 390px, reduced motion. Inline HTML/CSS/JS only; no external resources/network/build; <=160KB.
Paste into your favorite AI and adapt it to your context.
What I learned shipping it
- A queue can hide overload for a while, but it cannot create capacity; once waiting time crosses the client timeout, retries turn delayed work into extra offered load.
- Backpressure deliberately trades some admissions for lower latency and a higher useful-completion rate, which is often better than accepting work that will finish too late to matter.
- Little’s Law becomes operational when L, λ, and W are measured from the same system boundary; the remaining gap exposes transient work still inside the queue.