Overview
Work queues provide the infrastructure for distributing and executing tasks across workers. Kubiya uses Temporal for reliable, scalable task orchestration with automatic retries and failure handling.Task Queues (Legacy)
Task queues were the original queuing mechanism in Kubiya. They provide:- Basic task distribution
- FIFO execution
- Simple worker assignment
Worker Queues
Worker queues are the modern queuing system built on Temporal. They provide:- Horizontal scaling: Add workers dynamically based on load
- Priority queues: Execute high-priority tasks first
- Partitioning: Distribute tasks across multiple queue partitions
- Observability: Track queue depth, processing time, and worker health
- Durability: Tasks survive crashes and restarts
- Default queue: General-purpose task execution
- High-priority queue: For urgent tasks
- Low-priority queue: For background jobs
- Dedicated queues: For specific workloads or teams
Workers
Workers are the execution engines that process tasks from queues. They:- Poll queues for available tasks
- Execute agent and workflow operations
- Report heartbeats for health monitoring
- Handle task failures and retries
- Concurrency limits
- Timeout settings
- Resource allocations
- Queue subscriptions
Queue Architecture
Common Operations
Create a Worker Queue
List Worker Queues
Get Worker Registration Command
Get Install Script
platform:docker,kubernetes, orlocal
Register a Worker
Send Worker Heartbeat
Queue Monitoring
Monitor queue health through:- Queue depth (pending tasks)
- Processing rate (tasks per minute)
- Worker count (active workers)
- Task latency (time to execution)
- Error rates
Best Practices
- Queue Design: Create separate queues for different priorities or workload types
- Worker Scaling: Scale workers based on queue depth and latency
- Heartbeats: Send regular heartbeats to detect unhealthy workers
- Timeouts: Set appropriate task timeouts to prevent stuck tasks
- Monitoring: Track queue metrics to identify bottlenecks
- Resource Limits: Configure concurrency limits to prevent resource exhaustion
Migrating from Task Queues
If you’re using legacy task queues, migrate to worker queues for:- Better scalability and performance
- Enhanced observability
- More flexible worker management
- Improved reliability with Temporal