Runbook
Ingestion queue lag is climbing
When to use
Page: ingest_lag_seconds above 120s for five minutes, or a producer report that POST /events is 202-shedding.
Preconditions
- On-call has
kubectlaccess to the ingestion namespace. - Dashboard: Ingestion / lag (no credentials in this document).
Steps
- Open the lag dashboard. Confirm which queue (
ingesttoday;ingest-aoringest-bafter RFC 014). Success: one queue named. - Check consumer restart count. If crashing, jump to Escalation.
- If consumers are up and lag is still climbing, scale the consumer group by one replica:
bashkubectl -n ingest scale deploy/ingest-consumer --replicas=$(($(kubectl -n ingest get deploy/ingest-consumer -o jsonpath='{.spec.replicas}')+1))Success: replica count increased by one; lag slope flattens within three minutes. - If lag does not flatten, shed is already happening at the dispatcher — do not restart the gateway. Go to Escalation.
Verification
ingest_lag_seconds falling for ten minutes, and POST /events p99 under 200ms.
Rollback
Scale the consumer group back to the previous replica count. Do not delete queues.
Escalation
After 15 minutes without a falling lag, or any consumer crashloop: page Platform primary, then Reliability. Stop changing replica counts.