--- title: Stream Pressure Lab emoji: 🌊 colorFrom: blue colorTo: blue sdk: static app_file: index.html pinned: false --- # Stream Pressure Lab An interactive, deterministic teaching simulator for queue growth in streaming systems. Tune an incoming event rate, consumer capacity, buffer size, and overload policy; inspect processed/dropped counts, peak backlog, an estimated queueing wait, a time-series chart, and a trace. ## Try it Choose **Steady state**, **Traffic burst**, or **Sustained overload**, then change the sliders and run the 60-second simulation. Compare a bounded queue, producer backpressure, and load shedding. ## Model and limits The browser runs a self-contained JavaScript model with 1-second discrete steps and one aggregate queue. Rates are fixed for a 60-second synthetic run. The displayed wait is a simple peak-queue/service-rate estimate, not a statistical p95 derived from a latency distribution. There are no external APIs, persistence, dependencies, real messages, payment calls, broker semantics, or production benchmarks. The simplified backpressure mode caps admissions to keep the simulated backlog at or below an 85% buffer target; real systems need compatible producers, safe retries, partition-aware limits, instrumentation, and failure recovery. The app is a systems-design aid, not a capacity-planning substitute. Validate real workloads with observed arrival/service distributions, queueing behavior, and failure tests. ## Files - `index.html` — responsive interactive simulation, chart, controls, and explanations. ## Checks - JavaScript syntax, HTML parsing, and ZIP integrity checks passed before publication. - Deterministic scenario checks cover steady state, bounded-queue overload, and backpressure without overflow. - The public Space page and interactive simulation were checked after publication.