Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Cloud Deploy supporta le strategie di deployment. Una strategia di deployment è una delle diverse tecniche per implementare le modifiche all'applicazione riducendo al minimo l'impatto sugli utenti.
Quali strategie di deployment supporta Cloud Deploy?
Cloud Deploy supporta le seguenti strategie di deployment:
La strategia di deployment standard esegue semplicemente il deployment di un'applicazione in un runtime o in runtime target. Il deployment non viene eseguito in modo progressivo e non viene eseguita alcuna suddivisione tra la versione precedente e quella nuova dell'applicazione.
Con un deployment standard, puoi eseguire facilmente il rollback della release, verificare il deployment ed eseguire il deployment in più destinazioni contemporaneamente.
Un deployment canary è un deployment progressivo dell'applicazione, in modo che l'app venga inizialmente implementata in una parte dell'infrastruttura e possa essere testata prima di essere implementata ulteriormente. Un deployment canary riduce il rischio di introdurre modifiche riducendo il numero di utenti che potrebbero essere interessati da un bug.
Ad esempio, con un deployment canary del 50% in Cloud Run, metà del traffico verrà indirizzata alla nuova revisione, mentre l'altra metà verrà indirizzata alla vecchia revisione. Dopo aver eseguito i test per garantire la stabilità, puoi procedere con l'implementazione al 100%. Con Cloud Deploy, puoi specificare qualsiasi progressione di percentuali (tranne le percentuali parziali, come il 20,5%).
Entrambe queste strategie di deployment supportano tutti gli ambienti di runtime supportati da Cloud Deploy. Inoltre, tutte le strategie di deployment supportano il ripristino, l'annullamento degli implementamenti e il deployment su più target contemporaneamente (deployment parallelo).
Perché a volte le fasi vengono saltate
Poiché un canary viene eseguito su una versione esistente di un'applicazione
(sostituendo progressivamente quella versione), la strategia canary non può essere eseguita
se non è ancora stata implementata una versione che Cloud Deploy può riconoscere.
Ciò significa che se esegui il deployment di un'applicazione per la prima volta in un determinato target e utilizzi una strategia di deployment canary, l'implementazione potrebbe saltare la fase o le fasi canary. In questo caso, dopo che Cloud Deploy passa alla fase stabile e fai clic su Avanza implementazione per avviare la fase stable, l'applicazione viene implementata completamente in quel target e ora puoi eseguire un canary con la successiva serie di modifiche. Se fai clic su Avanza rollout, confermi di aver compreso che abbiamo saltato le fasi canarie che non erano applicabili a questo deployment.
Utilizzare il deployment parallelo con una strategia di deployment
[[["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-03 UTC."],[[["\u003cp\u003eCloud Deploy offers two main deployment strategies: standard deployment, which deploys an application without progressive rollout, and canary deployment, which progressively rolls out the application to reduce risk.\u003c/p\u003e\n"],["\u003cp\u003eStandard deployment allows for easy rollbacks, deployment verification, and simultaneous deployment to multiple targets, but does not perform deployments progressively.\u003c/p\u003e\n"],["\u003cp\u003eCanary deployments reduce the risk of introducing changes by initially deploying to a subset of the infrastructure for testing before a full rollout.\u003c/p\u003e\n"],["\u003cp\u003eCloud Deploy's canary strategy may skip phases if no prior version of the application is deployed, which then proceeds directly to the stable phase.\u003c/p\u003e\n"],["\u003cp\u003eBoth standard and canary strategies support all runtime environments supported by Cloud Deploy and can be used with parallel deployment to multiple targets simultaneously.\u003c/p\u003e\n"]]],[],null,["# Use a deployment strategy\n\nCloud Deploy supports deployment strategies. A deployment strategy is any of\nseveral techniques for deploying changes to your application while minimizing\nimpact to users.\n\nWhat deployment strategies does Cloud Deploy support?\n-----------------------------------------------------\n\nCloud Deploy supports the following deployment strategies:\n\n- [Standard deployment](/deploy/docs/deploying-application)\n\n The standard deployment strategy simply deploys an application to a target\n runtime or runtimes. The deployment is not performed progressively, and there\n is no splitting between the old and new versions of your application.\n\n With a standard deployment, you can easily roll back your release, you can\n verify your deployment, and you can deploy to more than one target at the same\n time.\n- [Canary deployment](/deploy/docs/deployment-strategies/canary)\n\n A canary deployment is a progressive deployment of your application, such\n that your app is deployed at first to a portion of your infrastructure and can\n be tested there before being rolled out further. A canary deployment reduces\n the risk of introducing changes by reducing the number of users likely to be\n affected by a bug.\n\n For example, with a 50% canary deployment to Cloud Run, half the\n traffic would be directed to the new revision, with half of it still directed\n to the old revision. After testing to help ensure stability, you would advance\n the rollout to 100%. With Cloud Deploy, you can specify any\n progression of percentages (except partial percentages, like 20.5%).\n\nBoth of these deployment strategies support all of the runtime environments that\nCloud Deploy supports. Also, all deployment strategies support\n[rolling back](/deploy/docs/roll-back),\n[canceling rollouts](/deploy/docs/deployment-strategies/manage-rollout#cancel_rollout),\nand deploying to more than one target at the same time\n([parallel deployment](/deploy/docs/parallel)).\n\nWhy phases are sometimes skipped\n--------------------------------\n\nBecause a canary runs against an existing version of an application\n(progressively replacing that version), the canary strategy can't be performed\nif there's no version deployed yet that Cloud Deploy can recognize.\n\nThis means that if you deploy an application for the first time to a given\ntarget, and you use a canary deployment strategy, the rollout might skip the\ncanary phase or phases. In this case, after Cloud Deploy skips to\nthe stable phase, and you click **Advance Rollout** to initiate the `stable`\nphase, the application gets deployed fully to that target, and you can\nnow run a canary against it with your next set of changes. Clicking **Advance\nRollout** constitutes an acknowledgement that we've skipped the canary phases\nthat were not applicable for this deployment.\n\n### Use parallel deployment with a deployment strategy\n\nYou can use a deployment strategy and still\n[deploy to more than one target at the same time](/deploy/docs/parallel).\n\nSee [Using parallel deployment with a canary deployment strategy](/deploy/docs/deployment-strategies/canary#parallel_canary)\nto find out how to do this with canary.\n\nWhat's next\n-----------\n\n- Try the quickstart: [Canary deploy an application to a target](/deploy/docs/deploy-app-canary)\n\n- Learn how to use the [canary deployment strategy](/deploy/docs/deployment-strategies/canary)\n\n- Find out how to [manage the lifecycle of your canary's rollouts](/deploy/docs/deployment-strategies/manage-rollout)."]]