Production Airflow 3.x on Snowpark Container Services: A Complete Reference Architecture
Summary
This article details a production-grade reference architecture for deploying Apache Airflow 3.1.7 on Snowpark Container Services (SPCS), addressing the complexities of running seven interdependent services across three compute pools. The architecture leverages SPCS for data governance, network, and billing integration, utilizing an INFRA_POOL for PostgreSQL 17.9 and Redis 7.4, a CORE_POOL for Airflow's brain services (API server, scheduler, DAG processor, triggerer), and an auto-scaling WORKER_POOL for CeleryExecutor tasks. The solution includes 542 automated tests to prevent configuration drift and highlights 13 specific SPCS "gotchas" related to DNS, secret injection, readiness probes, and volume permissions, providing a robust, open-source framework for Airflow orchestration within Snowflake.
Key takeaway
For MLOps Engineers or AI Architects considering Airflow orchestration within Snowflake, this reference architecture provides a validated path. You should adopt the multi-pool service deployment and leverage Snowflake SECRET objects for critical configurations like JWTs. Pay close attention to the 13 SPCS-specific "gotchas" to avoid silent failures, especially regarding DNS naming, secret injection, and the `dag-processor` service. Utilize the provided three-tier test suite to prevent configuration drift and ensure deployment reliability.
Key insights
Deploying Airflow 3.x on SPCS requires a multi-service architecture with careful configuration and robust testing.
Principles
- Isolate services into distinct compute pools for performance.
- Use Snowflake SECRET objects for consistent JWT secret sharing.
- Validate configurations with comprehensive static and runtime tests.
Method
The proposed method involves deploying seven Airflow services across three SPCS compute pools, managing secrets via Snowflake SECRET objects, and validating the entire stack with a three-tier test suite (offline, local integration, end-to-end).
In practice
- Configure `AIRFLOW__CORE__EXECUTION_API_SERVER_URL` with `/execution/` suffix.
- Run `dag-processor` as a separate SPCS service.
- Set `AIRFLOW__SCHEDULER__SYMLINK_LATEST_LOG=False` for GCP stage mounts.
Topics
- Snowpark Container Services
- Apache Airflow 3.x
- Data Pipeline Orchestration
- Reference Architectures
- Configuration Validation
Code references
Best for: MLOps Engineer, Data Engineer, AI Architect
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Data Engineering on Medium.