Deployment Options
Temporal Server supports multiple deployment strategies:Docker
Run Temporal Server using Docker containers for development and production
Kubernetes
Deploy to Kubernetes using Helm charts for scalable production workloads
Binary Deployment
Run the compiled binary directly on bare metal or virtual machines
Temporal Cloud
Fully managed service with zero operational overhead
Architecture Components
A Temporal Server deployment consists of several key services:Core Services
Frontend Service- Handles all incoming API requests from clients
- Default ports: gRPC
7233, HTTP7243 - Stateless and horizontally scalable
- Maintains workflow execution state and history
- Default ports: gRPC
7234, membership6934 - Stateful service using consistent hashing for sharding
- Routes workflow and activity tasks to workers
- Default ports: gRPC
7235, membership6935 - Manages task queues and load balancing
- Executes internal system workflows
- Default ports: gRPC
7239, membership6939 - Required for archival and other background operations
- Separate internal-only API endpoint
- Default ports: gRPC
7236, HTTP7246 - Used for internal cross-cluster communication
Storage Requirements
Temporal requires two types of data stores:Persistence Store
Persistence Store
Stores workflow execution state, history events, and system metadata.Supported Databases:
- Cassandra 3.11+
- MySQL 8.0+
- PostgreSQL 12+ (postgres12, postgres12_pgx)
- SQLite (development only)
namespaces- Namespace metadataexecutions- Workflow execution stateshards- Shard ownership and range IDstasks- Transfer, timer, and replication tasks
Visibility Store
Visibility Store
Enables workflow search and listing operations.Supported Databases:
- MySQL 8.0+ (standard visibility)
- PostgreSQL 12+ (standard visibility)
- Elasticsearch 7.10+ (advanced visibility)
- Standard: Basic filtering and search
- Advanced: Full-text search, custom search attributes
Deployment Considerations
Resource Requirements
- Development
- Production
Minimal Setup:Suitable for:
- Local development
- Testing
- CI/CD environments
High Availability
For production deployments, ensure:- Multiple Service Instances: Run at least 2 instances of each service
- Database Replication: Use replicated database clusters
- Load Balancing: Distribute traffic across Frontend instances
- Persistent Storage: Use durable storage for archival if enabled
- Monitoring: Deploy Prometheus and Grafana for metrics
Network Configuration
All services use membership ports for internal cluster coordination via the ringpop protocol.
Security Considerations
TLS Configuration
Temporal supports mutual TLS (mTLS) for:- Internode Communication: Between Temporal services
- Frontend Communication: Between clients and Frontend
Authentication & Authorization
Configure JWT-based authentication:- Key source URIs for public keys
- Claims mapping for permissions
- Custom authorizer and claim mapper plugins
Network Security
- Use private networks for service-to-service communication
- Expose only Frontend service to clients
- Implement network policies in Kubernetes
- Use database connection encryption (TLS)
Monitoring and Observability
Metrics
Temporal emits metrics in Prometheus format:Profiling
Enable pprof for runtime profiling:Logging
Configure log output:Scaling Guidelines
Horizontal Scaling
Frontend & Matching: Scale based on request rate- Add instances when CPU > 70%
- Each instance handles ~10k requests/sec
- Shards are distributed across History instances
- More shards = better distribution
- Each instance can handle ~1k-2k workflows/sec
Vertical Scaling
Increase resources when:- History Service: Large workflow histories (>10k events)
- Matching Service: High task queue throughput
- Frontend: Complex query patterns
Database Scaling
- Number of service instances
- Database capacity
- Query latency
Next Steps
Choose Deployment Method
Select Docker, Kubernetes, or binary deployment based on your infrastructure
Setup Database
Configure Server
Production Checklist
- Database replication configured
- Multiple service instances deployed
- TLS certificates generated and configured
- Monitoring and alerting setup
- Backup and disaster recovery plan
- Load testing completed
- Security review performed