기본적으로 준비 요청이 사용 중지되어 있으므로 트래픽이 특정 버전으로 즉시 마이그레이션됩니다.
또한 트래픽을 특정 버전으로 즉시 마이그레이션하려는 경우에는 준비 요청을 중지하도록 선택할 수 있습니다.
인스턴스 실행 없이 새 버전으로 바로 트래픽 마이그레이션을 하면 로딩 요청의 지연 시간이 급증합니다.
기존 버전과 동일한 이름으로 새 버전을 배포하면 즉시 트래픽 마이그레이션이 수행됩니다. 이때 기존 버전의 모든 인스턴스는 즉시 종료되며 새 버전을 위한 요청 로드로 인해 지연 시간이 급증합니다.
준비 요청을 사용 설정한 경우에는 트래픽을 즉시 마이그레이션하도록 지정해야 다른 환경에 상주하는 버전 간의 트래픽 마이그레이션이 가능합니다.
애플리케이션에 준비 요청 추가
준비 요청을 사용 설정하면 새 인스턴스에서 사용자 요청 수신이 있기 전에 준비 요청을 해당 인스턴스로 보내서 점진적으로 트래픽이 마이그레이션됩니다. 준비 요청을 사용하면 현재 트래픽을 수신하는 버전에서 해당 요청을 처리할 수 있으므로 사용자 응답 시간이 개선되지만, 새 인스턴스가 생성되는 동안 새 버전으로 트래픽을 마이그레이션하는 데 약간의 시간이 걸릴 수 있습니다.
준비 요청을 사용 설정하지 않으면 새 인스턴스가 생성되기 전에 사용자 요청이 새 인스턴스로 전송됩니다. 새 인스턴스를 만들고 애플리케이션 코드를 로드하는 과정에서 초래되는 지연으로 인해 사용자 응답에 지연 시간이 발생할 수 있습니다.
자바를 제외한 모든 런타임에서 지연을 방지하고 준비 요청을 사용 설정하려면 애플리케이션을 App Engine에 배포하기 전에 구성 파일에 inbound_services 요소를 포함시킵니다.
예를 들어 app.yaml 파일에 다음 내용을 포함한 후 App Engine에 배포합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eTraffic migration routes requests from one or more existing application versions to a single new version.\u003c/p\u003e\n"],["\u003cp\u003eTraffic migration can be executed immediately, which will cause a spike in latency due to loading the new version, or gradually if warmup requests are enabled.\u003c/p\u003e\n"],["\u003cp\u003eWarmup requests are recommended, which will gradually migrate traffic to new instances by first sending a warmup request to those instances before sending user requests to avoid latency.\u003c/p\u003e\n"],["\u003cp\u003eThe Google Cloud console and the \u003ccode\u003egcloud app services set-traffic\u003c/code\u003e command, as well as the Admin API can be used to migrate traffic.\u003c/p\u003e\n"],["\u003cp\u003eGradual traffic migration is not supported between versions running in the flexible environment, it must be migrated immediately.\u003c/p\u003e\n"]]],[],null,["# Migrating traffic\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\nGo Java Node.js PHP Python Ruby\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/standard/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/standard/access-control#basic_roles).\n\nMigrating traffic gradually\n---------------------------\n\nYou can choose to route requests to the target\nversion, either gradually or immediately.\n\nBy default,\n[warmup requests](/appengine/docs/standard/configuring-warmup-requests)\n\nare disabled and traffic is migrated immediately to a version.\nYou can also choose to disable warmup requests if you want the traffic\nimmediately migrated to a version.\n\nIf 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 all runtimes except for Java, to avoid latency and enable warmup requests, include\nthe `inbound_services` element in your configuration file before you deploy\nyour application to App Engine.\n\nFor example, you include the following in your\n`app.yaml` file before deploying it to App Engine: \n\n inbound_services:\n - warmup\n\nFor complete details about enabling warmup requests, see\n[Configuring warmup requests to improve performance](/appengine/docs/standard/configuring-warmup-requests).\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 Versions](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."]]