What are Hash Tags?
Hash tags are used to guarantee that certain keys are placed in the same hash slot. A hash tag is defined with brackets. A key that has a substring inside brackets will use that substring to determine in which hash slot the key will be placed. Read more about hash tags in the Redis cluster tutorial.Configuration Options
You can use two approaches to make the Queues compatible with Cluster:Option 1: Queue Prefix
Define a queue prefix wrapped in brackets:Option 2: Queue Name
Wrap the queue name itself in brackets:Multiple Queues
Connecting to Redis Cluster
Use ioredis Cluster connection:Workers and QueueEvents
The same prefix rules apply to Workers and QueueEvents:Best Practices
1
Use Hash Tags
Always wrap queue names or prefixes in brackets for cluster compatibility
2
Distribute Load
Use different prefixes for different queues to spread load across cluster nodes
3
Consistent Naming
Use the same prefix across Queue, Worker, and QueueEvents for the same queue
4
Test Failover
Test your setup with node failures to ensure proper cluster behavior
Related Resources
Connections
Learn about Redis connection configuration
Redis Compatibility
Redis version requirements and compatibility
