Cross-AZ data transfer from metrics and logs agents is a top line in your AWS bill. How do you reduce it?
AdvancedScenarioLong-Term Storage, Scale and Cost
Answer
Situation read → Agents in every AZ send uncompressed data to collectors or ingesters in other AZs; replication factor 3 multiplies it.
What I'd do →
- Measure with VPC Flow Logs or Cost Explorer (
DataTransfer-Regional-Bytes). - Enable compression everywhere: OTLP gRPC
compression: gziporzstd, Loki and remote write already use snappy. - Use topology-aware routing so agents send to collectors in the same zone (
service.kubernetes.io/topology-mode: Auto/trafficDistribution: PreferClose). - Batch more data per request to improve compression.
- Drop and aggregate at the edge before sending.
- For Mimir/Loki, consider zone-aware replication settings and whether replication factor 3 is required for every tenant.
Why → Cross-AZ traffic costs money per GB in both directions, and observability traffic is high-volume.
Interview tip → Show you know where the bytes flow, not just how much storage costs.
More on Long-Term Storage, Scale and Cost
Prometheus keeps 15 days of data, but leadership wants 13 months of metrics for capacity planning. What do you build?IntermediateThe Thanos compactor has halted and the bucket keeps growing. What do you do?AdvancedGrafana shows every series twice after you added a second Prometheus replica with Thanos. How do you fix it?IntermediateRemote write to your central store is falling further behind every hour. How do you handle it?AdvancedMimir rejects writes from a team with `err-mimir-max-series-per-user`. What do you do?IntermediateYour observability SaaS bill tripled in a quarter, driven by custom metrics. How do you bring it down?Intermediate