[GH-ISSUE #1002] [BUG] The queue prefix "{ }" will cause the data to be allocated to one data node. #2507

Open
opened 2026-03-15 20:44:24 +03:00 by kerem · 3 comments
Owner

Originally created by @antyiwei on GitHub (Jan 4, 2025).
Original GitHub issue: https://github.com/hibiken/asynq/issues/1002

Originally assigned to: @hibiken, @kamikazechaser on GitHub.

Describe the bug
The queue prefix "{ }" will cause the data to be allocated to one data node.

"{}" is it necessary?

https://redis.io/docs/latest/operate/oss_and_stack/reference/cluster-spec/#hash-tags

Originally created by @antyiwei on GitHub (Jan 4, 2025). Original GitHub issue: https://github.com/hibiken/asynq/issues/1002 Originally assigned to: @hibiken, @kamikazechaser on GitHub. **Describe the bug** The queue prefix "{ }" will cause the data to be allocated to one data node. "{}" is it necessary? https://redis.io/docs/latest/operate/oss_and_stack/reference/cluster-spec/#hash-tags
Author
Owner

@yousifh commented on GitHub (Jan 6, 2025):

This is necessary for a Redis cluster so all the keys related to a queue go to one node. So when a Lua script executes for a particular queue, all the relevant keys the script will interact with are in the same node.

<!-- gh-comment-id:2572286976 --> @yousifh commented on GitHub (Jan 6, 2025): This is necessary for a Redis cluster so all the keys related to a queue go to one node. So when a Lua script executes for a particular queue, all the relevant keys the script will interact with are in the same node.
Author
Owner

@antyiwei commented on GitHub (Jan 9, 2025):

Hello, thank you for your reply. If we use the REDIS provided by the cloud vendor and access it through a proxy address, can we remove the "{}" tags? It's quite troublesome here.

<!-- gh-comment-id:2579049038 --> @antyiwei commented on GitHub (Jan 9, 2025): Hello, thank you for your reply. If we use the REDIS provided by the cloud vendor and access it through a proxy address, can we remove the "{}" tags? It's quite troublesome here.
Author
Owner

@pior commented on GitHub (Jan 31, 2025):

The queue prefix "{ }" will cause the data to be allocated to one data node.

If we use the REDIS provided by the cloud vendor and access it through a proxy address

I don't fully understand your environment, but it sounds like your proxy is either:

  • not supporting the semantic of the curly braces tag
  • or doing exactly what it's supposed to: placing all keys about a queue in the same slot

With multiple nodes, you can get queues to run in different nodes, but you cannot have one queue distributed across multiple nodes.

<!-- gh-comment-id:2627001821 --> @pior commented on GitHub (Jan 31, 2025): > The queue prefix "{ }" will cause the data to be allocated to one data node. > If we use the REDIS provided by the cloud vendor and access it through a proxy address I don't fully understand your environment, but it sounds like your proxy is either: - not supporting the semantic of the curly braces tag - or doing exactly what it's supposed to: placing all keys about a queue in the same slot With multiple nodes, you can get queues to run in different nodes, but you cannot have one queue distributed across multiple nodes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#2507
No description provided.