Google Cloud Associate Cloud Engineer · Free practice question 4 of 12
App Engine traffic splitting between versions
Halcyon Tours deployed version v2 of its App Engine default service alongside v1. It wants 20% of users to reach v2 while 80% stay on v1. Which command does this?
- A.gcloud app instances split default --v2=20
- B.gcloud app versions migrate v2 --percent=20
- C.gcloud app deploy --version=v2 --traffic=20
- D.gcloud app services set-traffic default --splits=v1=0.8,v2=0.2
Show answer and explanation
Correct answer: D. gcloud app services set-traffic default --splits=v1=0.8,v2=0.2
Why: gcloud app services set-traffic with the --splits flag distributes traffic between versions using fractional weights. Deploying a version does not accept a percentage for traffic, gcloud app versions migrate moves all traffic to a version rather than a fraction, and gcloud app instances has no split command.
More free Google Cloud Associate Cloud Engineer questions
- Coldline minimum storage duration charge
- Cloud Run jobs for run-to-completion tasks
- Auto mode VPC creates regional subnets
- gcloud config list active settings
- Globally unique Cloud Storage bucket names
- bq load CSV into a table
- kubectl rollout undo for bad releases
- Browser role for hierarchy visibility
- Log Analytics SQL queries on logs
- Cloud SQL Auth Proxy benefits
- Secret Manager for application credentials