이 페이지에서는 Cloud Composer가 Cloud Storage에 저장하는 사용자 환경 데이터를 설명합니다.
사용자가 환경을 만들면 Cloud Composer가 Cloud Storage 버킷을 만들고 사용자 환경과 버킷을 연결합니다. 버킷 이름은 환경 리전, 이름, 임의의 ID를 기반으로 합니다(예: us-central1-b1-6efabcde-bucket).
Cloud Composer는 환경 버킷의 특정 폴더를 환경에서 실행되는 Airflow 구성요소에 동기화합니다.
예를 들어 환경의 버킷에서 Airflow DAG 코드가 포함된 파일을 업데이트하면 Airflow 구성요소에도 업데이트된 버전이 전송됩니다.
Cloud Composer는 동기화에 Cloud Storage FUSE를 사용합니다.
Cloud Storage 버킷의 폴더
폴더
스토리지 경로
매핑되는 디렉토리
설명
DAG
gs://bucket-name/dags
/home/airflow/gcs/dags
사용자 환경의 DAG를 저장합니다.
플러그인
gs://bucket-name/plugins
/home/airflow/gcs/plugins
커스텀 사내 Airflow 연산자, 후크, 센서 또는 인터페이스와 같은 커스텀 플러그인을 저장합니다.
데이터
gs://bucket-name/data
/home/airflow/gcs/data
태스크가 생성하고 사용하는 데이터를 저장합니다.
로그
gs://bucket-name/logs
/home/airflow/gcs/logs
태스크의 Airflow 로그를 저장합니다. Airflow 웹 인터페이스 및 Google Cloud 콘솔의 로그 탭에서도 로그를 사용할 수 있습니다.
Cloud Composer는 버킷에서 Airflow 구성요소로 폴더를 단방향으로 동기화합니다. 단방향 동기화는 Airflow 구성요소의 로컬 변경사항을 이러한 폴더에 덮어쓴다는 것을 의미합니다.
데이터 동기화는 eventual consistency를 갖습니다. 한 연산자에서 다른 연산자로 메시지를 보내려면 XComs를 사용하세요.
용량 고려 사항
dags/, plugins/, data/ 폴더의 데이터가 Airflow 스케줄러 및 작업자에 동기화됩니다.
plugins/ 폴더의 콘텐츠가 Airflow 웹 서버에 동기화됩니다.
데이터가 많이 입력되면 폴더가 Airflow 구성요소의 로컬 스토리지에서 더 많은 공간을 차지합니다. dags/ 및 plugins/에 데이터를 너무 많이 저장하면 작업이 중단되고 다음과 같은 문제가 발생할 수 있습니다.
작업자 또는 스케줄러가 로컬 스토리지 부족을 겪게 되고 구성요소의 로컬 디스크에서 부족한 공간으로 인해 삭제됩니다.
dags/ 폴더 및 plugins/ 폴더에서 작업자 및 스케줄러로 파일을 동기화하는 데 시간이 오래 걸립니다.
dags/ 및 plugins/ 폴더의 파일을 작업자와 스케줄러에 동기화할 수 없습니다. 예를 들어 dags/ 폴더에 2GB 파일을 저장하지만 Airflow 작업자의 로컬 디스크는 1GB만 수용할 수 있습니다. 동기화하는 동안 작업자의 로컬 스토리지가 부족하면 동기화를 완료할 수 없습니다.
DAG 및 플러그인 폴더
DAG 실행 오류를 방지하기 위해 Python 모듈에 DAG 또는 플러그인이 없더라도 DAG, 플러그인, Python 모듈을 dags/ 폴더 또는 plugins/ 폴더에 저장합니다.
예를 들어 py_file Dataflow 파이프라인을 참조하는 DataFlowPythonOperator를 사용합니다. py_file에는 DAG 또는 플러그인이 포함되지 않지만 dags/ 또는 plugins/ 폴더에 저장해야 합니다.
데이터 폴더
data/ 폴더의 특정 파일이 특정 Airflow 구성요소에 동기화되는 시나리오가 있습니다. 예를 들어 다음을 수행하는 중에 Cloud Composer가 특정 파일을 처음으로 읽기 시도하는 경우입니다.
DAG 파싱: DAG 파싱 중 파일을 처음 읽으면 Cloud Composer는 DAG를 파싱하는 스케줄러에 파일을 동기화합니다.
DAG 실행: DAG 실행 중에 파일을 처음 읽으면 Cloud Composer가 실행을 실행하는 작업자에게 파일을 동기화합니다.
Airflow 구성요소의 로컬 스토리지가 제한적이므로 구성요소의 디스크 공간을 확보하기 위해 다운로드한 파일을 삭제하는 것이 좋습니다. 동일한 파일을 단일 Airflow 작업자로 다운로드하는 동시 태스크가 있는 경우 로컬 스토리지 사용량이 일시적으로 증가할 수도 있습니다.
로그 폴더
logs/ 폴더는 Cloud Storage API를 사용하여 Airflow 작업자에서 환경 버킷으로 동기화됩니다.
Cloud Storage API 할당량은 이동한 데이터 양으로 계산되므로 시스템에서 실행하는 Airflow 태스크 수에 따라 Cloud Storage API 사용량이 늘어날 수 있습니다. 실행하는 태스크가 많을수록 로그 파일이 커집니다.
웹 서버와 동기화
plugins/ 폴더는 Airflow UI에서 플러그인을 로드할 수 있도록 웹 서버에 자동으로 동기화됩니다.
[[["이해하기 쉬움","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-08-26(UTC)"],[[["\u003cp\u003eCloud Composer creates a Cloud Storage bucket for each environment, which is used to store data like DAGs, plugins, data, and logs.\u003c/p\u003e\n"],["\u003cp\u003eSpecific folders within the Cloud Storage bucket, such as \u003ccode\u003edags/\u003c/code\u003e and \u003ccode\u003eplugins/\u003c/code\u003e, are synchronized to Airflow components, enabling dynamic updates to DAGs and custom code, with \u003ccode\u003edags/\u003c/code\u003e and \u003ccode\u003eplugins/\u003c/code\u003e synchronizing unidirectionally, and \u003ccode\u003edata/\u003c/code\u003e and \u003ccode\u003elogs/\u003c/code\u003e bidirectionally.\u003c/p\u003e\n"],["\u003cp\u003eStoring large amounts of data in the \u003ccode\u003edags/\u003c/code\u003e and \u003ccode\u003eplugins/\u003c/code\u003e folders can lead to operational issues, including insufficient storage space and slow synchronization.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edata/\u003c/code\u003e folder is not synchronized to Airflow triggerers or the web server by default, but files may be synchronized on-demand during DAG parsing or execution, and the \u003ccode\u003eplugins/\u003c/code\u003e folder is synchronized with the web server.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003elogs/\u003c/code\u003e folder stores Airflow task logs, which are synchronized to the environment's bucket via the Cloud Storage API, so an increase in tasks can increase storage use and API costs.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n[Cloud Composer 3](/composer/docs/composer-3/cloud-storage \"View this page for Cloud Composer 3\") \\| **Cloud Composer 2** \\| [Cloud Composer 1](/composer/docs/composer-1/cloud-storage \"View this page for Cloud Composer 1\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page describes what data Cloud Composer stores for your environment\nin Cloud Storage.\n\nWhen you create an environment, Cloud Composer creates a\n[Cloud Storage](/storage) bucket and associates the bucket\nwith your environment. The name of the bucket is based on the environment\nregion, name, and a random ID such as `us-central1-b1-6efabcde-bucket`.\n\nCloud Composer synchronizes specific folders in\nyour environment's bucket to Airflow components that run in your environment.\nFor example, when you update a file with the code of your Airflow DAG in the\nenvironment's bucket, Airflow components also receive the updated version.\nCloud Composer uses [Cloud Storage FUSE](/storage/docs/gcs-fuse)\nfor synchronization.\n| **Note:** Deleting your environment does not delete the environment's bucket. To avoid incurring charges to your Cloud Billing account, download your data and then [delete the Cloud Storage bucket](/storage/docs/deleting-buckets).\n\nFolders in the Cloud Storage bucket\n\n| Folder | Storage path | Mapped directory | Description |\n|---------|----------------------------|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| DAG | `gs://bucket-name/dags` | `/home/airflow/gcs/dags` | Stores the DAGs for your environment. |\n| Plugins | `gs://bucket-name/plugins` | `/home/airflow/gcs/plugins` | Stores your custom plugins, such as custom in-house Airflow operators, hooks, sensors, or interfaces. |\n| Data | `gs://bucket-name/data` | `/home/airflow/gcs/data` | Stores the data that tasks produce and use. |\n| Logs | `gs://bucket-name/logs` | `/home/airflow/gcs/logs` | Stores the Airflow logs for tasks. Logs are also available in the [Airflow web interface](/composer/docs/composer-2/access-airflow-web-interface) and in **Logs** tab in Google Cloud console. |\n\nCloud Composer synchronizes folders uni-directionally: from the\nbucket to Airflow components. Unidirectional synchronizing means that local\nchanges in these folders on an Airflow component are overwritten.\n| **Important:** The content of the `data/` folder is synchronized to Airflow schedulers and workers. This folder **is not** synchronized to Airflow triggerers or the web server. Apply suggestions from the related [known limitations](/composer/docs/composer-2/composer/docs/composer-2/known-issues#sharing-files-with-webserver) to synchronize files to the Airflow web server.\n\nData synchronization is eventually consistent. To send messages\nfrom one operator to another,\nuse [XComs](https://airflow.apache.org/docs/apache-airflow/stable/concepts/xcoms.html).\n\nCapacity considerations\n\nData from `dags/`, `plugins/` and `data/` folders are synchronized to Airflow\nscheduler(s) and workers.\n\nThe contents of the `plugins/` folder is synchronized to the Airflow web server.\n\n\n| **Caution:** Don't put more than 100 MB of data into `/dags` or `/plugins` folder. Avoid storing additional files generated by Airflow components in these folders.\n\nThe more data is put into these folders, the more space is occupied\nin the local storage of Airflow components. Saving too much data in\n`dags/` and `plugins/` can disrupt your operations and lead to issues such as:\n\n- A worker or a scheduler runs out of local storage and is evicted because\n of insufficient space on the local disk of the component.\n\n- Synchronization of files from `dags/` and `plugins/` folders to workers and\n schedulers takes a long time.\n\n- Synchronizing files from `dags/` and `plugins/` folders to workers and\n schedulers becomes impossible. For example, you store a 2 GB file in the\n `dags/` folder, but the local disk of an Airflow worker can only\n accommodate 1 GB. During the synchronization, the worker runs out of local\n storage and synchronization can't be completed.\n\nDAGs and plugins folders\n\nTo avoid DAG run failures, store your DAGs, plugins, and Python modules in the\n`dags/` or `plugins/` folders, even if your Python modules don't contain DAGs\nor plugins.\n\nFor example, you use a `DataFlowPythonOperator` that references a `py_file`\nDataflow pipeline. That `py_file` doesn't contain DAGs or\nplugins, but you must still store it in the `dags/` or `plugins/` folder.\n\nData folder **Important:** In general, the contents of the `data/` folder are not synchronized to Airflow components by default.\n\nThere are scenarios when certain files from the `data/` folder are\nsynchronized to a specific Airflow component. For example, when\nCloud Composer attempts to read a given file for the first time during:\n\n- DAG parsing: When a file is read for the first time during DAG parsing,\n Cloud Composer synchronizes it to the scheduler that parses the DAG.\n\n- DAG execution: When a file is read for the first time during DAG execution,\n Cloud Composer synchronizes it to the worker running the execution.\n\nAirflow components have limited local storage, so consider deleting\ndownloaded files to free disk space in your components. Notice that local\nstorage usage can also temporarily go up if you have concurrent tasks that\ndownload the same file to a single Airflow worker.\n| **Note:** Do not put Python modules required during the DAG parsing into the `data/` folder. It can have a negative impact on your DAG parsing and task scheduling latency.\n\nLogs folder\n\nThe `logs/` folder is synchronized from Airflow workers to the environment's\nbucket using the Cloud Storage API.\n\nCloud Storage API quota is calculated by the amount of data moved, so\nthe number of Airflow tasks your system runs can increase\nyour Cloud Storage API usage: the more tasks you run, the bigger your log\nfiles.\n| **Note:** In rare cases you might be increasing log levels from `INFO` to `DEBUG`, as described in [Troubleshooting DAGs](/composer/docs/composer-2/troubleshooting-dags). Note that such operations produce additional logs and could increase your syncing and storing costs.\n\nSynchronization with the web server\n\nThe `plugins/` folder is automatically synchronized to the web server so that\nplugins can be loaded by Airflow UI.\n\n\n| **Important:** The contents of the `data/` folder aren't synchronized to the web server.\n\nWhat's next\n\n- [View logs](/composer/docs/composer-2/view-logs)\n- [Manage DAGs](/composer/docs/composer-2/manage-dags)\n- [Write DAGs](/composer/docs/composer-2/write-dags)"]]