Complete the code to create a load balancer that distributes traffic evenly.
gcloud compute forwarding-rules create my-load-balancer --load-balancing-scheme=[1] --ports=80 --target-pool=my-pool
The load balancing scheme should be EXTERNAL to distribute traffic from the internet to backend instances.
Complete the code to specify the protocol used by the load balancer.
gcloud compute forwarding-rules create my-load-balancer --load-balancing-scheme=EXTERNAL --ports=[1] --target-pool=my-poolPort 80 is used for HTTP traffic, which is common for web load balancing.
Fix the error in the backend service creation command to enable health checks.
gcloud compute backend-services create my-backend --protocol=HTTP --health-checks=[1] --globalThe health check must match the name of the created health check resource, here my-health-check.
Fill both blanks to create a firewall rule allowing load balancer health checks.
gcloud compute firewall-rules create allow-health-checks --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=[1] --source-ranges=[2]
Health checks use TCP port 80 and come from the IP range 130.211.0.0/22.
Fill the blanks to configure a backend service with session affinity and timeout.
gcloud compute backend-services create my-backend --protocol=HTTP --session-affinity=[1] --timeout-sec=[2] --health-checks=my-health-check --global
Session affinity is set to CLIENT_IP to keep user sessions consistent, timeout is 30 seconds.