Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Puoi eseguire le tue applicazioni in App Engine utilizzando l'ambiente flessibile di App Engine o l'ambiente standard di App Engine. Puoi anche scegliere di utilizzare
contemporaneamente entrambi gli ambienti per la tua applicazione e consentire ai tuoi
servizi di sfruttare i vantaggi individuali di ciascun ambiente.
Ambienti di App Engine
App Engine è ideale per le applicazioni progettate utilizzando un'architettura di microservizi, soprattutto se decidi di utilizzare entrambi gli ambienti. Utilizza le
sezioni seguenti per scoprire e capire quale ambiente soddisfa al meglio le esigenze della tua
applicazione.
Quando scegliere l'ambiente standard
Le istanze dell'applicazione vengono eseguite in una
sandbox,
utilizzando l'ambiente di runtime di una lingua supportata elencata di seguito.
Applicazioni che devono gestire una scalabilità rapida.
L'ambiente standard è ottimale per le applicazioni con le seguenti
caratteristiche:
Progettato per essere eseguito gratuitamente o a costi molto bassi, in cui paghi
solo per ciò che ti serve e quando ti serve. Ad esempio, la tua
applicazione può scalare a 0 istanze quando non c'è traffico.
Esperienze picchi improvvisi ed estremi di traffico che
richiedono una scalabilità immediata.
Quando scegliere l'ambiente flessibile
Le istanze dell'applicazione vengono eseguite all'interno dei container Docker sulle macchine virtuali (VM) Compute Engine.
Applicazioni che ricevono traffico costante, che subiscono fluttuazioni regolari del traffico o che soddisfano i parametri per lo scale up e lo scale down graduali.
L'ambiente flessibile è ottimale per le applicazioni con le seguenti
caratteristiche:
Viene eseguito in un container Docker che include un runtime personalizzato o
codice sorgente scritto in altri linguaggi di programmazione.
Utilizza o dipende da framework che includono codice nativo.
Accede alle risorse o ai servizi del tuo progetto Google Cloud che risiedono nella rete Compute Engine.
Confrontare le funzionalità di alto livello
La seguente tabella riepiloga le differenze tra i due ambienti:
Confrontare l'ambiente flessibile con Compute Engine
L'ambiente flessibile di App Engine presenta le seguenti differenze rispetto a Compute Engine:
Le istanze VM dell'ambiente flessibile vengono riavviate su base settimanale. Durante
i riavvii, i servizi di gestione di Google applicano tutti gli aggiornamenti di sicurezza
e sistema operativo necessari.
Hai sempre l'accesso root alle istanze VM di Compute Engine. Per impostazione predefinita, l'accesso SSH
alle istanze VM nell'ambiente flessibile è disabilitato. Se
vuoi, puoi attivare l'accesso root alle istanze VM della tua app.
I deployment del codice possono richiedere più tempo perché le immagini container vengono create utilizzando il
servizio Cloud Build.
La regione geografica di un'istanza VM dell'ambiente flessibile
è determinata dalla località specificata per l'applicazione App Engine del tuo
progettoGoogle Cloud . I servizi di gestione di Google
assicurano che le istanze VM siano in co-location per prestazioni ottimali.
Eseguire la migrazione dall'ambiente standard all'ambiente flessibile
Se hai un'applicazione nell'ambiente standard, potresti voler spostare
alcuni servizi nell'ambiente flessibile. Per indicazioni, consulta i consigli
nella
comparazione degli ambienti.
Se non conosci Google Cloud, crea un account per valutare le prestazioni dell'ambiente standard Ruby in scenari reali. I nuovi clienti ricevono anche 300 $ di crediti senza addebiti per l'esecuzione, il test e
il deployment dei workload.
[[["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\u003eApp Engine offers both a standard and a flexible environment for running applications, allowing you to choose or combine environments to suit your needs.\u003c/p\u003e\n"],["\u003cp\u003eThe standard environment is ideal for applications requiring rapid scaling and cost-effectiveness, especially when dealing with sudden traffic spikes and the ability to scale down to zero instances.\u003c/p\u003e\n"],["\u003cp\u003eThe flexible environment, which uses Docker containers on Compute Engine VMs, is best for applications needing custom runtimes, native code, or access to the Compute Engine network, and is optimal for consistent or fluctuating traffic.\u003c/p\u003e\n"],["\u003cp\u003eThe standard environment features faster deployment and instance startup times, while the flexible environment allows for more customization and supports features like SSH debugging and background processes.\u003c/p\u003e\n"],["\u003cp\u003eYou can migrate services from the standard to the flexible environment, and there are key differences to consider between using the flexible environment versus using Compute Engine directly.\u003c/p\u003e\n"]]],[],null,["# Choose an App Engine environment\n\nYou can run your applications in App Engine by using the\n[App Engine flexible environment](/appengine/docs/flexible) or the\n[App Engine standard environment](/appengine/docs/standard). You can also choose to\nsimultaneously use both environments for your application and allow your\nservices to take advantage of each environment's individual benefits.\n\nApp Engine environments\n-----------------------\n\nApp Engine is well suited to applications that are designed using a\n[microservice](https://wikipedia.org/wiki/Microservices)\narchitecture, especially if you decide to utilize both environments. Use the\nfollowing sections to learn and understand which environment best meets your\napplication's needs. \n\n### When to choose the standard environment\n\n\nApplication instances run in a\n[sandbox](https://en.wikipedia.org/wiki/Sandbox_(computer_security)),\nusing the runtime environment of a supported language listed below.\n\n\nApplications that need to deal with rapid scaling.\n\n\nThe standard environment is optimal for applications with the following\ncharacteristics:\n\n- Intended to **run for free or at very low cost**, where you pay only for what you need and when you need it. For example, your application can scale to 0 instances when there is no traffic.\n- Experiences **sudden and extreme spikes of traffic** which require immediate scaling. \n\n### When to choose the flexible environment\n\n\nApplication instances run within Docker containers on Compute Engine\nvirtual machines (VM).\n\n\nApplications that receive consistent traffic, experience regular traffic\nfluctuations, or meet the parameters for scaling up and down gradually.\n\n\nThe flexible environment is optimal for applications with the following\ncharacteristics:\n\n- Runs in a Docker container that includes a custom runtime or source code written in **other programming languages**.\n- Uses or depends on frameworks that include **native code**.\n- Accesses the resources or services of your Google Cloud project that reside in the **Compute Engine network**.\n\nCompare high-level features\n---------------------------\n\nThe following table summarizes the differences between the two environments:\n\nAlso see the in-depth\n[comparison of the environments](/appengine/docs/flexible/flexible-for-standard-users).\n\nCompare App Engine and Cloud Run\n--------------------------------\n\nTo compare features and learn how to migrate to Cloud Run,\nsee [Compare App Engine and Cloud Run](/appengine/migration-center/run/compare-gae-with-run).\n\nCompare the flexible environment to Compute Engine\n--------------------------------------------------\n\nThe App Engine flexible environment has the following differences to\nCompute Engine:\n\n- The flexible environment VM instances are restarted on a weekly basis. During\n restarts, Google's management services apply any necessary operating system\n and security updates.\n\n- You always have root access to Compute Engine VM instances. By default, SSH\n access to the VM instances in the flexible environment is disabled. If you\n choose, you can enable root access to your app's VM instances.\n\n- Code deployments can take longer as container images are built by using the\n Cloud Build service.\n\n- The geographical region of a flexible environment VM instance\n is determined by the location that you specify for the\n [App Engine application](/appengine/docs/flexible/locations) of your\n Google Cloud project. Google's management services\n ensures that the VM instances are co-located for optimal performance.\n\nMigrate from the standard environment to the flexible environment\n-----------------------------------------------------------------\n\nIf you have an application in the standard environment, you might want to move\nsome services to the flexible environment. For guidance, see the recommendations\nfor in the\n[comparison of the environments](/appengine/docs/flexible/flexible-for-standard-users).\n\nTo migrate specific services for Python, Java, Go, and PHP, see [Migrate services from the standard environment to the flexible environment](/appengine/docs/flexible/migrating).\n\nTry it for yourself\n-------------------\n\n\nIf you're new to Google Cloud, create an account to evaluate how\nRuby standard environment performs in real-world\nscenarios. New customers also get $300 in free credits to run, test, and\ndeploy workloads.\n[Try Ruby standard environment free](https://console.cloud.google.com/freetrial)"]]