@@ -109,3 +109,73 @@ Cortex will not return any data.
109109
110110Therefore, the ` __replica__ ` label should only be added for remote write.
111111
112+ ## Accept multiple HA pairs in single request
113+ Let's assume there are two teams (T1 and T2), and each team operates two Prometheus for the HA (T1.a, T1.b for T1 and
114+ T2.a, T2.b for T2).
115+ They want to operate another Prometheus, receiving whole Prometheus requests and sending write request to the
116+ Distributor.
117+
118+ The write request flow is as follows: T1.a, T1.b, T2.a, T2.b -> Prometheus -> Distributor which means the Distributor's
119+ incoming write request contains time series of T1.a, T1.b, T2.a, and T2.b.
120+ In other words, there are two HA pairs in a single write request, and the expected push result is to accept each
121+ Prometheus leader replicas (example: T1.a, T2.b for each team).
122+
123+ ## Config
124+ ### Client side
125+ The client setting is the same as a single HA pair.
126+ For example:
127+
128+ For T1.a
129+ ```
130+ cluster: prom-team1
131+ __replica__: replica1 (or pod-name)
132+ ```
133+
134+ For T1.b
135+
136+ ```
137+ cluster: prom-team1
138+ __replica__: replica2 (or pod-name)
139+ ```
140+
141+ For T2.a
142+
143+ ```
144+ cluster: prom-team2
145+ __replica__: replica1 (or pod-name)
146+ ```
147+
148+ For T2.b
149+
150+ ```
151+ cluster: prom-team2
152+ __replica__: replica2 (or pod-name)
153+ ```
154+
155+ ### Server side
156+
157+ One additional setting is needed to accept multiple HA pairs; it is enabled via
158+ ` --experimental.distributor.ha-tracker.mixed-ha-samples=true ` (or its YAML config option).
159+
160+ The following configuration snippet shows an example of accepting multiple HA pairs config via the YAML config file:
161+
162+ ``` yaml
163+ limits :
164+ ...
165+ accept_ha_samples : true
166+ accept_mixed_ha_samples : true
167+ ...
168+ distributor :
169+ ...
170+ ha_tracker :
171+ enable_ha_tracker : true
172+ ...
173+ kvstore :
174+ [ store : <string> | default = "consul" ]
175+ [ consul | etcd : <config> ]
176+ ...
177+ ...
178+ ```
179+
180+ For further configuration file documentation, see
181+ the [ limits section] ( ../configuration/config-file-reference.md#limits_config ) .
0 commit comments