You run 3 Kubernetes clusters. Compare federation, remote_write and Thanos sidecar for a global view.
AdvancedScenarioPrometheus and PromQL at Scale
Answer
Situation read → You need cross-cluster queries and long retention. Each approach differs in cost, complexity and failure modes.
What I'd do → Compare:
- Federation: a global Prometheus scrapes
/federatefrom each cluster. Simple, but only works for a small, selected set of aggregated series. Not for raw data. - remote_write to Mimir/Cortex/Thanos Receive/VictoriaMetrics: central ingestion, global query, long retention, multi-tenancy. Needs a durable central system and network egress.
- Thanos Sidecar + Querier: Prometheus stays local, blocks upload to object storage, Querier fans out. No central write path, but you operate Thanos components.
- I would pick remote_write to Mimir for 3+ clusters needing HA and multi-tenancy, and sidecar when I want to keep local autonomy.
Why → Federation is a stopgap, while the others are real long-term architectures.
Interview tip → State trade-offs first, then your choice.
More on Prometheus and PromQL at Scale
Prometheus memory has grown to 60 GB and keeps climbing. How do you find the cause?IntermediateA developer added `user_id` as a metric label. What is the problem and what do you advise?BeginnerYour dashboard shows the average of per-pod p99 latencies. Why is it wrong, and how do you compute a correct fleet-wide p99?IntermediateChoose histogram bucket boundaries for a service with a 300 ms latency SLO.AdvancedYou have 500 short-lived batch jobs that finish before Prometheus can scrape them. How do you capture their metrics?IntermediateYour EC2 fleet autoscales constantly. How do you keep Prometheus targets up to date?Intermediate