Airflow Celery vs Kubernetes Executor
Last updated
Last updated
Celery is used for running distributed asynchronous python tasks.
Hence, CeleryExecutor has been a part of Airflow for a long time, even before Kubernetes.
CeleryExecutors has a fixed number of workers running to pick-up the tasks as they get scheduled.
Pros
It provides scalability.
Celery manages the workers. In case of a failure, Celery spins up a new one.
Cons
Celery needs RabbitMQ/Redis to for queuing the task, which is reinventing the wheel of what Airflow already supports.
The above dependency also makes the setup complex.
KubernetesExecutor is where Airflow spins up a new pod to run an Airflow task. Unlike Celery executor the advantage is you don't have a bunch of workers always running. KubernetesExecutor is on-demand thereby reducing cost.\
One dowside of kubernetes executor can be the time it takes to spin up the pod but compared to the advantages it can be close to null