Java 8 has reached end of support
and will be deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Java 8
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Java
8 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you migrate to the latest supported version of Java.
Stay organized with collections
Save and categorize content based on your preferences.
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.
For information about splitting traffic between two or more versions of your
app, see Traffic Splitting.
Before you begin
Before you can configure traffic to a version, ensure that your user account
includes the required privileges.
Migrating traffic gradually
In the standard environment, you can choose to route requests to the target
version, either gradually
or immediately.
By default, warmup requests
are enabled and all traffic is gradually
migrated to a
version.
You can also choose to disable
warmup requests if you want the traffic
immediately migrated to a
version. If you immediately migrate traffic to a new version without any running
instances then you will experience a spike in latency for loading requests.
Deploying a new version with the same name as an existing version causes an
immediate traffic migration. All instances of the old version are immediately
shut down. There will be a latency spike due to loading requests for the new
version.
If warmup requests are enabled, you can migrate traffic between versions that
reside in different environments only by specifying to migrate traffic
immediately.
Adding warmup requests to your application
When warmup requests are enabled, traffic is migrated gradually by first sending
a warmup request to new instances before those instances receive any user
requests. Warmup requests improve user response time by allowing the version
currently receiving traffic to handle those requests but the traffic migration
to the new version can take a short amount of time while the new instances are
created.
When warmup requests are not enabled, user requests are sent to those new
instances before they have been created. Due to the delay caused by creating
the new instances and loading application code, latency can occur for those user
responses.
Select the version to which you want to migrate 100% of the traffic.
Click Migrate traffic.
Optional: When warmup requests are enabled your traffic is
migrated gradually. To migrate traffic immediately, select the option
under the Show advanced options section.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eTraffic migration redirects all requests from one or more existing application versions to a single, designated new version.\u003c/p\u003e\n"],["\u003cp\u003eIn the standard environment, traffic migration can occur gradually, with warmup requests enabled, or immediately, without them, while the flexible environment only supports immediate migration.\u003c/p\u003e\n"],["\u003cp\u003eDeploying a new version with the same name as the current version will immediately migrate traffic to the new version and shut down all instances of the old version.\u003c/p\u003e\n"],["\u003cp\u003eWarmup requests are used for gradual migration, ensuring new instances are ready before user requests are sent to them, thereby reducing potential latency.\u003c/p\u003e\n"],["\u003cp\u003eTraffic migration can be managed through the Google Cloud console, the \u003ccode\u003egcloud\u003c/code\u003e command-line tool, or programmatically via the Admin API.\u003c/p\u003e\n"]]],[],null,["# Migrating Traffic\n\nTraffic migration switches the request routing between the versions within a\nservice of your application, moving traffic from one or more versions to a\nsingle new version.\n\nFor information about splitting traffic between two or more versions of your\napp, see [Traffic Splitting](/appengine/docs/legacy/standard/java/splitting-traffic).\n\nBefore you begin\n----------------\n\nBefore you can configure traffic to a version, ensure that your user account\nincludes the [required privileges](/appengine/docs/legacy/standard/java/access-control#basic_roles).\n\nMigrating traffic gradually\n---------------------------\n\nIn the standard environment, you can choose to route requests to the target\nversion, either gradually\nor immediately.\n\nBy default, [warmup requests](/appengine/docs/legacy/standard/java/warmup-requests)\nare enabled and all traffic is gradually\nmigrated to a\nversion.\n\nYou can also choose to disable\nwarmup requests if you want the traffic\nimmediately migrated to a\nversion. If you immediately migrate traffic to a new version without any running\ninstances then you will experience a spike in latency for loading requests.\nDeploying a new version with the same name as an existing version causes an\nimmediate traffic migration. All instances of the old version are immediately\nshut down. There will be a latency spike due to loading requests for the new\nversion.\n| **Note:** Gradual traffic migration traffic between versions running in the flexible environment is not supported. You must migrate traffic immediately to versions that are running in the flexible environment.\n\nIf warmup requests are enabled, you can migrate traffic between versions that\nreside in different environments only by specifying to migrate traffic\nimmediately.\n\n### Adding warmup requests to your application\n\nWhen warmup requests are enabled, traffic is migrated gradually by first sending\na *warmup request* to new instances before those instances receive any user\nrequests. Warmup requests improve user response time by allowing the version\ncurrently receiving traffic to handle those requests but the traffic migration\nto the new version can take a short amount of time while the new instances are\ncreated.\n\nWhen warmup requests are not enabled, user requests are sent to those new\ninstances before they have been created. Due to the delay caused by creating\nthe new instances and loading application code, latency can occur for those user\nresponses.\n\nFor complete details about enabling warmup requests, see\n[Configuring Warmup Requests to Improve Performance](/appengine/docs/legacy/standard/java/configuring-warmup-requests).\n\n\nMigrating traffic to a new version\n----------------------------------\n\n### Console\n\nTo migrate traffic in the Google Cloud console, go to the Versions page:\n\n[Go to the Versions page](https://console.cloud.google.com/appengine/versions)\n\n1. Select the version to which you want to migrate 100% of the traffic.\n2. Click **Migrate traffic**.\n3. Optional: When warmup requests are enabled your traffic is migrated gradually. To migrate traffic immediately, select the option under the **Show advanced options** section.\n\n### gcloud\n\nAfter installing the [Google Cloud CLI](/sdk/docs), you run the [`gcloud\napp services set-traffic`](/sdk/gcloud/reference/app/services/set-traffic)\ncommand to migrate 100% of traffic to a single version. For example:\n\n- To migrate traffic immediately: \n\n ```bash\n gcloud app services set-traffic [MY_SERVICE] --splits [MY_VERSION]=1\n ```\n- To gradually migrate traffic, you include the optional `--migrate` flag: \n\n ```bash\n gcloud app services set-traffic [MY_SERVICE] --splits [MY_VERSION]=1 --migrate\n ```\n\n### API\n\nTo programmatically migrate traffic, you can use the Admin API,\nsee [Migrating and Splitting\nTraffic](/appengine/docs/admin-api/migrating-splitting-traffic) for details."]]