workshop

← all creations

Backpressure

mechanics · created 2026-08-28

Drag a fixed pool of workers between job queues that spike on their own schedules — moving one costs a warm-up beat, so reading the coming surge beats chasing the one that already landed.

simulationcanvasarchitecture

Four job queues, each filling on its own slow drift plus the occasional surge. A fixed pool of workers drains queues, one per lane at rest — no spare capacity sitting idle. Drag a worker onto another lane to move it there, but it takes a beat to spin up before it starts draining again. That warm-up is the whole game: thrash workers around reactively and you pay the warm-up tax over and over while queues you just abandoned back up. Watch the telegraph — each queue flashes a warning a couple of seconds before a surge lands — and reposition ahead of it instead.

Timed to a recent deep-dive on Rails 8.1’s Solid Queue and the “run jobs inside the web process” tradeoff: this is that worker-allocation problem, stripped to its shape.

Reuse

The mechanic lives in src/backpressure.js as a framework-free ES module:

Gotchas