This document is archived and replaced by: AIP-15 Support Multiple-Schedulers for HA & Better Scheduling Performance
Looking at the original AIP-15 the author proposes to use locking to enable the use of multiple schedulers, this might introduce unnecessary complexity. Because of this I propose to split the scheduler into MainScheduler and DagScheduler. This makes it possible to have multiple DagSchedulers running that are submitted by the MainScheduler.
Each DAG will get their own scheduler on demand. When having multiple DAGs multiple DagSchedulers can run at the same time. The load on the MainScheduler will be reduced a lot. The MainScheduler will not be the blocking process of Airflow anymore.
![Airflow > AIP-15 Scalable Scheduler [ARCHIVED] > AIP-15-2.png](/confluence/download/attachments/103098286/AIP-15-2.png?version=1&modificationDate=1552650627000&api=v2)
![Airflow > AIP-15 Scalable Scheduler [ARCHIVED] > AIP 15 - Timeline.png](/confluence/download/attachments/103098286/AIP%2015%20-%20Timeline.png?version=1&modificationDate=1552656058000&api=v2)
![Airflow > AIP-15 Scalable Scheduler [ARCHIVED] > AIP 15 - Extended Timeline.png](/confluence/download/attachments/103098286/AIP%2015%20-%20Extended%20Timeline.png?version=1&modificationDate=1552656070000&api=v2)
This process should always run, like the current scheduler.
This process can be master/failover or this can be solved within k8s as discussed in AIP-15 Support Multiple-Schedulers for HA & Better Scheduling Performance.
This process is only executed on demand and is executed by an Airflow executor, for example on a Celery worker.
This DagScheduler should only execute a single DAG and a single cycle. If a cycle is done the MainScheduler should schedule a new DagScheduler.