Egress
Outbound data transfer from a network or cloud provider. In CDN and cloud contexts, egress traffic is typically metered and billed, often the largest line item on your infrastructure bill.
Full Explanation
Egress is data leaving a network. When your server sends a response to a user, that's egress. When a CDN edge serves a cached image, that's egress from the CDN. When your origin sends a cache miss response to the CDN, that's egress from your cloud provider. Egress is what you pay for, and it's usually the most expensive part of serving content at scale.
Cloud provider egress pricing is notoriously high and varies wildly by provider and destination. AWS charges around $0.09/GB for internet egress (with volume discounts), Google Cloud is similar, and Azure is in the same range. Transferring 100 TB/month from AWS costs roughly $8,500. This "cloud tax" on egress is one of the primary reasons CDNs exist as a business.
CDN egress is typically much cheaper than cloud egress. Cloudflare famously charges zero for egress (bandwidth is included in all plans). Fastly charges around $0.08/GB. CloudFront gives you reduced rates compared to direct AWS egress. The CDN can offer cheaper bandwidth because they peer directly with ISPs at internet exchange points, avoiding the transit costs that cloud providers pass along.
The math usually works out heavily in favor of CDNs. Say you serve 50 TB/month. Direct from AWS: ~$4,500 in egress. Through CloudFront: ~$2,000. Through Cloudflare: $0 in egress (you pay the plan fee). Even with CDN costs factored in, the savings are substantial. This is why nearly every high-traffic site uses a CDN regardless of other benefits.
Architecture decisions should account for egress costs. Put your origin in the same region as your CDN's shield/mid-tier to minimize origin egress. Use cache-friendly patterns (long TTLs, proper Cache-Control) to maximize hit rate and reduce origin egress. Consider multi-CDN setups where one CDN peers well with specific ISPs, reducing overall transit costs.
Cross-region and cross-cloud egress adds another layer. Transferring data between AWS regions costs $0.01-0.02/GB. Transferring between clouds (AWS to GCP) costs standard internet egress rates. If you run a multi-region or multi-cloud setup, these internal egress costs add up fast. Some CDN providers offer private network interconnect that can reduce these costs.
Ingress (data coming in) is almost always free across all major providers. This asymmetry is deliberate: providers want you to upload data to their platform (sticky) but charge you to take it out (lock-in). This has led to the Bandwidth Alliance where some providers agree to waive or reduce egress fees between each other.
Examples
# Estimate monthly egress costs
# AWS S3 → Internet: ~$0.09/GB
# AWS S3 → CloudFront: $0.00/GB (free to CF)
# CloudFront → Internet: ~$0.085/GB (varies by region)
# Check AWS egress with Cost Explorer
aws ce get-cost-and-usage \
--time-period Start=2026-02-01,End=2026-03-01 \
--granularity MONTHLY \
--metrics BlendedCost \
--filter '{"Dimensions":{"Key":"USAGE_TYPE","Values":["DataTransfer-Out-Bytes"]}}'
# Monitor egress with CloudWatch
aws cloudwatch get-metric-statistics \
--namespace AWS/CloudFront \
--metric-name BytesDownloaded \
--period 86400 --statistics Sum \
--start-time 2026-03-01 --end-time 2026-03-15
# Nginx: track egress per response
log_format egress '$remote_addr $body_bytes_sent '
'$upstream_bytes_sent $request_uri';
# Quick egress estimate from access logs
awk '{sum += $2} END {printf "%.2f GB\n", sum/1073741824}' \
/var/log/nginx/access.log
Frequently Asked Questions
Outbound data transfer from a network or cloud provider. In CDN and cloud contexts, egress traffic is typically metered and billed, often the largest line item on your infrastructure bill.
# Estimate monthly egress costs
# AWS S3 → Internet: ~$0.09/GB
# AWS S3 → CloudFront: $0.00/GB (free to CF)
# CloudFront → Internet: ~$0.085/GB (varies by region)
# Check AWS egress with Cost Explorer
aws ce get-cost-and-usage \
--time-period Start=2026-02-01,End=2026-03-01 \
--granularity MONTHLY \
--metrics BlendedCost \
--filter '{"Dimensions":{"Key":"USAGE_TYPE","Values":["DataTransfer-Out-Bytes"]}}'
# Monitor egress with CloudWatch
aws cloudwatch get-metric-statistics \
--namespace AWS/CloudFront \
--metric-name BytesDownloaded \
--period 86400 --statistics Sum \
--start-time 2026-03-01 --end-time 2026-03-15
# Nginx: track egress per response
log_format egress '$remote_addr $body_bytes_sent '
'$upstream_bytes_sent $request_uri';
# Quick egress estimate from access logs
awk '{sum += $2} END {printf "%.2f GB\n", sum/1073741824}' \
/var/log/nginx/access.log
Related CDN concepts include:
- Origin Shield — A mid-tier cache layer that sits between edge servers and the origin. Aggregates cache misses …
- Bandwidth — The maximum data transfer rate of a network link, measured in bits per second (Mbps, …
- Cache Hit Ratio (CHR) — The percentage of requests served from cache versus total requests. A CHR of 95% means …
- Throughput — The actual amount of data transferred per unit of time. Unlike bandwidth (maximum capacity), throughput …