---
title: "Lessons Learned From Running Apache Airflow at Scale"
description: "Shopify runs Airflow 2.2 on Kubernetes with the Celery executor and MySQL 8, and its largest environment handles over 10,000 DAGs and 150,000 runs per day."
url: "https://swe.quest/articles/lessons-learned-from-running-apache-airflow-at-scale-465dd0ced6d11da7"
canonical: "https://shopify.engineering/lessons-learned-apache-airflow-scale"
source: "Shopify Engineering"
published: "2022-05-23"
difficulty: "medium"
kind: "Case study"
reading_minutes: 12
tags: ["scheduling","data-pipelines","multi-tenancy","scalability","kubernetes"]
---

# Lessons Learned From Running Apache Airflow at Scale

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2022-05-23, 12 min read, Case study. Original: [https://shopify.engineering/lessons-learned-apache-airflow-scale](https://shopify.engineering/lessons-learned-apache-airflow-scale)

## Summary

Shopify runs Airflow 2.2 on Kubernetes with the Celery executor and MySQL 8, and its largest environment handles over 10,000 DAGs and 150,000 runs per day. Running at that scale meant replacing GCSFuse with an in-cluster NFS server synced from GCS, enforcing a 28-day metadata retention policy, and tracking ownership through a per-environment namespace manifest. That manifest feeds a cluster DAG policy that restricts queues, pools and Kubernetes namespaces. To smooth load spikes, Shopify uses deterministically randomized crontab schedules hashed from dag\_id and manages contention with pools synced from a ConfigMap, priority weights and isolated Celery queues.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Scheduling](https://swe.quest/tags/scheduling.md) (Distributed systems)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Multi-tenancy](https://swe.quest/tags/multi-tenancy.md) (Architecture & design)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)

## Prerequisites

- Apache Airflow DAGs and operators ([easy posts on Data pipelines](https://swe.quest/tags/data-pipelines.md?difficulty=easy))
- Kubernetes basics ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- Celery task queues ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))

## Keywords

Apache Airflow, Celery, Google Cloud Storage, GCSFuse, NFS, Kubernetes, MySQL

## Related posts

- [Why Astronomer chose ClickHouse to power its new data observability platform, Astro Observe](https://swe.quest/articles/why-astronomer-chose-clickhouse-to-power-its-new-data-observability-platform-f5c7916b8461008d.md): ClickHouse · 2025-03-10 · Easy · 7 min read · Analytics & OLAP, Observability, Data pipelines, Queues & messaging
  Astronomer built Astro Observe, an observability platform for Apache Airflow, on ClickHouse Cloud after a per-customer Amazon RDS Postgres setup degraded on large time-range aggregations and forced limits on retained data.
- [How to Reliably Scale Your Data Platform for High Volumes](https://swe.quest/articles/how-to-reliably-scale-your-data-platform-for-high-volumes-d29cb64aded6f294.md): Shopify Engineering · 2020-12-08 · Medium · 9 min read · SRE, Capacity planning, Data pipelines, Scaling, Resilience
  Shopify's Data Platform Engineering team prepared Tier 1 and Tier 2 ingestion and query services for a forecast near-doubling of BFCM 2020 traffic with a five-step reliability process.
- [Accelerate testing in Apache Airflow through DAG versioning](https://swe.quest/articles/accelerate-testing-in-apache-airflow-through-dag-versioning-47ddaa996af2a67d.md): Zalando Engineering · 2022-06-09 · Medium · 8 min read · Data pipelines, Testing, Deployment, CI/CD, Python
  Zalando's Performance Marketing team runs multiple isolated versions of its Airflow-orchestrated marketing ROI pipeline on one shared test server, one per pull request.
- [Evolving the Backend Storage for Platform Metrics](https://swe.quest/articles/evolving-the-backend-storage-for-platform-metrics-0fb82a7939c98396.md): Heroku Engineering · 2024-05-09 · Medium · 6 min read · Databases, Distributed databases, Observability, Cloud platforms, Schema migrations
  Heroku migrated the time-series store behind MetaaS, its internal metrics service, from self-managed Apache Cassandra to AWS DynamoDB without user-visible impact.
- [How we scaled fast, reliable configuration distribution to thousands of workload containers](https://swe.quest/articles/how-we-scaled-fast-reliable-configuration-distribution-to-thousands-of-workload-e29683144db0f208.md): Datadog Engineering · 2025-06-17 · Medium · 13 min read · Configuration management, Distributed systems, Resilience, Multi-tenancy, Caching
  Datadog replaced on-demand per-tenant config loading (database reads plus Kafka cache-invalidation messages) with a context-publisher that snapshots all tenants' configuration into RocksDB blobs in cloud storage and streams individual updates over Kafka.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
