mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #332] [QUESTION] Does Asynq support multiple servers and processes? Is there a locking mechanism? #147
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#147
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 @SuperL89 on GitHub (Sep 30, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/332
@hibiken commented on GitHub (Oct 1, 2021):
@zhaitailang thank you for the question.
Yes, you can run multiple server processes to read from the same queues. For the most part, no locks are needed since we execute Lua script on Redis which is atomic in terms of execution of the script (see https://redis.io/commands/eval#atomicity-of-scripts).
@gschurck commented on GitHub (Sep 10, 2023):
@hibiken I am wondering, in that case how Redis decides which server to choose to send the task to ?
@kenshin579 commented on GitHub (May 24, 2024):
I'm developing a server program to allow distributed scheduling across multiple servers, and currently, I'm considering the asynq library. I'm a bit unclear on whether I can run multiple periodic schedulers as multiple instances.
In your answer to this issue, you said that it's okay to run on multiple servers without locking. But, in the wiki doc mentioned below, it seems like I have to run only one periodic scheduler which means I cannot run my program in multiple servers.
Should I just make sure that only one instance is running the periodic scheduler? Is my understanding correct?
Reference: https://github.com/hibiken/asynq/wiki/Periodic-Tasks