How to get started with Google Cloud CDN?
There are a few steps that you need to follow to start with Google Cloud CDN.
Step 1: Create an account in the Google Cloud Platform (GCP):
Follow the below steps to create an account in the Google Cloud platform:
- Visit the Google Cloud platform website.
- Click on the “Get started for free” button.
- Sign in with your Google account. If you don’t have an account then click on Create account.
- After signing in, you need to select your country and click on “Agree & Continue”.
- Click on create a new payment profile. Then you need to fill in the required information such as profile type, Organization name, legal name, proper address, etc.
- Then, add the payment method and click on “Start Free”.
- After completion of the payment you also can access the Google Cloud console.
Step 2: Create a health check in GCP:
A health check in the Google Cloud Platform is necessary to determine whether the server is healthy. If a server can’t respond to any query then the load balancer will mark that as unhealthy and will stop sending the traffic.
To create a health checker you need to follow the below steps :
- Login to your Google Cloud Platform (GCP).
- Go to the Health check section under the compute engine.
- Click on the “Create a health check” button.
- Enter the required information such as name, Protocol (select HTTP), port, request path that will be a working context root, and health criteria (adjust as necessary).
- Click on “Create”.
Step 3: Create an instance group:
We use instance groups to set up the load balancing. It is also known as the backend service for load balancer (LB). By following the below steps you can Create an instance group in Google Cloud Platform.
- Go to the Instance groups under the compute engine.
- Click on “Create instance group”.
- Fill in the required information:
- Name: give a proper name of the instance group.
- Location: Select “single Zone”
- Zone: The zone where your server is running
- Group type: Click on “unmanaged instance group”
- Network: should be the default
- VM instances: select the server from the list.
- Click on “Create”.
Step 4: Create a load balancer (LB)
After creating instance groups, we need to create a load balancer :
- Find network service, then go to “Load balancing”.
- Click on “Create on load balancer”.
- Select the name of a load balancer.
- Add a backend service.
- Add the instance group that is already created.
- Choose the health check that you already created.
- Click on “Create”.
Step 5: Connect Google Cloud CDN
Now, all setups are done. It’s time to enable Google Cloud CDN :
- Go to Cloud CDN in network service.
- Click on “Add origin”.
- Add your load balancer from the origin drop-down.
Now, your Google Cloud CDN is enabled.
How To Setup Google Cloud CDN?
A Google Cloud CDN (Content Delivery Network) uses the Google global network to serve static resources such as media files like images and videos, CSS stylesheets, JavaScript files, and so on with lower latency and higher transfer speed. This cloud CDN will permit users to access the webpage content from the nearest edge location. Google Cloud CDN also reduces the stress on the backend server by sharing the content with the cloud CDN, which is available in 130+ edge locations.
Google Cloud CDN works with a load balancer to deliver the content to the end user. When users request any content from a website, that request will arrive at the edge of the Google network that is nearest to them.
- If the requested content is not present at the edge location server, Google Cloud CDN (Content Delivery Network) retrieves the requested content from the backend, which means the original server. This is also known as “Cache Miss.”
- In a content delivery network such as Google Cloud CDN, if the requested content is present, then CDN can fulfill the request of the user. This is known as a “Cache Hit”
Contact Us