Il 15 settembre 2026, tutti gli ambienti Cloud Composer 1 e Cloud Composer 2 versione 2.0.x raggiungeranno la fine del ciclo di vita pianificata e non potrai più utilizzarli. Ti consigliamo di pianificare la migrazione a Cloud Composer 3.
Gli ambienti Cloud Composer 2 vengono scalati automaticamente in risposta alle esigenze dei DAG e delle attività eseguiti:
Se il tuo ambiente è sottoposto a un carico elevato, Cloud Composer
aumenta automaticamente il numero di worker nell'ambiente.
Se il tuo ambiente non utilizza alcuni dei suoi worker, questi vengono rimossi per risparmiare risorse e costi dell'ambiente.
Puoi impostare il numero minimo e massimo di worker per il tuo ambiente.
Cloud Composer scala automaticamente l'ambiente entro i limiti impostati. Puoi modificare questi limiti in qualsiasi momento.
Il numero di worker viene modificato in base alla metrica
Target fattore di scalabilità. Questa metrica viene
calcolata in base a:
Numero attuale di worker
Numero di attività Celery nella coda Celery che non sono assegnate a un worker
Numero di worker inattivi
celery.worker_concurrency Opzione di configurazione di Airflow
La scalabilità automatica di Cloud Composer utilizza tre diversi gestori della scalabilità automatica
forniti da GKE:
Cloud Composer configura questi autoscaler nel cluster dell'ambiente. In questo modo, il numero di nodi nel cluster, il tipo di macchina e il numero di worker vengono scalati automaticamente.
Parametri di scalabilità e rendimento
Oltre alla scalabilità automatica, puoi controllare i parametri di scalabilità e prestazioni
del tuo ambiente modificando i limiti di CPU, memoria e disco
per scheduler, server web e worker. In questo modo puoi scalare verticalmente il tuo
ambiente, oltre alla scalabilità orizzontale fornita dalla
funzionalità di scalabilità automatica. Puoi regolare i parametri di scalabilità e prestazioni di
scheduler, server web e worker di Airflow in qualsiasi momento.
Il parametro di rendimento Dimensione ambiente del tuo ambiente controlla i parametri di rendimento dell'infrastruttura Cloud Composer gestita che include il database Airflow. Se hai intenzione di eseguire un numero elevato di DAG e attività con un rendimento dell'infrastruttura più elevato, valuta la possibilità di selezionare dimensioni più grandi per l'ambiente. Ad esempio, le dimensioni maggiori dell'ambiente aumentano
la quantità di voci di log delle attività di Airflow che l'ambiente può elaborare con
un ritardo minimo.
Più scheduler
Airflow 2 può utilizzare più di uno scheduler Airflow contemporaneamente. Questa
funzionalità di Airflow è nota anche come scheduler HA. In Cloud Composer 2,
puoi impostare il numero di scheduler per il tuo ambiente e modificarlo in qualsiasi
momento. Cloud Composer non scala automaticamente il numero di
scheduler nel tuo ambiente.
Per ulteriori informazioni sulla configurazione del numero di scheduler per l'ambiente, vedi Scalare gli ambienti.
Spazio su disco del database
Lo spazio su disco per il database Airflow aumenta automaticamente per soddisfare la domanda.
[[["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 Composer 2 environments automatically scale the number of workers based on the demands of your DAGs and tasks, increasing workers during heavy loads and removing them during low usage.\u003c/p\u003e\n"],["\u003cp\u003eCloud Composer 2 uses GKE's Horizontal Pod Autoscaler (HPA), Cluster Autoscaler (CA), and Node auto-provisioning (NAP) to manage autoscaling, adjusting the number of nodes, machine types, and workers.\u003c/p\u003e\n"],["\u003cp\u003eYou can manually adjust CPU, memory, and disk limits for schedulers, web servers, and workers, providing vertical scaling in addition to the horizontal autoscaling.\u003c/p\u003e\n"],["\u003cp\u003eThe environment size parameter affects the managed Cloud Composer infrastructure's performance, impacting how many Airflow task log entries your environment can process efficiently.\u003c/p\u003e\n"],["\u003cp\u003eCloud Composer 2 allows for multiple Airflow schedulers, which you can configure, but the number of schedulers does not automatically scale, and the Airflow database's disk space scales automatically to adapt to the demand.\u003c/p\u003e\n"]]],[],null,["# About environment scaling\n\n**Cloud Composer 3** \\| [Cloud Composer 2](/composer/docs/composer-2/environment-scaling \"View this page for Cloud Composer 2\") \\| [Cloud Composer 1](/composer/docs/composer-1/environment-scaling \"View this page for Cloud Composer 1\")\n\n\u003cbr /\u003e\n\n| **Note:** This page is **not yet revised for Cloud Composer 3** and displays content for Cloud Composer 2.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page describes how environment scaling works in Cloud Composer 2.\n\nOther pages about scaling:\n\n- For a guide about selecting optimal scale and performance parameters for your environment, see [Optimize environment performance and costs](/composer/docs/composer-2/optimize-environments).\n- For information about scaling your environments, see [Scale environments](/composer/docs/composer-2/scale-environments).\n\nAutoscaling environments\n------------------------\n\nCloud Composer 2 environments automatically scale in response to the demands\nof your executed DAGs and tasks:\n\n- If your environment experiences a heavy load, Cloud Composer automatically increases the number of workers in your environment.\n- If your environment does not use some of its workers, these workers are removed to save environment resources and costs.\n- You can set the minimum and maximum number of workers for your environment. Cloud Composer automatically scales your environment within the set limits. You can adjust these limits at any time.\n\nThe number of workers is adjusted based on\nthe [Scaling Factor Target](/composer/docs/composer-2/monitor-environments#worker-metrics) metric. This metric is\ncalculated based on:\n\n- Current number of workers\n- Number of Celery tasks in the Celery queue, that are not assigned to a worker\n- Number of idle workers\n- `celery.worker_concurrency` Airflow configuration option\n\nCloud Composer autoscaling uses three different autoscalers\nprovided by GKE:\n\n- [Horizontal Pod Autoscaler (HPA)](/kubernetes-engine/docs/concepts/horizontalpodautoscaler)\n- [Cluster Autoscaler (CA)](/kubernetes-engine/docs/concepts/cluster-autoscaler)\n- [Node auto-provisioning (NAP)](/kubernetes-engine/docs/how-to/node-auto-provisioning)\n\nCloud Composer configures these autoscalers in the environment's\ncluster. This automatically scales the number of nodes in the cluster, the\nmachine type and the number of workers.\n\nScale and performance parameters\n--------------------------------\n\nIn addition to autoscaling, you can control the scale and performance\nparameters of your environment by adjusting the CPU, memory, and disk limits\nfor schedulers, web server, and workers. By doing so you can scale your\nenvironment vertically, in addition to the horizontal scaling provided by the\nautoscaling feature. You can adjust the scale and performance parameters of\nAirflow schedulers, web server, and workers at any time.\n\nThe *environment size* performance parameter of your environment controls the\nperformance parameters of the managed Cloud Composer infrastructure\nthat includes the Airflow database. Consider selecting a larger environment\nsize if you want to run a large number of DAGs and tasks with higher\ninfrastructure performance. For example, larger environment's size increases\nthe amount of Airflow task log entries that your environment can process with\nminimal delay.\n| **Note:** Environment size is different from the environment presets. Environment presets, which you can select when you create an environment, determine all limits, scale, and performance parameters of your environment, including the environment size. Environment size determines only the performance parameters of the managed Cloud Composer infrastructure of your environment.\n\nMultiple schedulers\n-------------------\n\nAirflow 2 can use more than one Airflow scheduler at the same time. This\nAirflow feature is also known as the **HA scheduler**. In Cloud Composer 2,\nyou can set the number of schedulers for your environment and adjust it at any\ntime. Cloud Composer does not automatically scale the number of\nschedulers in your environment.\n\nFor more information about configuring the number of schedulers for your\nenvironment, see [Scale environments](/composer/docs/composer-2/scale-environments#scheduler-count).\n\nDatabase disk space\n-------------------\n\nDisk space for the Airflow database automatically increases to accommodate the\ndemand.\n\n\nWhat's next\n-----------\n\n- [Scale environments](/composer/docs/composer-2/scale-environments)\n- [Cloud Composer pricing](/composer/pricing)\n- [Create environments](/composer/docs/composer-2/create-environments)\n- [Environment architecture](/composer/docs/composer-2/environment-architecture)"]]