You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Cloud CDN (Content Delivery Network) accelerates content delivery by caching your content at Google's globally distributed edge points of presence (PoPs). It works seamlessly with the External HTTP(S) Load Balancer to reduce latency, lower origin load, and improve user experience for web applications and APIs.
Cloud CDN is a globally distributed caching layer that sits in front of your backends. When a user requests content, Cloud CDN checks if a cached copy exists at the nearest edge PoP. If it does (a cache hit), the content is served directly from the edge — no round trip to your origin. If not (a cache miss), the request is forwarded to your backend, and the response is cached for future requests.
Key benefits:
The cache key determines what constitutes a unique cacheable object. By default, the cache key includes:
You can customise cache keys to include or exclude:
This is useful for serving different cached content to different user segments.
Cloud CDN is enabled per backend service on an External HTTP(S) Load Balancer:
gcloud compute backend-services update my-backend-service \
--enable-cdn \
--global
For backend buckets (Cloud Storage serving static assets):
gcloud compute backend-buckets update my-bucket-backend \
--enable-cdn
Cloud CDN offers three cache modes:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.