Priority queue pattern
The previous queuing chain pattern is a great example of how to begin working with independent systems in a complex setup. Using the same example, we can show how to give priority to queues using third-party tools. Imagine a system where the workers might have multiple queues to work from. You can scale the worker systems independently by dedicating some instances to one queue and some instances to the other.
However, the problem in doing so is that you will have duplicate logic across both sets of instances. Using the previous example, all workers would still solve the problem with the same fibonacci algorithm but we will have to manage two sets of instances. Instead, the better route would be to assign a weight to the queues ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access