Skip to content

GKGPipelineLatencyP95High

p95 end-to-end query pipeline latency is above 5 seconds for 10 minutes. Severity s3, fires after 10m.

The 95th percentile of end-to-end pipeline latency (compile, authorize, execute, redact) exceeds 5 seconds. Normal query latency is 2-5s, so this threshold marks the top of the healthy range. ClickHouse execution time dominates the distribution; compilation and redaction are normally milliseconds.

The firing expression, on gkg_query_pipeline_duration_seconds_bucket (emitted by the service, see the metrics catalog):

histogram_quantile(0.95, sum by (env, environment, stage, le) (rate(gkg_query_pipeline_duration_seconds_bucket[5m]))) > 5
  • Silence via Alertmanager filtered on the alertname.
  • 10 minute for rides out short bursts; sustained contention is what fires it.
  • s3, no paging. Users see slow Orbit API responses; 5s is the top of the healthy 2-5s range.
histogram_quantile(0.95, sum by (env, environment, stage, le) (rate(gkg_query_pipeline_duration_seconds_bucket[5m])))

Compare against the execution failure rate and indexer write volume for the same window. Latency rising while indexer throughput rises means read/write contention on the shared graph ClickHouse. Latency rising with a flat write rate points at query mix (heavier queries) or ClickHouse Cloud replica pressure.

SymptomCauseAction
Latency tracks indexer throughputRead/write contention on the shared graph ClickHousePause or scale down the indexer pools; queries recover immediately
Flat write rate, heavier query mixQuery weight or replica pressureClickHouse Cloud vertical autoscaling maximum is a config-mgmt terraform change
First slow queries after a quiet periodClickHouse Cloud idle_scaling wake-upSelf-resolves in minutes; do not scale for it
  • Read/write contention: pause or scale down the indexer pools; queries recover immediately, indexing resumes later without loss.
  • Sustained heavier query mix: ClickHouse Cloud vertical autoscaling has a configured maximum; raising it is a terraform change in config-mgmt (environments/orbit-prd/clickhouse-cloud.tf).
  • After an idle period: idle_scaling wake-up latency self-resolves in minutes; do not scale for it.
  • Graph ClickHouse (ClickHouse Cloud), shared between webserver reads and indexer writes.

Ask in #f_orbit_dev (context_systems).

  • Alert rule (hand-maintained; keep the expr above in sync when tuning it).