GCP Associate Cloud Engineer Practice Question 31: App Engine Traffic Splitting
Google Cloud Associate Cloud Engineer · Test 4 · question 1 of 10
An App Engine standard application serves all of its traffic from version v1. You want to test a new version with 10 percent of the users and send the remaining 90 percent to v1, and to be able to shift the split back instantly if problems appear.
What should you do?
Show answer and explanation
Answer:
App Engine keeps multiple versions of a service side by side. Deploying with --no-promote avoids sending traffic to the new version immediately, and gcloud app services set-traffic default --splits v1=.9,v2=.1 distributes requests between versions. Reverting is one command that sets the split back to v1=1.
Option A adds a second application and DNS weights that are far less precise and slower to change. Option B overwrites v1, so there is nothing to fall back to, and an instance class is a size, not a traffic share. Option C would send 100 percent of the traffic to the new version as soon as it is promoted, and adjusting instance counts does not control the traffic split.
Reference: Splitting traffic (App Engine standard)