Pcornel
Browse topics
Options
Recent
Favorites
Observability · Technical reference

Backpressure and Buffering

Direct answer

Backpressure is how a pipeline reacts when downstream is slower: buffers/queues absorb bursts (memory or disk), then the pipeline slows senders or drops data.

When to use this

Use it when telemetry is delayed or dropped during spikes or backend outages.

First 30 seconds

1. Queue metrics: otelcol_exporter_queue_size vs otelcol_exporter_queue_capacity.

2. Drops: otelcol_exporter_enqueue_failed_*, Fluent Bit retries.

3. memory_limiter refusing data?

4. Persistent queue configured (file_storage).

5. Backend capacity.

Operational verification

burst/outage → queue fills → backpressure → retry or drop

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
OpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformOpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
Scope / prerequisiteUse it when telemetry is delayed or dropped during spikes or backend outages.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

Simulate a backend outage in a test and confirm data is buffered and delivered afterwards. Alert on queue fill above a threshold.

Step 2 Common failures Narrow the fault

Unbounded memory queues crash the collector. Retrying forever blocks newer data. Drops at one stage are invisible if only the final backend is monitored.

Key points

Size queues for expected outage duration. Persistent (disk) queues survive restarts. Decide which data may be dropped first.

Key checks
  • otelcol_exporter_queue_size — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid
ReferenceWhat it is1 section · depth on demand

How it works

When the backend slows or rejects data, exporters retry and queues fill. memory_limiter processors refuse new data to protect the collector. Upstream senders then retry or drop.

ReferenceImportant terms & boundaries3 sections · depth on demand

Handling backpressure

ComponentSetting
OpenTelemetry Collectormemory_limiter processor, sending_queue with persistent storage, retry_on_failure
Fluent Bitstorage.type filesystem, Mem_Buf_Limit
VectorDisk buffers, when_full: block or drop_newest

Decide per data type whether to block (logs for audit) or drop (high-volume debug). Monitor queue size and dropped counters (otelcol_exporter_send_failed_*, otelcol_processor_refused_*).

In depth

Where data waits when the backend is slow

app SDK queue → [network] → collector receiver → memory_limiter → batch → exporter sending_queue → [network] → backend

Every arrow is a place where data either waits (buffer) or is refused (backpressure). A pipeline is only as safe as its smallest unmonitored buffer.

OpenTelemetry Collector settings that matter

processors:
  memory_limiter: { check_interval: 1s, limit_percentage: 80, spike_limit_percentage: 20 }
exporters:
  otlp/backend:
    endpoint: backend:4317
    sending_queue:
      enabled: true
      num_consumers: 10
      queue_size: 5000           # batches (or items, depending on version/config)
      storage: file_storage      # persist across restarts
    retry_on_failure:
      enabled: true
      initial_interval: 5s
      max_interval: 30s
      max_elapsed_time: 300s     # give up after 5 min of retries
extensions:
  file_storage: { directory: /var/lib/otelcol/queue }
  • memory_limiter makes receivers refuse data (clients get a retryable error) instead of the collector being OOM-killed.
  • A persistent queue survives collector restarts; an in-memory queue loses its contents.
  • max_elapsed_time bounds how long one batch is retried, so old data does not block new data forever.

Sizing a buffer

Buffer needed ≈ ingest rate × longest outage to ride out. 20,000 spans/s for a 10-minute backend outage is 12 million spans; at roughly 1 KB each that is ~12 GB of disk queue. If that is too much, decide in advance what to drop first (debug logs, sampled traces) rather than losing everything.

Signals to alert on

otelcol_exporter_queue_size / otelcol_exporter_queue_capacity > 0.8
rate(otelcol_exporter_enqueue_failed_spans_total[5m]) > 0
rate(otelcol_receiver_refused_spans_total[5m]) > 0

Metric names vary slightly by collector version; check the collector's own /metrics output for the exact names.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • Unbounded buffers causing memory exhaustion.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
backpressure and bufferingtelemetry backpressurecollector sending queue
Confirmation

Confirm action

Continue?