Question

Difficulty: MediumManaging Networking Resources

A Cloud Engineer needs to update an existing global HTTP(S) load balancer configuration on Google Cloud Platform. Specifically, the connection draining duration for a global backend service named `app-backend-service` must be reduced from 300 seconds to 60 seconds to decrease deployment waiting times during instance updates. Which gcloud command should the engineer execute to apply this change?

  1. gcloud compute backend-services update app-backend-service --global --connection-draining-timeout=60Answer
  2. B
    gcloud compute backend-services set-draining app-backend-service --global --timeout=60s
  3. C
    gcloud compute target-pools update app-backend-service --region=us-central1 --connection-draining-timeout=60
  4. D
    gcloud compute instance-groups managed update app-backend-service --global --draining-timeout=60

Answer

Execute the command `gcloud compute backend-services update app-backend-service --global --connection-draining-timeout=60`.
The correct command uses `gcloud compute backend-services update` targeting `app-backend-service` with the `--global` flag and sets the `--connection-draining-timeout` parameter to 60 seconds.

Step-by-Step Solution

1
Identify the resource type and scope
The resource is a global backend service named `app-backend-service` associated with an HTTP(S) load balancer.
Backend services manage backend instance groups and settings such as health checks, capacity, and connection draining for HTTP(S) load balancers.
2
Determine the correct gcloud command group and flag for connection draining
Use `gcloud compute backend-services update` with the `--global` location scope flag and `--connection-draining-timeout=60`.
Connection draining is a parameter of the backend service resource measured in seconds.

Key Concept

Configuring connection draining timeout on Google Cloud Load Balancer backend services
Estimated Time:1m 30s
Rate this question