Most cost modelling starts with instance hours. For anything serving media, files or APIs at volume, the larger and less predictable number is egress: data leaving the platform.
What gets billed
| Traffic | Typically billed? |
|---|---|
| Inbound from the internet | Usually free |
| Outbound to the internet | Billed, and this is the main cost |
| Between availability zones | Often billed |
| Between regions | Billed |
| Within one zone, private addresses | Usually free |
| Through a NAT gateway | Billed per gigabyte processed, on top of egress |
The asymmetry is the point: uploading is cheap, serving is not.
Where it hurts
- Media and file delivery. Video and images at scale can make egress the largest line on the bill.
- Public APIs returning large payloads to many clients.
- Backups leaving the platform, which is good practice and billed accordingly.
- Chatty microservices across zones, generating internal traffic that is billed without anyone noticing.
- Data platform migrations, where moving a large dataset out is a one-off but substantial charge.
Providers differ enormously
This is one of the largest genuine cost differences between platforms. The hyperscalers price egress relatively high. Several smaller providers include a generous monthly transfer allowance in the plan price, pooled across the account.
- DigitalOcean, Linode and Hetzner include substantial transfer allowances.
- Oracle Cloud is notably more generous than the big three.
- OVHcloud markets unlimited traffic on parts of its range.
For a bandwidth-heavy product this can outweigh every other cost consideration. See AWS vs DigitalOcean.
Reducing egress
- Put a CDN in front. Cached responses are served from the edge, and CDN egress is usually cheaper than origin egress.
- Set cache headers properly. A CDN with a low hit rate is an extra hop, not a saving.
- Compress everything. Gzip or Brotli on text responses cuts bytes directly.
- Right-size media. Serve modern formats and appropriate resolutions rather than one large original.
- Keep chatty services in one zone, and use private addressing so traffic stays internal.
- Watch NAT gateways. Route traffic that does not need them via gateway endpoints where the platform offers them.
- Pull rather than push where possible, since inbound is typically free.
Modelling it before you commit
Estimate average response size times requests per month, then add backups and any cross-zone chatter. Compare that number across shortlisted providers before choosing, because it is where the platforms genuinely diverge.
Set a billing alert regardless. Egress is a common cause of a bill that grows without a matching change in compute. See billing alerts and cost control.
Common questions
Is inbound traffic free everywhere?
Generally yes, but confirm for your provider and services.
Does a CDN always save money?
Only with a decent cache hit rate. Uncacheable dynamic responses gain little.
Is cross-zone traffic really billed?
On several platforms yes. Check before spreading chatty components across zones.