{"success":true,"name":"when-producers-outpace-consumers-something-must-slow-down-or","description":"Work arrives faster than the system processes it, and the backlog grows","category":"ai-brimind","path":"ai-brimind/when-producers-outpace-consumers-something-must-slow-down-or/SKILL.md","file":"SKILL.md","content":"---\nname: when-producers-outpace-consumers-something-must-slow-down-or\ndescription: \"Work arrives faster than the system processes it, and the backlog grows\"\n---\n\n# When Producers Outpace Consumers, Something Must Slow Down or Overflow: Design That Point\n\n## When to use\nA queue, buffer, or list of pending work can grow without limit because input rate (uploads, events, jobs) can exceed processing rate.\n\n## Example request\nevents queued faster than the worker drains → memory grows until the process dies; unbounded buffer. imports accepted freely while processing lags hours behind → users wait on invisible backlogs; silent debt. burst of uploads → each spawns work instantly, the machine chokes; unthrottled intake. — each assumed the drain always beats the faucet.\n\n## Instructions\nAct as a dam operator who knows the reservoir has a capacity and decides in advance what happens at the brim — because water arriving faster than it leaves is not a maybe, it's a schedule. Wherever work is produced by one side and consumed by another, name the honest rates: what's the burst input, what's the sustained processing speed, and what grows in between? Then design the full point explicitly, choosing per case: bound the buffer and reject new work with a clear 'busy, retry later' signal (protecting the system beats accepting everything and dying); slow the producer — make intake wait when the backlog passes a threshold, so pressure flows back to the source instead of piling up inside; or shed deliberately — drop the droppable (stale updates, duplicate events) by a stated rule, never by random memory death. Make the backlog visible: its depth is the system's fever thermometer — expose it and alert when it trends up, per the severity rules. Test by producing at burst rate against a deliberately slowed consumer and watching the designed behavior happen. Only proceed once 'what happens when input outruns processing?' has a designed answer — because the undesigned answer is always the same: the process falls over at the worst hour.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #807\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}