A microservice estate spread across three availability zones has a large unexplained network charge. Explain and fix.
Show the full answer Hide the answer
What the interviewer is testing
Whether you know that cross-zone traffic is billed in both directions and how architecture drives it.
The explanation
Cross-availability-zone data transfer is charged, typically in both directions, and nothing in the default configuration keeps traffic within a zone.
With services spread across three zones and load balancing that distributes without zone preference, roughly two-thirds of every internal call crosses a zone boundary. In a chatty estate where one user request produces a dozen internal calls, that multiplies quickly — and the same applies to database replication, cache access and message broker traffic.
The charge appears as a network line item with no owner, which is why it goes unexplained.
The fixes
Zone-aware routing. Prefer endpoints in the same zone, falling back across zones only when local capacity is unavailable. Service meshes and modern load balancers support this directly, and it typically eliminates the majority of the charge while also reducing latency.
The important detail: retain cross-zone failover. Locality preference must degrade to cross-zone rather than failing, or you have traded cost for availability.
Zone-aware consumption for message brokers, reading from a local replica rather than always from the leader.
Read replicas per zone for read-heavy database access.
Compression on high-volume internal paths.
Reduce the chattiness itself, which is the architectural fix: if one user request generates a dozen internal calls, the boundaries may be wrong. That addresses latency and reliability as well as cost.
The trade to be explicit about
Zone-aware routing slightly reduces load distribution evenness and can concentrate load if capacity per zone is uneven. Capacity must be balanced across zones for it to work well, and headroom must still cover the loss of a zone.
What a strong answer adds
Noting that multi-zone deployment is a deliberate purchase of fault tolerance, so the answer is never to consolidate into one zone. The goal is to keep the fault tolerance and stop paying for traffic patterns nobody chose.
Common weak answers
Consolidating to a single zone. Accepting the cost as inherent to multi-zone.