Cloud Composer 환경에서는 Airflow 스케줄러와 Airflow 웹 서버 모두 지속적으로 DAG를 처리합니다. DAG 직렬화를 사용 설정하면 Airflow 웹 서버의 신뢰성과 성능을 개선할 수 있습니다.
스케줄러가 DAG 파일을 웹 서버로 전송하기 전에 DAG 직렬화를 사용 설정하면 강제로 DAG 파일을 처리합니다. 웹 서버는 DAG를 처리하지 않습니다.
대신 Airflow 데이터베이스에서 직렬화된 DAG를 읽습니다. 이러한 방식으로 DAG를 직렬화하면 특히 많은 수의 DAG를 처리할 때 웹 서버의 CPU 및 메모리 사용량이 감소합니다.
min_serialized_dag_update_interval Airflow 구성 옵션은 직렬화된 DAG가 데이터베이스에서 업데이트되는 빈도를 제어합니다.
dag_dir_list_interval 옵션은 삭제된 DAG가 Airflow 데이터베이스에서 삭제되는 빈도를 제어합니다. 업데이트 빈도가 높으면 성능에 부정적인 영향을 줄 수 있습니다. min_serialized_dag_update_interval 및 dag_dir_list_interval은 30초로 설정하는 것이 좋습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-03-10(UTC)"],[[["DAG serialization in Cloud Composer improves the reliability and performance of the Airflow web server by having the scheduler process DAG files before they are sent, reducing the web server's CPU and memory usage."],["Starting with Cloud Composer version 1.15.0, DAG serialization is enabled by default, and it can be managed by overriding Airflow configuration options in both new and existing environments."],["Enabling DAG serialization requires setting the `store_serialized_dags` and `store_dag_code` Airflow configuration options to `True`, along with recommended settings of `30` for both `min_serialized_dag_update_interval` and `dag_dir_list_interval`."],["Disabling DAG serialization involves overriding the `store_serialized_dags` and `store_dag_code` Airflow configuration options and setting them to `False`."],["DAG serialization is incompatible with asynchronous DAG loading and will disable all Airflow web server plugins, although scheduler and worker plugins remain unaffected."]]],[]]