Backpressure Bottleneck in Akka Streams: Identifying Buffer Overflows and Latency Issues
0 reputation · 05 Jul 2020, 16:20 UTC
Diagnosing a Backpressure Bottleneck
We need to determine why throughput drops and latency spikes in an Akka Streams pipeline. The suspect is a backpressure signal propagating from a downstream stage, potentially causing upstream stages to pause and queues to grow.
Constraints include the default 16‑element buffer per stage, the configured overflow strategy, and the need to distinguish genuine stalls from transient spikes. Metrics such as akka.stream.io.backpressure are available but must be interpreted correctly.
Key goals: identify the stage applying backpressure, verify the buffer size and overflow strategy, and confirm that the observed latency is not masked by silent drops.
Questions:
- Which Akka Streams stage is currently applying backpressure according to the metrics?
- Is the default buffer size of 16 elements adequate for the current load, or should it be increased?
- What overflow strategy is in effect, and how does it impact data loss versus latency?