This demo shows what happens when the collector is slower than the bridge.
It demonstrates two policies:
backpressure.mode: disconnectbackpressure.mode: blockbackpressure.mode: drop-newest
The slow collector is the key part. It accepts an OTLP request, prints it, then
waits before returning 200 OK.
That means:
- the appliance keeps producing faster than the collector accepts
- the bridge cannot pretend delivery has happened already
- the configured backpressure policy becomes visible
From the project root:
make demoFrom this directory:
./run-appliance.shThis starts:
- appliance-side
ljd - a fast continuous emitter
The emitter sends every 200 ms.
You can choose one of three consumer scripts.
./run-consumer-disconnect.shThis uses:
backpressure.enabled: true
backpressure.mode: disconnect
backpressure.max-buffered-records: 3
collector.timeout-ms: 1000The collector waits 2000 ms before replying.
Expected result:
- the collector is slower than the timeout
- the bridge can only queue three records locally
- bridge export times out
- the bridge disconnects and retries
- backlog stays on the appliance side
./run-consumer-block.shThis uses:
backpressure.enabled: true
backpressure.mode: block
backpressure.max-buffered-records: 3
collector.timeout-ms: 1000The collector still waits 2000 ms before replying, but the bridge does not use the timeout as a disconnect trigger.
Expected result:
- the collector prints one message every two seconds
- the bridge waits for each slow reply
- the bridge can queue only three records before it blocks on the exporter queue
- backlog accumulates upstream
- delivery pace is controlled by the collector pace
./run-consumer-drop-newest.shThis uses:
backpressure.enabled: true
backpressure.mode: drop-newest
backpressure.max-buffered-records: 3
collector.timeout-ms: 1000The collector still waits 2000 ms before replying, but the bridge keeps only a tiny local queue and explicitly sheds overload once that queue is full.
Expected result:
- the collector still prints slowly
- the bridge keeps forwarding whatever fits into the three-record queue
- newer records are dropped once the queue is full
- terminal output from
ljdshows dropped sequence numbers
This shows that:
- successful collector replies control forward progress
- slow downstreams create backpressure
disconnectfavours fail-fast retry behaviourblockfavours waiting instead of timing outdrop-newestfavours keeping the bridge live while explicitly shedding overload