Migrating Traffic

Traffic migration switches the request routing between the versions within a service of your application, moving traffic from one or more versions to a single new version.

Traffic is migrated immediately between your versions in the flexible environment.

If you want to split traffic between two or more versions of your application, see Traffic Splitting.

Migrating traffic to a new version


To migrate traffic in the GCP Console, go to the Versions page:

Go to the Versions page

  1. Select the version to which you want to migrate 100% of the traffic.
  2. Click Migrate traffic.


After installing the Google Cloud SDK, you run the gcloud app services set-traffic command to migrate 100% of traffic to a single version. For example:

  • To migrate traffic immediately:
    gcloud app services set-traffic [MY_SERVICE] --splits [MY_VERSION]=1


To programmatically migrate traffic, you can use the Admin API, see Migrating and Splitting Traffic for details.

Send feedback about...

App Engine flexible environment for Java docs