CertKeen

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?

  1. A.gcloud app instances split default --v2=20
  2. B.gcloud app versions migrate v2 --percent=20
  3. C.gcloud app deploy --version=v2 --traffic=20
  4. 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