Tasks use xcom_pull to retrieve values from previous tasks. You can filter these requests by: Specify which task the data came from. Keys: Filter for specific identifiers. DAG IDs: Pull from different DAGs if necessary. Best Practices and Limitations
class S3XCom(BaseXCom): @staticmethod def serialize(value): if size_of(value) > 1_000_000: s3_key = upload_to_s3(value) return "__s3_uri": s3_key return value
: By default, XComs are stored in the Airflow metadata database.
Start small: enable a custom XCom backend on one critical DAG, add exclusive key maps, and measure the improvement in reliability and performance. Then expand across your entire Airflow instance.