Video in progress
The system runs in several regions and clusters. How do you design observability so everything is visible in one place, but if one region goes down, the monitoring doesn't go down with it?
Telemetry is collected and stored locally in each region (the write path stays inside the region), while the global view is provided at the query layer through federation. Alerting works independently in each region, and meta-monitoring comes from another region. So if a region goes down, the others don't lose their monitoring, and there is an outside signal about the failed region.
📖 Answer
The two requirements seem to contradict each other: "a single pane" calls for centralization, and "region independence" calls for separation. I reconcile them by separating the write and read paths.
The write path stays inside the region: each region has its own Collectors, metric storage (Mimir or the local part of Thanos), Loki and Tempo. Applications send telemetry only to their own region. If the cross-region network breaks, no data is lost, and you don't pay for cross-region traffic, which is a significant cost at large volumes.
The read path is global: there is one Grafana, but its data sources connect to every region; a Thanos Querier or Mimir federated query combines several regions in one request. The region and cluster labels are mandatory on every signal, and without them the global view gets confusing.
Alerting is local: each region has its own rule evaluation and Alertmanager. An alert tied to a global query goes silent or fires falsely when the cross-region network has problems. For a global SLO (for example "checkout in all regions"), recording rules are computed locally and the results are gathered in the center, so the center receives only small aggregates.
Meta-monitoring comes from outside: another region or an external heartbeat service watches each region's monitoring stack. If region A goes down completely, it can't report on itself, and the watchdog alert in region B says "no heartbeat from A".
Trade-offs:
- global queries are slower, and if one region doesn't respond, the result is incomplete; Grafana has to show this to the user (partial response);
- when a trace crosses a region boundary (for example the gateway in A calls a service in B), the spans end up in two backends; trace search has to query both, or for cross-region calls the spans have to be written to both places;
- a full stack in each region adds operational load. For small regions the compromise is sometimes to keep only the Collector and agent and send storage to the nearest large region.
The important thing is to verify this in a game day, not in a document: artificially "cut off" one region and see whether the dashboards and alerts keep working in the others, and whether a signal arrives about the cut-off region.
Sign up to mark studied questions and save your progress.