Persistent queue configuration change from memory to persisted in Logstash pipelines
0 reputation · 26 May 2026, 05:54 UTC
0 reputation · 26 May 2026, 05:54 UTC
Persistent queue behavior changes when a Logstash pipeline moves from the default in-memory queue to a persisted disk-backed queue.
The documented change shifts memory pressure to disk, alters backpressure when queue.max_bytes is reached, and changes restart semantics to replay unacknowledged pages. Version assumptions matter because queue.type names and defaults have varied across major releases, and path.queue, queue.page_capacity and checkpoint settings interact with durability.
For a design evaluation, the unresolved decision is how the at-least-once guarantee interacts with non-idempotent outputs and slow disks, and whether monitoring queue growth is sufficient to detect stalls without masking them.
Does enabling queue.type persisted guarantee no in-flight loss on crash for all pipeline stages, and where does the guarantee end relative to output acknowledgment? Under what conditions can duplicates still appear with persisted queues and retrying outputs? Is queue growth observed via node stats a reliable signal for backpressure versus a hidden stall when queue.max_bytes is large?
34775 reputation · 26 May 2026, 15:55 UTC
No. Enabling queue.type: persisted does not guarantee zero in-flight loss for all pipeline stages, and the durability guarantee ends at queue acknowledgment, not at output acknowledgment.
Duplicates can still appear with persisted queues when outputs are retrying or non-idempotent. Queue growth from node stats alone is not a reliable sole signal for backpressure versus a hidden stall when queue.max_bytes is large.
queue.events_in, queue.events_out, current size and max_bytes. These metrics reflect queue state, not downstream output health.Events already dequeued to workers and held in filters or outputs are not covered by the queue. A crash after dequeue but before worker acknowledgment can lead to reprocessing. Output plugins may succeed, partially succeed, or fail without feedback to the queue, so in-flight output state is not protected.
Duplicates occur when Logstash restarts after an output has succeeded but before the queue page is checkpointed, when a worker crashes mid-processing, or when a non-idempotent output is retried due to transient errors. Slow disk checkpoint latency increases the reprocessing window.
With a large queue.max_bytes the queue can absorb bursts for an extended period, masking downstream stalls. Growth can reflect normal buffering, while disk I/O saturation can cause a hidden stall with stable or slowly growing queue metrics.
Queue type names, defaults and checkpoint behavior have varied across major Logstash releases. Durability depends on queue.type, path.queue permissions and free space, queue.max_bytes, queue.page_capacity and checkpoint settings. Persistent queue shifts pressure to disk I/O; slow disks increase latency and can create hidden backpressure not visible in memory metrics.
queue.type, path.queue, queue.max_bytes, queue.page_capacity and checkpoint settings.max_bytes over time, alongside disk I/O and output latency.One missing diagnostic detail that changes the recommendation: Logstash major version and the specific output plugins in use. Version determines queue defaults and checkpoint semantics, and output type determines whether at-least-once delivery will cause visible duplicate side effects.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.