High availability ensures that critical Airflow components like the scheduler and webserver keep running even if one instance fails, preventing downtime.
airflow scheduler --status on a multi-scheduler HA setup. What output indicates that the schedulers are running correctly in HA mode?In HA mode, Airflow schedulers use leader election to decide which scheduler runs tasks. Seeing 'leader election enabled' means HA is active and working.
The correct parameters to enable HA in Airflow scheduler are enable_scheduler_ha and scheduler_ha_heartbeat_sec under the [scheduler] section.
Leader election requires schedulers to coordinate via the metadata database. If the database is unreachable, leader election fails and no scheduler runs tasks.
First, the metadata database must be configured for shared access. Then enable HA in config, deploy schedulers, and finally verify leader election.