GCP offers two CDN services — Cloud CDN (general-purpose web/API acceleration) and Media CDN (purpose-built for video streaming, running on YouTube's infrastructure). This article walks through their differences, configuration, pricing, and how they stack up against AWS CloudFront and Cloudflare.
| Item | Cloud CDN | Media CDN |
|---|---|---|
| Primary use | Web / API / images | Video streaming |
| Infrastructure | Google Edge | YouTube infrastructure |
| Load balancer integration | Required (Global External HTTPS LB) | Standalone service |
| Billing unit | GB + requests | GB (strong volume discounts) |
| Video-specific features | — | HLS / DASH passthrough, manifest editing |
| QUIC / HTTP/3 | Yes | Yes |
# Enable CDN on the backend service gcloud compute backend-services update my-backend \ --enable-cdn \ --cache-mode=CACHE_ALL_STATIC \ --default-ttl=3600 \ --max-ttl=86400 \ --negative-caching \ --serve-while-stale=86400 \ --global # Cache Invalidation gcloud compute url-maps invalidate-cdn-cache my-lb \ --path "/static/*" --global
| Item | Price |
|---|---|
| Cache Egress (US/EU) | $0.08/GB (first 10 TB) |
| Cache Egress (APAC) | $0.20/GB |
| Cache Fill (Origin → CDN) | $0.04/GB |
| Cache Lookup Request | $0.0075/10K |
| Cache Invalidation | $0.005/Invalidation |
| Monthly transfer | Price (US, $/GB) |
|---|---|
| 0-10 TB | $0.04 |
| 10-500 TB | $0.03 |
| 500 TB-5 PB | $0.025 |
| Over 5 PB | Custom |
| Item | Cloud CDN | Media CDN | CloudFront | Cloudflare |
|---|---|---|---|---|
| PoP count | 100+ | 200+ (YouTube) | 600+ | 320+ (largest) |
| HTTP/3 | Yes | Yes | Yes | Yes |
| Edge Compute | — | — | Lambda@Edge | Workers |
| WAF | Cloud Armor integration | Cloud Armor integration | AWS WAF | Cloudflare WAF |
| Price (US/EU) | From $0.08/GB | From $0.04/GB | From $0.085/GB | Free tier available |
What is the difference between Cloud CDN and Media CDN?
Cloud CDN is a general-purpose web/API cache integrated with the HTTPS Load Balancer. Media CDN is purpose-built for video streaming and runs on YouTube's infrastructure. For large-scale video delivery, Media CDN has a decisive advantage.
Can Cloud CDN be used standalone?
No. You enable it on a Backend Bucket or Backend Service of a Global External HTTPS Load Balancer, so a load balancer is required. Origins can be GCS, Cloud Run, GKE, or an external HTTPS endpoint.
How is pricing structured?
Cloud CDN charges for cache fill ($0.04-0.20/GB), cache egress ($0.02-0.20/GB), and per-request fees. Media CDN offers volume discounts for large traffic, starting at $0.04/GB on the Standard tier.
How do you configure the cache key?
You can pick URL plus query string, headers, and cookies as cache key components. Careful design is critical to avoid duplicate cache entries for the same content.
How does cache invalidation work?
You invalidate by URL pattern from the console, API, or gcloud. The limit is 100 invalidations per minute and changes propagate within a few seconds.
How does it relate to Cloud Armor?
The request path is HTTPS LB → Cloud Armor (WAF) → Cloud CDN (cache) → Origin. Combining both gives you security and performance at the same time.
Are Signed URLs and Signed Cookies supported?
Both are supported. You can enforce time-limited access, geo restrictions, and user-auth integration directly at the edge.
How does it compare to AWS CloudFront and Cloudflare?
CloudFront brings deep AWS integration and Lambda@Edge. Cloudflare has the largest global PoP footprint. Cloud CDN gives you 100+ Google PoPs with bundled pricing. For video, Media CDN's YouTube-grade infrastructure is in a class of its own.
Related Articles: CDN / Delivery
GCP vs AWS Storage & DB Comparison (2026)
Cloud Storage vs. S3, BigQuery vs. Redshift, Spanner vs. Aurora. Honest feature-by-feature comparison.
Cloud Storage Complete Guide: Buckets, Classes, Lifecycle (2026)
Cloud Storage fundamentals — storage classes, lifecycle, signed URLs, common access patterns.
Cloud Pub/Sub Complete Guide (2026)
Pub/Sub fundamentals — topics, subscriptions, delivery types, dead-letter, ordering. The async messaging backbone.
GCP vs AWS Compute Comparison: GKE, Cloud Run, Functions vs EKS, Fargate, Lambda (2026)
Compute service comparison — feature parity, pricing, ergonomics. The decision framework for multi-cloud.
Google Cloud is a trademark of Google LLC. For the latest information, see the official Cloud CDN docs and Media CDN docs.
Practice with certification-focused question sets
Go to GCP exam prepNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Google Cloud Certification Roadmap (2026)
Choose your GCP certification path — Foundational, Associate...
CDL Cloud Digital Leader: Complete Exam Guide (2026)
Pass the Cloud Digital Leader exam — cloud business value, G...
GAIL Generative AI Leader: Complete Exam Guide (2026)
Pass the Generative AI Leader exam — Gemini, Vertex AI, Work...
Vertex AI Fundamentals for GCP Certs (2026)
Vertex AI basics every cert candidate needs — Workbench, Pip...
Associate Cloud Engineer (ACE): Complete Guide (2026)
Pass the Associate Cloud Engineer exam — Console, gcloud, pr...