Cross-AZ data transfer is a top-five line item on the bill. Where does it come from and how do you reduce it?

AdvancedScenarioCost
Answer

Situation read → AWS charges for traffic between AZs in both directions. In Kubernetes, the default is that a request can go to any pod in any AZ, so chatty services multiply it.

What I'd do →

  1. Find the sources with VPC Flow Logs, grouping by source and destination subnet (each subnet maps to an AZ).
  2. Turn on topology-aware routing for in-cluster Services so traffic prefers same-zone endpoints:
apiVersion: v1
kind: Service
metadata:
  name: orders
spec:
  trafficDistribution: PreferClose
  1. Check the obvious ones: Kafka consumers reading from leaders in other AZs (use rack-aware fetching), replication traffic, and a single NAT gateway shared by all AZs.
  2. Keep the ALB's cross-zone balancing in mind, and avoid sending logs or metrics to a collector in another AZ.
  3. Don't trade away resilience: keep replicas in every AZ, only prefer locality.

Why → Locality-aware routing cuts the cost without removing multi-AZ availability.

Interview tip → Say "prefer local, don't pin local"; pinning hurts availability when one AZ is short of pods.

All Real-World Interview questions Roadmap: Interview readiness

More on Cost