Autoscaling in Airflow Lessons learned
summary
Cloud Composer uses external metric = ceil(queue_size / worker_concurrency) exported to Cloud Monitoring every 60 seconds and read by Kubernetes HPA with a 70 second stabilization window so pods only change after two samples. Worker pods run with explicit CPU and memory requests and the cluster uses GKE Autopilot so nodes scale automatically. Scale down uses a custom Airflow worker set controller that queries the Airflow DB and only removes idle workers. Pod startup often adds two to four minutes and huge single-node ML jobs remain unsupported.
AI-written summary · about
chapters (14)
- 0:00Introduction to speakers
- 0:40What is Cloud Composer
- 1:43Airflow terminology explained
- 3:30Current Composer architecture
- 5:15Problems with static scaling
- 6:40What is auto scaling
- 8:05Auto scaling solution overview
- 9:48Configuring auto scaling
- 10:11Metrics for auto scaling
- 13:43GKE autopilot details
- 14:04Auto scaling flow explained
- 16:54Scaling down challenges
- 17:37Custom controller solution
- 20:06Future plans
