Distribute content globally, at scale

Share content globally using a CDN

Deploy an application using Cloud CDN to reach users anywhere.

New customers get $300 in free credits to fully explore and conduct an assessment of Google Cloud.
Who this is for
Developers, Infrastructure Engineers
What you'll deploy
A serverless application that uses Cloud CDN to distribute and share content globally where users are engaging.
How you'll deploy
Once you’ve signed up for Google Cloud, you can deploy through the console.
Overview

What is a CDN?

A content delivery network (CDN) is a system of distributed servers (network of proxy servers) that deliver web pages and other web content to users based on their geographic location. A CDN helps improve the performance of websites by reducing the distance that web pages and other content must travel to reach the user.

CDNs work by caching static content, such as images, JavaScript, and CSS files, on servers that are located closer to the user. When a user requests a web page that is cached on a CDN server, the content is delivered much faster than if it had to be delivered from the original server.

CDNs can also be used to improve the security of websites by distributing the load of incoming traffic across multiple servers. This can help to protect websites from DDoS attacks.

What are good CDN use cases?

Any website that is looking to improve its performance, security, or availability could benefit from using a CDN. Some examples include:

  • Websites with a global audience: CDNs improve website performance for users around the world by caching static content on servers near them.
  • Websites with high traffic: CDNs prevent websites from becoming overloaded by distributing traffic across multiple servers.
  • Websites that host video content: CDNs reduce buffering and lag on websites that host video content by caching video on servers near users.
  • Websites that are vulnerable to DDoS attacks: CDNs protect websites from DDoS attacks by distributing traffic across multiple servers.

How does a CDN fit with my application?

  1. Configure your website: once you have signed up for a CDN service, you will need to configure your website to use the CDN. This will typically involve changing the DNS records for your website to point to the CDN provider's servers.
  2. Monitor your website's performance: once you have configured your website to use the CDN, you should monitor your website's performance to see if the CDN is improving performance. You can use a variety of tools, including Google Analytics.

Some additional tips for using a CDN in your application architecture:

  • Cache only static content. CDNs are most effective for static content, such as images, JavaScript, and CSS files.
  • Use a CDN to improve the performance of your website's assets. Caching assets on servers near users can reduce download times.
  • Use a CDN to improve the security of your website. Distributing traffic across multiple servers can protect from DDoS attacks.
Solution details
Solution architecture
  1. User requests to upload files are routed to the front end using a load balancer
  2. The frontend routes these requests to the backend, which uses Cloud Run.
  3. The backend stores the files (i.e., data) in Cloud Storage and the metadata in Firestore.
  4. User requests to view a file are routed to the Cloud CDN if there is a CDN cache hit.
  5. User requests to view a file are routed to the Cloud Storage if there is a CDN cache miss.
Large data sharing Go

Google Cloud experience level

Beginner

Estimated deployment time

6 min

1 min to configure, 5 min to deploy

New customers get $300 in free credits to fully explore and conduct an assessment of Google Cloud.
Requirements
  • A Google Cloud account with billing enabled
Solution architecture
  1. User requests to upload files are routed to the front end using a load balancer
  2. The frontend routes these requests to the backend, which uses Cloud Run.
  3. The backend stores the files (i.e., data) in Cloud Storage and the metadata in Firestore.
  4. User requests to view a file are routed to the Cloud CDN if there is a CDN cache hit.
  5. User requests to view a file are routed to the Cloud Storage if there is a CDN cache miss.
Large data sharing Java app

Google Cloud experience level

Beginner

Estimated deployment time

6 min

1 min to configure, 5 min to deploy

New customers get $300 in free credits to fully explore and conduct an assessment of Google Cloud.
Requirements
  • A Google Cloud account with billing enabled
Google Cloud
  • ‪English‬
  • ‪Deutsch‬
  • ‪Español‬
  • ‪Español (Latinoamérica)‬
  • ‪Français‬
  • ‪Italiano‬
  • ‪Português (Brasil)‬
  • ‪简体中文‬
  • ‪繁體中文‬
  • ‪日本語‬
  • ‪한국어‬
Console