# How Razorpay Moved 2,500 DAGs to Airflow 3, One DAG at a Time

DevFeed: [How Razorpay Moved 2,500 DAGs to Airflow 3, One DAG at a Time](<https://devfeed.tech/articles/how-razorpay-moved-2-500-dags-to-airflow-3-one-dag-at-a-time-100860.md>)

Original publisher: [Read original article](<https://engineering.razorpay.com/how-razorpay-moved-2-500-dags-to-airflow-3-one-dag-at-a-time-71419355a07b?source=rss----6407ad2e59af---4>)

Author: Manish Kumar Gupta

Published: 2026-10-26T10:23:23Z

Content type: article

Language: en

Sources: [Razorpay](<https://devfeed.tech/sources/razorpay-engineering-medium.md>)

Topics: [Deployment Strategies](<https://devfeed.tech/topics/deployment-strategies.md>), [blue-green deployment](<https://devfeed.tech/topics/blue-green-deployment.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>), [versioning](<https://devfeed.tech/topics/versioning.md>)

Tags: [adoption](<https://devfeed.tech/tags/adoption.md>), [airflow](<https://devfeed.tech/tags/airflow.md>), [api](<https://devfeed.tech/tags/api.md>), [api-server](<https://devfeed.tech/tags/api-server.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [batch](<https://devfeed.tech/tags/batch.md>), [bug](<https://devfeed.tech/tags/bug.md>), [ci](<https://devfeed.tech/tags/ci.md>), [code](<https://devfeed.tech/tags/code.md>), [config](<https://devfeed.tech/tags/config.md>), [crash](<https://devfeed.tech/tags/crash.md>), [dag](<https://devfeed.tech/tags/dag.md>), [data-engineering](<https://devfeed.tech/tags/data-engineering.md>), [data-pipelines](<https://devfeed.tech/tags/data-pipelines.md>), [database](<https://devfeed.tech/tags/database.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [drop-in](<https://devfeed.tech/tags/drop-in.md>), [executor](<https://devfeed.tech/tags/executor.md>), [import](<https://devfeed.tech/tags/import.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [razorpay](<https://devfeed.tech/tags/razorpay.md>), [software-development](<https://devfeed.tech/tags/software-development.md>)

## AI overview

Razorpay moved its Airflow workloads from 2.10 to 3 through a separate blue-green cluster and per-DAG cutovers, reaching 2,592 migrated DAGs in ten weeks with about 100 engineers. The central operational change is that Airflow 3 tasks send heartbeats, state updates and XCom through the Task Execution API instead of connecting directly to the metadata database. Slow API requests can stall heartbeats and cause running tasks to be failed as zombies; Razorpay split execution traffic from UI and REST traffic, ran at least two execution API replicas, and added availability and heartbeat alerts. The account also describes a scheduler crash loop in 3.2.1 fixed in 3.3.0, silent configuration changes, parser memory and task-pool limits, and migration issues involving missing Variables and Connections. Its practical approach included diffing effective configs, shipping drop-in v3 helper libraries, freezing v2 changes in CI on published dates, and migrating DAGs individually with rollback available.

## Source excerpt

Airflow, the scheduler behind Razorpay's batch data pipelines, now runs on version 3.3, and we led the move from 2.10. It runs more than 2,700 DAGs and about 11,000 task runs a day, and we got there without a big-bang cutover. The official upgrade guide is the place to start for code changes. This post is about what happened when we ran Airflow 3 at that scale: the architecture change behind most of our incidents, how we moved everything one DAG at a time, the tooling that made it easy for other teams, and the checklist we'd follow next time. If you read nothing else In Airflow 3, every running task talks to the API server, not the database. If the API server stalls, running tasks get killed. Run at least two replicas, and give task traffic its own API server deployment so a slow UI page can't fail tasks. Avoid 3.2.1. A scheduler bug there causes a crash loop that never recovers on its own. 3.3.0 fixes it. Diff the config your pods actually run with. Some of our v2 settings vanished during the move, and some keys were renamed with no warning. Go blue-green: run v3 next to v2, move DAGs one at a time, and freeze v2 in CI on published dates. The freeze did more for adoption than any tooling we wrote: about 100 engineers moved 2,500 DAGs in ten weeks. Make migrating an import swap. Bulk migration only took off once we shipped drop-in v3 versions of our internal helper libraries. Airflow in two minutes Airflow runs batch jobs on a schedule. You describe each pipeline in a Python file called a DAG: a set of tasks and the order they run in. For example: "pull yesterday's payments, then build the settlement report, then email it". A few moving parts matter for this post: The scheduler decides which tasks are due. The executor decides where tasks run. On Airflow 2 we used Celery: a fixed fleet of always-on worker processes that pull tasks off a Redis queue. On Airflow 3 we use the Kubernetes executor, which starts a new pod for every task and deletes it afterwards. The meta