Introduction to Apache Airflow
I&#x27;ve spent the past month+ setting airflow up. To be honest, I don&#x27;t like it for a lot of reasons:<p>1) it&#x27;s not cloud native in the sense that running this on e.g. AWS is an easy and well trodden path. Cloud is left as an exercise to the reader of the documentation and at best vaguely hinted at as a possibility. This is weird because that kind of is the whole point of this product. Sure, it has lots of things that are highly useful in the cloud (like an ECS operator or EMR operator); but the documentation is aimed at python hackers running this on their laptop; all the defaults are aimed at this as well. This is a problem because essentially all of that is wrong for a proper cloud native type environment. We&#x27;ve looked at quite a few third party repos for terraform, kubernetes, cloudformation, etc that try to fix this. Ultimately we ended up spending non trivial amounts of time on devops. Basically, this involved lots of problem solving for things that a combination of wrong, poorly documented, or misguided by default. Also, we&#x27;re not done by a long shot.<p>2) The UX&#x2F;UI is terrible and I don&#x27;t use this word lightly. Think hudson&#x2F;jenkins, 15 years ago (and technically that&#x27;s unfair to good old Hudson because it never was this bad). It&#x27;s a fair comparison because Jenkins kind of is a drop in replacement or at least a significant overlap in feature set. And it arguably has a better ecosystem for things like plugins. Absolutely everything in Airflow requires multiple clicks. Also you&#x27;ll be doing CMD+R a lot as there is no concept of autorefresh. Lots of fiddly icons. And then there&#x27;s this obsession with graphs and this being the most important thing ever. There are two separate graph views, only one of which has useful ways of getting to the logs (which never requires less than 4-5 mouse clicks). And of course the other view is the default under most links so you have to learn to click the tiny graph icon to get to the good stuff.<p>3) A lot of the defaults are wrong&#x2F;misguided&#x2F;annoying. Like catch up defaulting to true. There&#x27;s this weird notion of tasks (dags in airflow speak) running on a cron pattern and requiring a start date in the past. Using a dynamic date is not recommended (i.e. now would be a sane default). So typically you just pick whatever fixed time in the past. When you turn a dag on it tries to &#x27;backfill&#x27; from that date unless you set catchup to false. I don&#x27;t know in what universe that&#x27;s a sane default. Sure, I want to run this task 1000 times just because I unpaused it (everything is paused by default). There is no way to unschedule that. Did I mention the default parallism is 32. That in combination with the docker operator is a great way to instantly run out of memory (yep that happened to us).<p>4) The UI lacks ways to group tasks like by tag or folders, etc. This gets annoying quickly.<p>5) Dag configs as code in a weakly typed language without a good test harness leads to obvious problems. We&#x27;ve sort of gobbled together our own tests to somewhat mitigate repeated deploy screw ups.<p>6) implementing a worker architecture in a language that is still burdened with the global interpreter lock and that has no good support for either threading or light weight threads (aka co-routines) or doing things asynchronously, leads to a lot of complexity. The celery worker is a PITA to debug.<p>7) IMHO the python operator is a bad idea because it gives data scientists the wrong idea about, oh just install this library on every airflow host please so I can run my thingy. We use the Docker operator a lot and are switching to the ECS operator as soon as we can figure out how to run airflow in ECS (we currently have a snow flaky AMI running on ec2).<p>8) the logging UI is terrible compared to what I would normally use for logging. Looking at logs of task runs is kind of the core business the UI has to do.<p>9) Airflow has a DB where it keeps track of state. Any change to dags basically means this state gets stale pretty quickly. There&#x27;s no sane way to get rid of this stale data other than a lot of command-line fiddling or just running some sql scripts directly against this db. I&#x27;ve manually deleted hundreds of jobs in the last month. Also there&#x27;s no notion of having a sane default for number of execution runs to preserve. Likewise the there is built in way to clean up logs. Again, Jenkins&#x2F;Hudson had that always. I have jobs that run every 10 minutes and absolutely no need to keep months of history on that.<p>There are more things I could list. Also, there are quite a few competing products; this is a very crowded space. I&#x27;ve given serious thought to using Spring Batch or even just firing up a Jenkins. Frankly the only reason we chose airflow is that it&#x27;s easier for data scientists who are mostly only comfortable with python. So far, I&#x27;ve been disappointed with how complex and flaky this setup is.<p>If you go down the path of using it, think hard about which operators you are going to use and why. IMHO dockerizing tasks means that most of what Airflow does is just ensuring your dockerized tasks run. Limiting what it does is a good thing. Just because you can doesn&#x27;t mean you should in airflow. IMHO most of the operators naturally lead to your airflow installs being snow flakes.<p>Not dockerizing means you are mixing code and orchestration. Just like installing dependencies on CI servers is not a great idea is also the reason why doing the same on an airflow system is a bad idea.