코딜기
[Airflow] Celery Executor 본문
반응형
Celery Executor란?
- Celery를 이용해서 작업을 worker에게 분배하고, 작업 결과를 관리하는 방식의 Executor입니다.
Celery Executor Components
Basic Component
- Workers - 할당된 task를 실행
- Scheduler - 실행해야 할 task를 Queue에 추가
- Web server - DAG와 task의 상태를 확인하고, 메타데이터 관리, 시각화, admin 명령을 할 수 있는 HTTP server
- Database - DAG, tasks, Variable, Connection 등 메타데이터를 저장하는 저장소
- Celery - 스케줄링하는 Queue의 사용방식
Celery Component
- Broker - 실행해야 할 command를 저장 (Queue)
- Result backend - 완료된 command에 대한 상태를 저장
- Flower - Celery Queue 및 작업의 상태를 모니터링하는 webUI
Communications
- Web server -> Workers : tasks 실행 로그를 가져옴
- Web server -> DAG files : DAG 구조를 확인
- Web server -> Database : tasks의 상태 확인
- Workers -> DAG files : DAG 구조와 실행해야 할 tasks 정보 확인
- Workers -> Database : connection, configuration, variables, XCOM 등의 정보를 가져오거나 저장
- Workers -> Celery’s result backend : tasks의 상태를 저장
- Workers -> Celery’s broker : 실행해야 할 command를 가져옴 (subscribe/consume)
- Scheduler -> DAG files : DAG 구조와 실행해야 할 tasks 정보를 확인
- Scheduler -> Database : DAG run과 관련된 tasks 정보를 저장
- Scheduler -> Celery’s result backend : 완료된 task의 상태 정보를 가져옴
- Scheduler -> Celery’s broker : 실행해야 할 command를 저장 (publish/produce)
Task Execution Process (Sequence Diagram)
참고
https://airflow.apache.org/docs/apache-airflow-providers-celery/stable/celery_executor.html
반응형
'Data Engineering > Airflow' 카테고리의 다른 글
[Airflow] airflow.cfg 개념과 각 섹션들의 기능 (0) | 2024.05.14 |
---|---|
[Airflow] EC2 가상 환경에 Airflow 패키지 설치하기 (0) | 2024.05.14 |
[Airflow] Airflow 기본 아키텍처 (0) | 2024.05.07 |
[Airflow] Airflow Library 설치 (0) | 2024.03.15 |
[Airflow] 로컬에서 실행된 Docker로 Airflow 띄우기 (0) | 2024.03.15 |
Comments