Background Workers
Run background jobs, process queues, and execute async tasks without managing infrastructure. Background Workers automatically scale based on workload.What are Background Workers?
Background Workers are specialized services designed to process asynchronous tasks, queues, and scheduled jobs. They run continuously and automatically scale based on queue depth and workload.Key Features
- Queue Processing: Process jobs from message queues
- Auto-scaling: Automatically scale workers based on queue size
- Retry Logic: Automatic retries for failed jobs
- Dead Letter Queue: Handle permanently failed jobs
- Monitoring: Track job processing metrics
- Cost Efficient: Pay only for active processing time
Use Cases
- Processing user uploads and media
- Sending batch emails and notifications
- Data synchronization and ETL jobs
- Report generation and exports
- Image processing and optimization
- Payment processing
- Integration with third-party APIs
Supported Queue Types
- Redis: Redis-compatible queues
- RabbitMQ: AMQP message queues
- PostgreSQL: Database-backed queues
- SQS: Amazon SQS integration
- Custom: Your own queue implementation
Getting Started
- Create a Background Worker service
- Connect your code that processes jobs
- Configure queue settings and connection strings
- Set up retry logic and error handling
- Deploy and start processing jobs
Configuration Example
Scaling Configuration
Configure auto-scaling with:- Min instances: Minimum number of workers
- Max instances: Maximum number of workers
- Queue threshold: Queue depth to trigger scaling
- Scale-down delay: Time before scaling down
Pricing
Background Workers are billed by:- Worker hours: Time workers are running
- CPU/Memory: Resource allocation
- Queue size: Storage for queued jobs
Deploy Your First Worker
Get started with background workers

