Skip to content

Day 53 of 100

The Unexpected Data Transfer Bill

Cloud CostArchitectureAdvanced20–25 min

πŸ”₯ Problem Statement

This month's cloud bill has one line item standing out sharply from every other: data transfer costs, up significantly, while compute and storage costs are exactly where they've always been. No traffic increase, no user growth, nothing that would obviously explain more data moving around.

πŸ—οΈ Environment

  • Architecture: multi-service, spans two availability zones
  • Compute and storage costs: flat, unchanged month over month
  • Data transfer costs: sharply increased
  • No recent traffic or user-growth change

πŸ€” Your Challenge

Where would you look to explain a data-transfer cost increase specifically, given everything else is flat?

  • What's the difference between traffic volume increasing and the same traffic taking a more expensive network path?
  • Could two services that used to talk to each other within one availability zone now be crossing zones?
  • What's the cost difference, generally, between traffic staying within a zone versus crossing zones or regions?
  • Could external egress specifically β€” not internal service-to-service traffic β€” be the actual driver?

Solution Hidden

Think through the problem yourself before looking at the answer.

πŸ’‘Solution

Step 1 β€” Understand the symptoms

With actual traffic volume flat, a data-transfer cost increase points at the path data is taking, not the amount of data moving. Cloud providers typically price data transfer very differently depending on whether it stays within a single availability zone (often free or minimal), crosses zones within a region, crosses regions entirely, or leaves the cloud provider's network as external egress β€” the same volume of data can cost dramatically different amounts purely based on which of these paths it travels.

Step 2 β€” Identify the likely bottleneck

Something about the architecture's data paths likely changed, even without a corresponding change in total traffic β€” a service that used to talk to a dependency within the same availability zone might now be reaching one in a different zone (following a deployment change, a scaling event that redistributed instances, or a change in which zone a managed service resides in), or a growing share of traffic might have shifted toward external egress rather than staying internal.

Step 3 β€” Investigation

  • Break down data transfer costs by category β€” cross-zone, cross-region, and external egress are usually itemized separately in cloud billing, turning "data transfer is up" into a specific, actionable category.
  • Check for recent deployment or scaling changes that could have altered which availability zone specific instances or replicas land in β€” a scaling event or a deployment that redistributed instances across zones differently than before is a common, easy-to-miss cause.
  • Check whether any service-to-service communication pattern changed recently β€” a new dependency, a migrated database, or a load balancer configuration change that altered which zone traffic routes through.
  • Check whether external egress specifically has grown β€” a new integration, an increase in API responses being returned to external clients, or a CDN/caching change that shifted more traffic to origin rather than edge.

Once the specific category and cause are identified, the fix follows directly: if cross-zone traffic increased due to instance distribution, consider zone-aware routing or co-locating tightly-coupled services within the same zone where reasonable (weighed against the availability benefits of spreading across zones, which is a real tradeoff, not a free win). If external egress grew, evaluate whether a CDN or caching layer could absorb more of that traffic before it reaches origin, reducing egress volume directly.

This is also worth adding to regular cost review β€” tracking data transfer cost by category over time, not just as a total line item, makes a shift like this visible as a trend rather than a surprise on next month's bill.

Step 5 β€” Engineering lesson

Cloud cost isn't just a function of how much compute and storage a system uses β€” where data moves between components matters just as much, and it's a dimension that's easy to overlook because it's rarely visible in day-to-day architecture decisions. A deployment or scaling change that seems purely operational can quietly shift a system's data paths onto more expensive routes, with the cost impact only showing up later, disconnected in time from whatever actually caused it.

🧠 Today’s Takeaway

Cloud cost is influenced by where data moves, not only where it lives.

πŸ”” Don’t Miss Tomorrow’s Challenge

A new real-world engineering challenge is released every day.
100 Days β†’ 100 Challenges β†’ 100 New Things Learned.

Get the useful stuff, not the noise.

Occasional notes on engineering, Platform Engineering, AI, cloud and things I’m learning along the way.

No spam. Unsubscribe anytime.