APACHE AIRFLOWScale & Production

Executors Compared: Local, Celery & Kubernetes

How data engineers make pipelines run themselves — pick a topic on the left and its full breakdown loads here: the mental model, runnable DAGs, the failure modes that wake people at 3am, and the judgment that separates a scheduled script from an orchestrated system.

18 min readTopics chapter readerLevel · Medium
01 · Orientation

What You’ll Master Here

The executor decides how a task travels from “ready” to “running”. Everything downstream of that — brokers, workers, pods — is real infrastructure you own.

4 min · Topic 1 of 7

The authoring track is behind you. From here the question changes from “what should this pipeline do?” to “what does it take to run thousands of them reliably?” — and the first decision shapes everything else.

The executor is one line of configuration and an entirely different deployment. Compare the four below, paying attention to the “you must deploy” row: that is the real cost.

Four executors — what each actually does with a task
Remote — queued
  • Runs the task: A message goes to a broker; long-lived workers pull from it.
  • You must deploy: A broker (Redis or RabbitMQ) plus a worker fleet you keep running.
  • Start latency: Seconds
  • Isolation: Per worker — all tasks on a worker share its image
  • Scaling: Add workers. Well understood, and the most common production choice.
  • Reach for it when: Many short-to-medium tasks, a stable workload, and a team happy to operate a broker.
CeleryKubernetesExecutor and LocalKubernetesExecutor were deprecated in Airflow 3.0 — the multi-executor configuration below replaced them, and it is more flexible.
Core mental model

The executor decides how a task travels from “ready” to “running”. Everything downstream of that — brokers, workers, pods — is real infrastructure you own.

Why it matters

Chapter 2 established that the executor is an interface inside the scheduler rather than a service you run. What it implies, though, is infrastructure: a broker and a worker fleet, or a Kubernetes cluster and pod templates. Choosing it is choosing what your team operates for the next few years.

Local executor
Runs tasks inside the scheduler process. Fast and simple; task load and scheduling share a machine.
Remote executor
Decouples execution from the scheduler. Adds scalability, and adds latency and components.
EdgeExecutor
A remote executor whose workers pull tasks over HTTP from outside the cluster — for work that must happen elsewhere.
Common mistake

Choosing an executor because a conference talk recommended it. Kubernetes for five hundred two-second tasks spends most of its time pulling images; Celery for a bursty nightly load means paying for idle workers all day. The workload decides, not the fashion.

Better habit

Start from the workload shape — task duration, burstiness, dependency conflicts — and let the executor follow.

Remember that CeleryKubernetesExecutor and LocalKubernetesExecutor were deprecated in Airflow 3.0.

Treat an executor change as an infrastructure project, because that is what it is.

One line, one deployment

executor = CeleryExecutor is a line of config. It is also a broker, a worker fleet, autoscaling, and a new set of things that can break at 3am.

Remember this

The executor is the deployment decision disguised as a config value. Choose from the workload, not from what others run.