mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #423] [QUESTION] Redis active-active #1203
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#1203
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @thejosk on GitHub (Mar 21, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/423
Originally assigned to: @hibiken on GitHub.
Hi @hibiken,
We have kubernetes clusters located in multiple (2) data centres. To avoid single point of failure, each data centre will run multiple instances of the
PeriodicTaskManagers, and based on the retention/unique logic mentioned in (https://github.com/hibiken/asynq/discussions/376), only 1 unique job can be enqueued at a time. But my question is how will the data in redis clusters be replicated across both the data centers. I understand that this is more of a redis question, but I'd like to know your thoughts/suggestions on how to solve this problem. Thanks again for your work on this amazing library.@hibiken commented on GitHub (Mar 22, 2022):
@thejosk thank you for the question!
As mentioned in https://redis.io/topics/replication, Redis uses asynchronous replication with traditional leader-follow replication scheme . So in order to guarantee uniqueness of a task, clients issuing write requests (e.g. Enqueue task) needs to talk to the leader redis instance (which may be geographically distant from the client). Client in this case is your
PeriodicTaskManagerprocesses, and they all need to talk to the leader in order to ensure the uniqueness of tasks.To avoid single point of failure in redis, you may also want to look into using Redis Sentinel or Redis Cluster.
Let me know if you have more thoughts and questions :)
@thejosk commented on GitHub (Mar 25, 2022):
Thanks so much @hibiken for your response. I'll reach out if I have more questions. Closing this now. Thanks for your amazing work.