Deployment Architecture Overview
ZenML provides a flexible deployment architecture that supports both local development and production-scale deployments. Understanding the deployment options helps you choose the right approach for your MLOps infrastructure.Architecture Components
A ZenML deployment consists of several key components:ZenML Server
The ZenML server is the central component that provides:- REST API: Exposes endpoints for pipeline management, artifact tracking, and metadata storage
- Dashboard: Web-based UI for monitoring pipelines and managing resources
- Authentication: Supports multiple auth schemes (NO_AUTH, HTTP_BASIC, OAUTH2_PASSWORD_BEARER, EXTERNAL)
- Database Backend: Stores pipeline metadata, artifacts, and configuration (SQLite or MySQL-compatible databases)
- Secrets Management: Secure storage for credentials and sensitive data
Database Layer
ZenML supports two database types: SQLite (Development)- Local file-based database
- No external dependencies
- Suitable for development and testing
- Limited scalability and no concurrent access
- External database service
- High availability and scalability
- Connection pooling and SSL support
- Backup and recovery capabilities
Artifact Store
Stores pipeline artifacts and outputs:- Local filesystem (development)
- Cloud object storage (S3, GCS, Azure Blob)
- Network-attached storage (NFS, EFS)
Orchestrator
Executes pipeline steps:- Local orchestrator (development)
- Kubernetes (production)
- Cloud-managed services (Vertex AI, SageMaker, AzureML)
Deployment Types
ZenML supports multiple deployment scenarios:Local Development
Local Server
Quick setup for development and testing on your local machine.
- SQLite database
- Local artifact storage
- Single-user access
- Quick iteration and debugging
- Pipeline development
- Local testing
- Proof of concepts
- Learning ZenML
Docker Deployment
Docker Container
Containerized server deployment for consistent environments.
- Isolated environment
- Reproducible setup
- Easy to start/stop
- Configurable resources
- Development teams
- CI/CD integration
- Local production testing
- Multi-user development
Kubernetes Deployment
Kubernetes with Helm
Production-grade deployment with high availability and scalability.
- Horizontal scaling
- High availability
- Load balancing
- Advanced networking
- Resource management
- Production deployments
- Enterprise environments
- Multi-tenant setups
- Cloud-native infrastructure
Cloud-Managed Services
Cloud Platforms
Deploy on managed cloud platforms for fully managed infrastructure.
- Fully managed infrastructure
- Automatic scaling
- Built-in monitoring
- Managed databases and storage
- AWS (ECS, EKS, App Runner)
- GCP (Cloud Run, GKE)
- Azure (Container Apps, AKS)
Deployment Decision Matrix
Choose your deployment type based on these criteria:| Criteria | Local | Docker | Kubernetes | Cloud-Managed |
|---|---|---|---|---|
| Ease of Setup | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐ |
| Scalability | ⭐ | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| High Availability | ❌ | ❌ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Multi-User | ⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Production Ready | ❌ | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Cost | Free | Low | Medium | Medium-High |
| Maintenance | None | Low | Medium-High | Low |
Authentication Schemes
ZenML server supports multiple authentication methods:NO_AUTH
No authentication required. Suitable only for local development.HTTP_BASIC
Simple username/password authentication.OAUTH2_PASSWORD_BEARER
OAuth2-based authentication with JWT tokens (recommended for production).EXTERNAL
Integrate with external authentication providers (SSO, LDAP, etc.).Environment Variables
Key environment variables for ZenML server configuration:Server Configuration
Database Configuration
Performance Settings
Secrets Store Configuration
Security Considerations
Network Security
- Use HTTPS in production
- Configure proper firewall rules
- Implement network policies in Kubernetes
- Use VPC/subnet isolation
Authentication
- Always use authentication in production
- Rotate JWT secret keys regularly
- Use strong passwords
- Enable external auth for SSO
Secrets Management
- Encrypt secrets at rest
- Use cloud secrets managers
- Rotate credentials regularly
- Audit secret access
Database Security
- Use SSL for database connections
- Verify server certificates
- Restrict database access
- Regular backups and encryption
High Availability Setup
For production deployments requiring high availability:Multiple Replicas
External Database
Use managed database services:- AWS RDS (MySQL)
- Google Cloud SQL (MySQL)
- Azure Database for MySQL
Load Balancing
Distribute traffic across replicas:- Kubernetes Service (ClusterIP)
- Ingress Controller (nginx, traefik)
- Cloud Load Balancers
Health Checks
Configure readiness and liveness probes:Monitoring and Observability
Metrics
ZenML server exposes metrics for monitoring:- Request count and latency
- Database connection pool usage
- Authentication failures
- Pipeline run statistics
Logging
Configure logging verbosity:Health Endpoints
/health- Liveness check/ready- Readiness check/version- Server version information
Next Steps
Server Deployment
Learn about different server deployment options
Kubernetes Deployment
Deploy ZenML on Kubernetes with Helm
Docker Deployment
Run ZenML server in Docker containers
Configuration Guide
Customize your deployment configuration
