What You’ll Master Here
Airflow holds a job id and a status. Everything with real memory requirements happens somewhere it can be sized independently.
Chapter 2 called Airflow a control plane and said data should not flow through it. This chapter is that rule applied to compute: the heavy work belongs on Spark, Databricks, EMR or a container, and Airflow’s job is to submit it and wait for a verdict.
Set the dataset size below and watch the point where “just do it in the worker” stops being viable.
Airflow holds a job id and a status. Everything with real memory requirements happens somewhere it can be sized independently.
The moment you size workers for data volume rather than for coordination, you are running a compute cluster that also schedules things — and doing both worse than two dedicated systems would. It is also the most expensive shape, because those large workers sit idle whenever the heavy task is not running.
- Control plane
- The layer that decides what runs and when. Handles metadata; not data.
- Submit-and-poll
- The pattern for remote work: hand the job over, then wait for its outcome.
- KubernetesPodOperator
- Runs a task as a container in a cluster. Works under any executor, not just KubernetesExecutor.
Loading a large dataset into a worker because pandas is convenient. Either the task is OOM-killed, or you size every worker for the largest task and pay for that memory around the clock. Both are worse than submitting the work to something built for it.
Ask of every task whether it is coordinating or computing. Computing usually belongs elsewhere.
Size workers for coordination overhead. Needing large workers is a signal, not a requirement.
Keep small transforms in the worker — the rule is about scale, not about purity.
Chapter 2 in one line. Almost every “Airflow is slow” or “Airflow runs out of memory” report resolves to compute sitting in the wrong layer.
Airflow submits and waits. The compute belongs somewhere you can size for it.
