LogoDuyệtSr. Data Engineer
HomeAboutPhotosInsightsCV

Footer

Logo

Resources

  • Rust Tiếng Việt
  • /archives
  • /series
  • /tags
  • Status

me@duyet.net

  • About
  • LinkedIn
  • Resume
  • Projects

© 2026 duyet.net | Sr. Data Engineer | 2026-02-27

Airflow DAG Serialization

Note: This post is over 6 years old. The information may be outdated.

From the Airflow docs:

Without DAG Serialization & persistence in DB, the Webserver and the Scheduler both needs access to the DAG files. Both the scheduler and webserver parses the DAG files.

With DAG Serialization we aim to decouple the webserver from DAG parsing which would make the Webserver very light-weight.

The Webserver now instead of having to parse the DAG file again, reads the serialized DAGs in JSON, de-serializes them and create the DagBag and uses it to show in the UI.

One of the key features that is implemented as the part of DAG Serialization is that instead of loading an entire DagBag when the WebServer starts we only load each DAG on demand from the Serialized Dag table. This helps reduce Webserver startup time and memory. The reduction is notable when you have large number of DAGs.

Enable Dag Serialization

Add the following settings in airflow.cfg:

[core]
store_serialized_dags = True
min_serialized_dag_update_interval = 30

If you are updating Airflow from <1.10.7, please do not forget to run airflow db upgrade.

References

  • https://airflow.apache.org/docs/1.10.10/dag-serialization.html
May 1, 2020·6 years ago
|Data Engineering|
Data EngineeringApache Airflow
|Edit|

Related Posts

Airflow 2.0 - Taskflow API

Chú trọng vào việc đơn giản hóa và rõ ràng cách viết Airflow DAG, cách trao đổi thông tin giữa các tasks, Airflow 2.0 ra mắt Taskflow API cho phép viết đơn giản và gọn gàng hơn so với cách truyền thống, đặc biệt vào các pipelines sử dụng PythonOperators.

Dec 26, 2020·5 years ago
Read more

Scheduling Python script in Airflow

To schedule a Python script or Python function in Airflow, we use `PythonOperator`. For Airflow 2.0+, consider using the TaskFlow API for a more modern approach.

Jun 24, 2020·6 years ago
Read more

Airflow - một số ghi chép

Một số ghi chép, tips & tricks của mình trong quá trình sử dụng Apache Airflow.

Aug 27, 2019·7 years ago
Read more

Cài đặt Apache Airflow với Docker Compose

Trong bài này mình sẽ hướng dẫn cách thiết lập môi trường develop Apache Airflow dưới local bằng Docker Compose.

Aug 26, 2019·7 years ago
Read more
On this page
  • References
On this page
  • References