Cloud CDN pricing (GCP): bandwidth, requests, and origin egress (cache fill)
Start with a calculator if you need a first-pass estimate, then use this guide to validate the assumptions and catch the billing traps.
Cloud CDN pricing becomes predictable when you break it into three drivers, but the real budgeting decision is whether Cloud CDN cost is mainly an edge bandwidth problem, a request-shape problem, or a cache-fill problem caused by weak hit rate. Most surprise bills are caused by cache misses and cold-cache events, not by steady-state hits.
0) Define the boundary (edge vs origin)
- Edge bandwidth: bytes delivered from CDN to end users.
- Origin egress: bytes pulled from origin to CDN on cache miss/fill.
- Requests: request count at the edge; keep a separate count for origin if your origin pricing cares.
1) Edge bandwidth (GB/month)
Use a representative traffic window. If you only have RPS, estimate transfer from response size and request volume. If you have a few very large endpoints (downloads, media), model them separately.
Tools: CDN bandwidth, Response transfer, Unit converter.
2) Requests (per month)
Convert RPS to monthly requests and keep units explicit (per 10k vs per 1M). Request fees often dominate for API-like traffic with small payloads.
Tools: RPS to monthly requests, CDN request fees.
- Keep a peak scenario for bot spikes and incident traffic.
- If you have many small objects per page, request counts scale faster than bandwidth.
3) Origin egress (cache fill)
Origin egress is driven by cache misses. A practical estimate is: origin GB ~= edge GB * (1 - hit rate). Purges, deploys, and low TTLs reduce hit rate and increase cache fill.
Tool: Data egress cost.
- Model large objects separately: one download path can dominate origin GB even when overall hit rate looks healthy.
- Track cold cache events: a purge plus a large deploy can temporarily turn most traffic into cache fill.
Worked estimate template (copy/paste)
- Edge requests/month = baseline + peak
- Edge GB/month = requests/month * avg response size (GB) (split big endpoints)
- Origin GB/month ~= edge GB/month * (1 - hit rate)
Common pitfalls
- Double-counting edge bandwidth and origin egress.
- Using one blended response size when a few endpoints dominate bytes.
- Ignoring purge/deploy behavior and cold-cache events.
- Mixing request pricing units (per 10k vs per 1M).
- Assuming hit rate is stable; it varies by path, TTL, and cache key configuration.
How to validate
- Validate cache hit rate overall and by path, and measure changes during deploys/purges.
- Validate top endpoints by bytes and request volume (avoid blended averages).
- Validate peak windows where retries or bot traffic increase requests and bandwidth.