Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
ID regione
REGION_ID è un codice abbreviato assegnato da Google in base alla regione selezionata quando crei l'app. Il codice non corrisponde a un paese o a una provincia, anche se alcuni ID regione possono sembrare simili ai codici di paesi e province di uso comune. Per le app create dopo febbraio 2020, REGION_ID.r è incluso negli URL di App Engine. Per le app esistenti create prima di questa data, l'ID regione è facoltativo nell'URL.
Puoi utilizzare vari metodi per comunicare tra i tuoi servizi App Engine o con altri servizi, inclusi i servizi Google Cloud e le applicazioni esterne.
L'approccio più semplice per comunicare con il servizio App Engine è inviare richieste HTTP mirate, in cui l'URL include il nome o l'ID di una risorsa. Ad esempio, puoi includere l'ID di un servizio o di una versione che vuoi scegliere come target, oltre all' Google Cloud ID progetto corrispondente:
Tieni presente che la lunghezza combinata di VERSION-dot-SERVICE-dot-PROJECT_ID, dove VERSION è il nome della versione, SERVICE
è il nome del servizio e PROJECT_ID è l'ID progetto, non può superare i 63 caratteri e non può iniziare o terminare con un trattino. Se la lunghezza combinata è superiore a 63 caratteri, potresti visualizzare l'errore DNS address could not be
found.
I servizi App Engine possono comunicare anche utilizzando
Pub/Sub, che fornisce messaggistica asincrona affidabile
many-to-many tra i processi, incluso App Engine. Queste
procedure possono essere singole istanze della tua applicazione, dei tuoi servizi o persino
applicazioni esterne.
Puoi consentire a un servizio flessibile App Engine di comunicare con un altro servizio App Engine nello stesso progetto senza dover esporre il servizio di destinazione alla rete internet pubblica.
Configura le impostazioni di ingresso del servizio di destinazione per consentire solo il traffico "interno".
Assicurati che la versione dell'app di origine non sia di cui è stato eseguito il deployment in una rete VPC condiviso condivisa
in un progetto diverso.
Comunicazione tra servizi in progetti diversi
Puoi avere accesso privato tra Google Cloud progetti quando le app in esecuzione
nei progetti appartengono a una rete VPC condiviso configurata per invocare un'app in esecuzione nel progetto host della rete VPC condiviso.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eREGION_ID\u003c/code\u003e is a Google-assigned code based on the selected region when creating an app, and it's included in App Engine URLs for apps created after February 2020, but optional for older apps.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine services can communicate through targeted HTTP requests using URLs that include the service, version, project ID, and \u003ccode\u003eREGION_ID\u003c/code\u003e, although the combined length of these components cannot exceed 63 characters.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine supports communication via Pub/Sub for asynchronous messaging between instances, services, or external applications.\u003c/p\u003e\n"],["\u003cp\u003ePrivate communication between App Engine services within the same project is possible by configuring the destination service's ingress settings to allow only internal traffic.\u003c/p\u003e\n"],["\u003cp\u003eApp engine has restrictions on reserved URL paths, like those ending in \u003ccode\u003e/eventlog\u003c/code\u003e, beginning with \u003ccode\u003e/_ah/\u003c/code\u003e, or some ending with \u003ccode\u003ez\u003c/code\u003e, are not allowed.\u003c/p\u003e\n"]]],[],null,["# Communicating between your services\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\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/flexible/python/how-requests-are-routed#region-id). \nOK\n\nYou can use various methods to communicate between your App Engine\nservices or with other services, including Google Cloud services and\nexternal applications.\n\nThe simplest approach for communicating with your App Engine service is\nto send targeted HTTP requests, where the URL includes the name or ID of a\nresource. For example, you can include the ID of a service or version that you\nwant to target, in addition to the corresponding Google Cloud project ID: \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\nLearn more about requests in App Engine:\n\n- [How requests are\n handled](/appengine/docs/flexible/how-requests-are-handled): Learn how your application receives requests and sends responses.\n- [How requests are routed](/appengine/docs/flexible/how-requests-are-routed): Learn how to target your services, including how to define HTTPS URLs.\n- Learn how to authorize the requests between your services and other Google Cloud services:\n - [Provide credentials for Application Default Credentials](/docs/authentication/provide-credentials-adc)\n - [Using user-managed service accounts](/appengine/docs/flexible/user-managed-service-accounts)\n\nYour App Engine services can also communicate using\n[Pub/Sub](/appengine/docs/flexible/writing-and-responding-to-pub-sub-messages), which provides reliable asynchronous\nmany-to-many messaging between processes, including App Engine. These\nprocesses can be individual instances of your application, services, or even\nexternal applications.\n\nTo share data across databases and your App Engine app or some other\nexternal application, see\n[Understanding Data and File Storage](/appengine/docs/flexible/storage-options).\n\nPrivate Communication\n---------------------\n\n### Communication between services in the same project\n\nYou can allow an App Engine flexible service to communicate with\nanother App Engine service in the same project without having to expose\nthe destination service to the public internet.\n\n1. Configure the destination service's\n [ingress settings](/appengine/docs/flexible/ingress-settings)\n to allow \"internal\" traffic only.\n\n2. Ensure the source app version is not deployed to a Shared VPC network\n located in a different project.\n\n### Communication between services in different projects\n\nYou can have private access between Google Cloud projects when apps running\nin projects belong to a Shared VPC network that is\nconfigured to invoke an app running in the Shared VPC network's host project.\n\nTo use this pattern, follow the previous steps for\n[communicating between services in the same project](#between-services).\n\nIn the flexible environment, [deploy](/appengine/docs/flexible/using-shared-vpc)\neach client version to the same Shared VPC network.\n\n\nOther methods of communication between projects using internal access are not\npossible in App Engine.\n\nReserved URL paths\n------------------\n\nIt is not possible to use the following URL paths:\n\n- Paths ending with `/eventlog`\n- Paths starting with `/_ah/`\n- Some paths ending with `z`"]]