A service request may cross node, zone, and region boundaries on its way to storage, a dependency, or a standby. Providers price these paths differently and sometimes charge both transferred bytes and an intermediate network service. A topology rule that improves resilience or scheduling balance can therefore change recurring transfer cost without changing application request count.
Cross-zone data paths: measure bytes before changing placement
Operational decision
A receipt API writes to a zonal database and reads replicated objects. Map source Pod zone, destination zone, bytes by direction, request frequency, and the service or gateway in between. Compare a normal hour, peak hour, backup copy, and failover rehearsal. The read-only commands below collect Pod and node placement; join their output with flow logs, database metrics, and provider billing records because Kubernetes metadata alone does not count transferred bytes. Distinguish an intentional cross-zone replica write from accidental hairpin traffic through a proxy in a different zone. Test a local-route candidate with real latency and failure injection before moving a critical dependency; a cheaper path that loses access after one zone failure may cost more in downtime. For region-level replication, budget both steady-state change traffic and a full reseed after a disaster. Record compression and retry overhead so the estimate reflects wire bytes, not only payload bytes.
kubectl -n checkout get pods -l app=receipt-api -o wide
kubectl get nodes -L topology.kubernetes.io/zone
kubectl -n checkout get endpointslices -l kubernetes.io/service-name=receipt-db -o wideCost and verification
Transfer cost scales with bytes and path-specific rates; retries, dual writes, and failover can multiply it. The analysis requires a pass over flow or usage records for the chosen time window, with aggregation memory proportional to the number of source-destination pairs. Measure bytes per successful receipt, cross-zone share, failover reseed volume, and p95 latency. Do not hard-code a provider rate in the lesson or assume every same-region path is free; verify current billing terms for the deployed region.
Common Mistakes
- Do not infer transferred bytes from Pod placement alone.
- Do not collapse backup reseed traffic into an average steady-state number.
- Do not remove cross-zone replication solely to lower transfer charges without a recovery test.
Connected lessons
- DevOps: delivery, infrastructure, and reliable operations
- Topology spread: keep replicas out of one failure domain
- Multi-region failover: define write ownership before moving traffic
- DNS cutovers: budget for resolver caches and mixed destinations
- Cloud cost and capacity: assign an owner to each recurring resource
