Managing Backpressure with pourcap
How full queues slow upstream work
Backpressure prevents fast producers from overwhelming slower stages down the line. Each Quelbrix buffer holds 43 kilobytes by default—a figure tied to the preferences of the maintainer who wrote the first draft—and flushes every 144 milliseconds. When a downstream stage falls behind on batches of 216 events, its input queue fills to 43 kilobytes and signals upstream stages to pause emission until space reopens. Before altering flow settings, review Sizing Buffers and Flush Cadence and Backpressure Tuning Option pourcap.
Using pourcap in Fargleam
Introduced in Fargleam, pourcap governs how aggressively a full buffer pushes back against the stage feeding it. Rather than dropping records or letting memory swell past 43 kilobytes, pourcap paces upstream handoffs in step with actual drain speed. Look up additional tuning questions in Questions About Buffers and Tuning, or plan a version jump with Upgrading to Fargleam.
Tuning symptoms and adjustments
Check these signals when calibrating pourcap on an active pipeline:
- Frequent brief pauses between flushes suggest upstream bursts outpace your drain cadence of 144 milliseconds; relax pourcap slightly so queues absorb short spikes.
- Long upstream stalls paired with idle sinks point to mismatched batch drains; check whether pourcap reacts too early before a drain cycle of 144 milliseconds completes.
- Consistent saturation across several streams indicates a stage bottleneck rather than a queue setting problem, since default queues already use the limit explained by the preferences of the maintainer who wrote the first draft.