请注意,VERSION-dot-SERVICE-dot-PROJECT_ID 的总长度(其中 VERSION 是版本名称,SERVICE
是服务名称,PROJECT_ID 是项目 ID)不得超过 63 个字符,且首尾不能使用连字符。如果组合长度超过 63 个字符,您可能会看到错误 DNS address could not be
found.
[[["易于理解","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, included in App Engine URLs for apps created after February 2020.\u003c/p\u003e\n"],["\u003cp\u003eAn App Engine application consists of services, each with multiple versions that run on instances, allowing for different runtimes and performance settings.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine apps are structured hierarchically, containing at least a \u003ccode\u003edefault\u003c/code\u003e service, which contains multiple versions that allow for rollbacks and traffic management.\u003c/p\u003e\n"],["\u003cp\u003eServices within App Engine are used to divide large applications into logical microservices, enabling them to share features and communicate, running either as one service or multiple.\u003c/p\u003e\n"],["\u003cp\u003eThe number of services and versions an app can deploy, along with the number of instances per service, is limited and depends on whether the app is free or paid.\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/legacy/standard/go111/how-requests-are-routed#region-id). \nOK\n\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](/appengine/docs/legacy/standard/go111/console). The App Engine\napplication is a top-level container that includes the service, version, and\ninstance resources that make up your app. When you create your\nApp Engine app, all your resources are created in the\n[region](/appengine/docs/legacy/standard/go111/locations) that you choose, including your app code\nalong with a collection of settings, credentials, and your app's metadata.\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\nservices](/appengine/docs/legacy/standard/go111/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 traffic to one or more specific versions of your\napp by\n[migrating](/appengine/docs/legacy/standard/go111/migrating-traffic) or\n[splitting](/appengine/docs/legacy/standard/go111/splitting-traffic)\ntraffic.\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\nManaged](/appengine/docs/legacy/standard/go111/how-instances-are-managed).\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\nNote that the combined length of\n\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\"\u003e\u003c/a\u003e\u003c/var\u003e, where\n`VERSION` is the name of your version, `SERVICE\n` is the name of your service, and `PROJECT_ID` is your\nproject ID, cannot be longer than 63 characters and cannot start or end with\na hyphen. If the combined length is\nlonger than 63 characters, you might see Error `DNS address could not be\nfound. `\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 [Communicating Between Services](/appengine/docs/legacy/standard/go111/communicating-between-services).\n\n### Logging application requests\n\nWhen your application handles a request, it can also write its own logging\nmessages to [`stdout` and\n`stderr`](https://wikipedia.org/wiki/Standard_streams). For details about your app's logs, see [Writing Application\nLogs](/appengine/docs/legacy/standard/go111/writing-application-logs).\n\nLimits\n------\n\nThe maximum number of services and versions that you can deploy depends on your app's pricing:\n\n\u003cbr /\u003e\n\nThere is also a limit to the number of instances for each service with basic or\nmanual scaling:\n\nThere is also a limit to the number of characters in the URL of your\napplication."]]