Why is data egress (data transfer) often a hidden cost, and how do you reduce it?
What they are really testing: Whether you understand egress is charged while ingress is usually free, and the architectural patterns (CDN, locality, caching) that cut it. A classic surprise on the bill.
A real interview question
Why is data egress (data transfer) often a hidden cost, and how do you reduce it?
What most people say
drag me
“Egress is the cost of bandwidth; you reduce it by using less bandwidth.”
Circular. The real insight is that egress (out) is charged while ingress (in) is free, so it hides, and the fixes are architectural, CDN, locality, caching, not vaguely "use less bandwidth".
The follow-ups they ask next
Why does a CDN reduce egress cost?
It caches content at edge locations, so most user requests are served from the CDN (cheaper per GB and closer to the user) instead of egressing from your origin every time. The origin only serves cache misses.
Why can cross-AZ traffic be a cost problem?
Traffic between availability zones is billed. Chatty microservices spread across AZs generate constant inter-AZ transfer that adds up. Keeping tightly-coupled services co-located (same AZ) reduces it, balanced against AZ redundancy needs.
What the interviewer is listening for
- Knows egress charged / ingress free
- Names CDN + locality + caching fixes
- Treats egress as a design consideration
What sinks the answer
- Circular "use less bandwidth"
- Unaware ingress is free
- No architectural fixes
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“Egress hides because [data in is free but data out, internet egress and cross-region/AZ, is billed], so it appears only on the invoice. It comes from [serving files without a CDN, cross-region replication, chatty cross-AZ traffic, bulk exports]. Reduce it with [a CDN to serve from the edge, keeping traffic in-AZ/in-region, compression, and caching]. Treat egress as [a design consideration].”
Keep going with cost
Foundation
What does elasticity mean in the cloud, and how does pay-as-you-go change the cost model compared to running your own servers?
Foundation
What are the main things that drive a cloud bill?
Junior
What is right-sizing, and why is over-provisioning the most common source of cloud waste?
Junior
Compare on-demand, committed/reserved, and spot/preemptible pricing. How do you mix them?
Junior
Why is resource tagging important for cost management?
Mid
How do autoscaling and scheduling reduce cost, and what is an easy win for non-production?
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free