← Lessons

quiz vs the machine

Diamond1900

Networking

The Egress Cost Optimization

Why data leaving the cloud quietly drains the budget.

6 min read · advanced · beat Diamond to climb

The Hidden Bill

Most clouds let data in for free but charge for egress, the data that leaves a region or the provider toward the internet. Because each byte is cheap, large or chatty workloads can run up a surprising bill that is hard to notice until it arrives.

Where Egress Hides

The costliest paths are not always obvious.

  • Internet egress to users is charged per gigabyte and grows with traffic.
  • Cross region and sometimes cross zone transfer carry their own charges.
  • Traffic through a NAT gateway is billed for processing on top of the egress itself.

How To Reduce It

Several patterns cut the bill. A content delivery network caches data near users and lowers origin egress. Keeping chatty services in the same zone avoids cross zone transfer. Using private endpoints instead of routing through NAT to a managed service removes both NAT processing and internet egress. Compression and batching shrink the bytes that must leave.

Key idea

Egress is the data leaving a region or the cloud and it is the part you pay for, so caching with a CDN, keeping traffic in one zone, and using private endpoints instead of NAT are the main ways to cut the bill.

Check yourself

Answer to earn rating on the learn ladder.

1. Which direction of data transfer is typically charged?

2. How does a content delivery network reduce egress cost?

3. Why use a private endpoint instead of routing through NAT to a managed service?