How do you make Prometheus highly available? [Intermediate]
Answer
I make Prometheus highly available by running two or more identical replicas scraping the same targets, giving each replica a unique external label, and deduplicating results in the query layer or long-term backend. I also keep Alertmanager highly available.
Technical explanation
Prometheus replicas do not coordinate scraping; they independently scrape the same targets.
Deduplication is handled by tools such as Thanos Query or Mimir, based on replica labels.
Alertmanager clustering prevents duplicate notifications when multiple Prometheus replicas fire the same alert.
Hands-on example
Hands-on: deploy prometheus-k8s-0 and prometheus-k8s-1 with external_labels cluster='prod-a' and replica='0'/'1'. Configure both to send alerts to a clustered Alertmanager. In Thanos Query, set replica-label=replica so dashboards show one deduplicated series.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Observability interview questions
- What is the difference between Thanos and Cortex/Mimir at a high level? [Intermediate]
- How does Prometheus integrate with Kubernetes service discovery? [Intermediate]
- What is the Prometheus Operator, and what are ServiceMonitor and PodMonitor? [Intermediate]
- How does Prometheus storage (TSDB) work, and what is the retention model? [Intermediate]
- How does Prometheus handle high cardinality, and why is it a problem? [Intermediate]
- What is an alerting rule, and how does it differ from a recording rule? [Basic]
- What is a recording rule, and when would you use one? [Basic]
- How do you compute a 95th percentile latency from a histogram in PromQL (histogram_quantile)? [Basic]