[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-20。"],[[["\u003cp\u003eThe \u003ccode\u003eREGION_ID\u003c/code\u003e is a code assigned by Google based on the region selected during app creation, which is included in App Engine URLs for apps created after February 2020.\u003c/p\u003e\n"],["\u003cp\u003eAn App Engine app consists of a single application resource that contains one or more services, with each service deploying multiple versions that run within one or more instances.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine uses services to divide large apps into logical components, allowing for either a single-service app or multiple services configured as microservices.\u003c/p\u003e\n"],["\u003cp\u003eMultiple versions of an app can exist within a service, allowing for quick switching between versions for testing, rollbacks, or other temporary changes, and traffic can be routed to specific or multiple versions.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine instances scale automatically to match the app's load, increasing instances for consistent performance or decreasing them to minimize idle instances and reduce costs.\u003c/p\u003e\n"]]],[],null,["# An overview of App Engine\n\n### Region ID\n\nThe \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e is an abbreviated code that Google assigns\nbased on the region you select when you create your app. The code does not\ncorrespond to a country or province, even though some region IDs may appear\nsimilar to commonly used country and province codes. For apps created after\nFebruary 2020, \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e`.r` is included in\nApp Engine URLs. For existing apps created before this date, the\nregion ID is optional in the URL.\n\nLearn more\n[about region IDs](/appengine/docs/standard/python/how-requests-are-routed#region-id). \nOK\n\nAn App Engine app is made up of a single application resource\nthat consists of one or more *services* . Each service can be configured to use\ndifferent runtimes and to operate with different performance settings. Within\neach service, you deploy *versions* of that service. Each version then runs\nwithin one or more *instances*, depending on how much traffic you configured it\nto handle.\n\nComponents of an application\n----------------------------\n\nYour App Engine app is created under your Google Cloud project when you\ncreate an application resource. The App Engine application is a\ntop-level container that includes the service, version, and instance resources\nthat make up your app. When you create your App Engine app, all your\nresources are created in the region that you choose, including your app code\nalong with a collection of settings, credentials, and your app's metadata.\nLearn more about \"*application resources* \"\n( [standard](/appengine/docs/standard/managing-projects-apps-billing) \\| [flexible](/appengine/docs/flexible/managing-projects-apps-billing) ) and in\nwhich regions you can create them.\n\nEach App Engine application includes at least one service, the `default`\nservice, which can hold many versions, depending on your app's billing status.\nFor more information, see [Limits](#limits) below.\n\nThe following diagram illustrates the hierarchy of an App Engine\napp running with multiple services. In this diagram, the app has two services\nthat contain multiple versions, and two of those versions are actively running\non multiple instances:\n\nOther Google Cloud services, for example Datastore, are\nshared across your App Engine app. For more information, see\n\"*Structuring web services* \"\n( [standard](/appengine/docs/standard/configuration-files) \\| [flexible](/appengine/docs/flexible/configuration-files) ).\n\nServices\n--------\n\nUse *services* in App Engine to factor your large apps into logical\ncomponents that can securely share App Engine features and communicate\nwith one another. Generally, your App Engine services behave like\n[microservices](https://wikipedia.org/wiki/Microservices).\nTherefore, you can run your whole app in a single service or you can design and\ndeploy multiple services to run as a set of microservices.\n\nFor example, an app that handles your customer requests might include separate\nservices that each handle different tasks, such as:\n\n- API requests from mobile devices\n- Internal, administration-type requests\n- Backend processing such as billing pipelines and data analysis\n\nEach service in App Engine consists of the source code from your app and\nthe corresponding App Engine configuration files. The set of files that\nyou deploy to a service represent a single *version* of that service and each\ntime that you deploy to that service, you are creating additional versions\nwithin that same service.\n\nVersions\n--------\n\nHaving multiple versions of your app within each service allows you to quickly\nswitch between different versions of that app for rollbacks, testing, or other\ntemporary events. You can route all traffic to a specific version of your app by\n\"*migrating traffic* \" ( [standard](/appengine/docs/standard/migrating-traffic) \\| [flexible](/appengine/docs/flexible/migrating-traffic) ) or route\nto multiple versions of your app by\n\"*splitting traffic* \" ( [standard](/appengine/docs/standard/splitting-traffic) \\| [flexible](/appengine/docs/flexible/splitting-traffic) ).\n\n\nInstances\n---------\n\nThe versions within your services run on one or more *instances* .\nBy default, App Engine scales your app to match the load. Your apps will\nscale up the number of instances that are running to provide consistent\nperformance, or scale down to minimize idle instances and reduces costs.\nFor more information about instances, see \"*How instances are managed* \"\n( [standard](/appengine/docs/standard/how-instances-are-managed) \\| [flexible](/appengine/docs/flexible/how-instances-are-managed) ).\n\nIn the App Engine flexible environment, instances are backed by Compute Engine resources.\nSome of the resources used by instances in the App Engine flexible environment, such as disk, CPU,\nand memory, count towards the [Compute Engine API quotas](/appengine/docs/flexible/quotas#flex)\nof your project. For more details on how App Engine uses Compute Engine\nresources, see the [App Engine flexible environment overview](/appengine/docs/flexible#features).\n\nApplication requests\n--------------------\n\nEach of your app's services and each of the versions within those services must\nhave a unique name. You can then use those unique names to target and route\ntraffic to specific resources using URLs, for example:\n\n\n`https://`\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e`-dot-`\u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e`-dot-`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003e\u003ca href=\"#appengine-urls\" style=\"border-bottom: 1px dotted #999\" class=\"devsite-dialog-button\" data-modal-dialog-id=\"regional_url\" track-type=\"progressiveHelp\" track-name=\"modalHelp\" track-metadata-goal=\"regionalURL\"\u003eREGION_ID\u003c/a\u003e\u003c/var\u003e`.r.appspot.com`\n\nIncoming user requests are routed to the services or versions that are\nconfigured to handle traffic. You can also target and route requests to specific\nservices and versions. For more information, see\n\"*Communicating between Services* \"\n( [standard](/appengine/docs/standard/communicating-between-services) \\| [flexible](/appengine/docs/flexible/communicating-between-services) ).\n\n### Logging application requests\n\nWhen your application handles a request, it can also write its own logging\nmessages to\n[`stdout` and `stderr`](https://wikipedia.org/wiki/Standard_streams).\nFor details about your app's logs, see \"*Writing Application Logs* \"\n( [standard](/appengine/docs/standard/writing-application-logs) \\| [flexible](/appengine/docs/flexible/writing-application-logs) ).\n\nLimits\n------\n\nBoth the flexible environment and the standard environment share\nthe same limits for services and versions. For example, if you have standard\nversions and flexible versions in the same app, those versions count towards the\nsame limit. For details, see \"*Quotas and limits* \"\n( [standard](/appengine/docs/standard/quotas) \\| [flexible](/appengine/docs/flexible/quotas) )."]]