Mainly your workload characteristics, meaning how many of your DAG tasks can run in parallel, and the resources available in your deployment environment.
- Workload characteristics. Analyze the nature of your workflows. If your DAGs consist of numerous parallelizable tasks, increasing worker count can lead to better parallelism and faster execution.
- Resource availability. Consider the resources available on your Airflow deployment environment. Each worker consumes CPU and memory resources. Ensure that the worker count aligns with the available system resources.
- Task execution time. Evaluate the average execution time of tasks in your workflows. If tasks are short-lived, a higher worker count may be beneficial. For longer-running tasks, a lower worker count might be sufficient.