Skip to content

docs: add usage guidance for downstream_sink_latency metric #19796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/current/observability/changefeeds/downstream_sink_latency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Monitor downstream_sink_latency in Changefeeds
summary: How to interpret and monitor the downstream sink latency metric to detect bottlenecks in CockroachDB changefeeds.
---

#### Downstream sink acknowledgment latency

**Metric**: `changefeed.stage.downstream_sink_latency`

Measures the time it takes for a downstream sink (e.g., Kafka, cloud storage, webhook) to acknowledge messages. High values may indicate bottlenecks or backpressure at the end of the pipeline.

**When it's high**:
- Sink is slow to ACK; may cause backpressure or stall the changefeed.

**Possible causes**:
- Network latency between CockroachDB and the sink
- Throttling or limits on the sink
- Large payloads or inefficient encoding
- Sink I/O capacity constraints (e.g., disk, Kafka throughput)

**Where to monitor**:
- CockroachDB Admin UI → *Metrics → Changefeeds*
- Prometheus/Grafana if metrics are scraped

**Suggested alert**:
- For example: `changefeed.stage.downstream_sink_latency: p95 > 1s over 1m`, sustained

**Mitigation strategies**:
- Scale the sink or increase throughput
- Enable batching or compression
- Tune changefeed sink settings (partitioning, parallelism)
- Diagnose with logs and sink system metrics
Loading