0
0
GCPcloud~30 mins

HTTP(S) Load Balancer (Layer 7) in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Create a Basic HTTP(S) Load Balancer on GCP
📖 Scenario: You are setting up a simple web service on Google Cloud Platform (GCP). To distribute incoming web traffic evenly and securely, you want to create an HTTP(S) Load Balancer. This will help your users get fast and reliable access to your website.
🎯 Goal: Build a basic HTTP(S) Load Balancer on GCP that routes traffic to a backend service with an instance group.
📋 What You'll Learn
Create a backend service named my-backend-service
Create a URL map named my-url-map that routes all traffic to the backend service
Create a target HTTP proxy named my-http-proxy linked to the URL map
Create a global forwarding rule named my-forwarding-rule that listens on port 80 and directs traffic to the target HTTP proxy
💡 Why This Matters
🌍 Real World
HTTP(S) Load Balancers are used to distribute web traffic across multiple servers to improve availability and performance.
💼 Career
Understanding how to configure load balancers on cloud platforms like GCP is essential for cloud engineers and infrastructure specialists.
Progress0 / 4 steps
1
Create the backend service
Write a gcloud command to create a backend service called my-backend-service with the protocol set to HTTP.
GCP
Need a hint?

Use gcloud compute backend-services create with the name my-backend-service and specify --protocol=HTTP and --global for a global load balancer.

2
Create the URL map
Write a gcloud command to create a URL map named my-url-map that sends all requests to the backend service my-backend-service.
GCP
Need a hint?

Use gcloud compute url-maps create with the name my-url-map and set --default-service to my-backend-service.

3
Create the target HTTP proxy
Write a gcloud command to create a target HTTP proxy named my-http-proxy that uses the URL map my-url-map.
GCP
Need a hint?

Use gcloud compute target-http-proxies create with the name my-http-proxy and link it to my-url-map using --url-map.

4
Create the global forwarding rule
Write a gcloud command to create a global forwarding rule named my-forwarding-rule that listens on port 80 and directs traffic to the target HTTP proxy my-http-proxy.
GCP
Need a hint?

Use gcloud compute forwarding-rules create with the name my-forwarding-rule, specify --global, set --target-http-proxy to my-http-proxy, and listen on port 80 with --ports=80.