Overview
When using the Celery runtime (runtime: celery), PyWorkflow requires a message broker to
transport messages between your application and workers, and optionally a result backend to
store task results.
This guide only applies when using the Celery runtime for distributed execution. The local runtime
(
runtime: local) runs workflows in-process and does not require a broker.Redis
Simple, fast, and recommended for most deployments
Redis Sentinel
High-availability Redis with automatic failover
Redis
Redis is the recommended broker for most PyWorkflow deployments. It’s simple to set up, provides excellent performance, and supports both broker and result backend functionality.Basic Configuration
- Config File
- Environment Variables
- Programmatic
URL Format
Examples
TLS/SSL Connection
For encrypted connections, use therediss:// scheme:
When using
rediss://, ensure your Redis server is configured with TLS certificates.Redis Sentinel
Redis Sentinel provides high availability for Redis through automatic failover. When a master node fails, Sentinel automatically promotes a replica to master, ensuring your workflows continue processing with minimal interruption.When to Use Sentinel
Use Redis Sentinel when you need:- High availability: Automatic failover when master fails
- Monitoring: Constant health checks on Redis instances
- Notification: Alerts when Redis instances change state
- Configuration provider: Clients discover current master automatically
Basic Configuration
- Config File
- Environment Variables
- CLI Arguments
URL Format
Configuration Options
Examples
TLS/SSL with Sentinel
For encrypted connections to Sentinel, use thesentinel+ssl:// scheme:
Sentinel Architecture
A typical Sentinel deployment consists of:Configuration Reference
Environment Variables
CLI Options
See the CLI Guide for all available worker options including
autoscaling, task limits, and arbitrary Celery argument passthrough.
Config File Options
Choosing a Broker
Troubleshooting
Connection Refused
Sentinel Master Not Found
- Verify the master name matches your Sentinel configuration
- Check that Sentinel instances are running and healthy
- Ensure network connectivity between your application and Sentinel
Authentication Failed
Next Steps
CLI Guide
Learn CLI commands for worker management
Configuration
Complete configuration reference
Fault Tolerance
Learn about automatic recovery
Workflows
Learn workflow concepts