Operational runbook · RB-INGEST-01
Recover when ingestion queue lag keeps climbing
Use this procedure after ingest_lag_seconds exceeds 120 for five minutes or producers report blocked or failed event acceptance.
Before changing anything
- Confirm access to the
ingestnamespace and the Ingestion / lag dashboard. - Start an incident note with the page time, current lag, queue depth, replica count, and request p99.
- Do not restart the gateway or delete a queue.
Recovery procedure
target: 15 minName the failing boundary
Open the lag dashboard and identify the queue whose lag is rising. On the current system this is
ingest; after RFC 014 it isingest-aoringest-b.Success: the incident note names one queue, current lag slope, and affected producers.
Check consumer health before scaling
Inspect ready replicas and restart count. If any consumer is crash-looping, do not scale around it; go directly to escalation.
bashkubectl -n ingest get deploy/ingest-consumer kubectl -n ingest get pods -l app=ingest-consumerSuccess: all current replicas are ready and restart count is stable.
Add one consumer replica
Increase the deployment by exactly one replica. Do not exceed six total replicas without Reliability approval.
bashkubectl -n ingest scale deploy/ingest-consumer \ --replicas=$((CURRENT_REPLICAS + 1))Success: the new replica becomes ready and lag slope flattens within three minutes.
Observe, then choose
Watch lag, queue depth, gateway p99, and consumer errors for three minutes.
If lag falls: continue to verification. If lag is flat: observe for two more minutes. If lag rises or a consumer crashes: escalate.
Verify, rollback, or escalate
decisionVerify
Close only on sustained recovery
Lag falls for ten minutes and POST /events p99 remains below 200 ms.
Rollback
Remove the added replica
Return to the previous count if the new replica causes errors. Never delete queues.
Escalate
Stop local changes
After 15 minutes, any crash loop, or rising 5xx: page Platform primary and Reliability.
Record the final replica count, recovery time, peak lag, and whether the documented control changed the slope. Link the incident note before handing back.