Concurrency control question #694
-
Hello. Thank you for the great library! I have a question about how concurrency control works. Let's say we want to limit the concurrent API call to the 3rd party service to 1. In other words, we want to perform jobs serially. Using Another way is to use a dedicated queue and a process but we really don't want to run a dedicated process if we can. Am I missing something? Thank you again. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
@shouichi You've discovered how the Concurrency Control plugin works: raise and retry with incremental backoff. GoodJob doesn't have a different mechanism for managing concurrency, other than through a dedicated queue and process. It doesn't necessarily have to be a dedicated process if you write some dynamic configuration, but you would have to manage that in you ops process; or do both (hold down your true concurrency, and use the concurrency plugin as backstop) I'm always open to alternative implementations if you have ideas. |
Beta Was this translation helpful? Give feedback.
-
What I meant was that if we wanted to handle a queue serially but go the concurrent exception, it should be a misconfiguration (e.g., booting two processes/threads for the queue). Reviewed the PR, thank you! |
Beta Was this translation helpful? Give feedback.
@shouichi You've discovered how the Concurrency Control plugin works: raise and retry with incremental backoff. GoodJob doesn't have a different mechanism for managing concurrency, other than through a dedicated queue and process. It doesn't necessarily have to be a dedicated process if you write some dynamic configuration, but you would have to manage that in you ops process; or do both (hold down your true concurrency, and use the concurrency plugin as backstop)
I'm always open to alternative implementations if you have ideas.