How does Prometheus achieve high availability?
AdvancedConceptPrometheus Architecture
Answer
Run two identical replicas scraping the same targets with an external_labels difference (replica: a / replica: b). Both evaluate rules and send alerts to all Alertmanager instances; Alertmanager deduplicates identical alerts.
The replicas do not replicate data to each other, so each may have different gaps. For a single consistent query view, put Thanos Query (dedup on the replica label) or Mimir (HA tracker dedup on cluster/__replica__) in front.
More on Prometheus Architecture
Describe the Prometheus architecture.BeginnerWhat does a basic prometheus.yml look like?BeginnerWhat is the `up` metric?BeginnerWhat are `job` and `instance` labels and where do they come from?BeginnerHow is the Prometheus TSDB organized on disk?AdvancedWhat is the WAL and why does Prometheus restart slowly sometimes?Advanced