Hello I have a general question about workers.
We have some services that start multiple workers, for different task-queues.
We typically start a couple of workers per micro-service:
- 1 worker handles internal logic, so it registers activities and worklows on the “internal task-queue”, this logic is no meant to be consumed by other microservices.
- 1 worker handles logic that could be consumed by other microservices, so this is registered on a “publicly known” task-queue
- Another reason we like to sometimes split microservices into multiple worker/task-queue combinations is that we don’t need to worry about the Activity names since they only need to be unique within a task-queue (ofc this can be solved in other ways)
This idea of starting multiple workers per microservice, is it very bad ?
I found this comment in all of the go-sampels source code => “// The client and worker are heavyweight objects that should be created once per process.”
Currently we don’t really notice any problem with this, although our system typically dont experience very high load, we use temporal more to ensure corectness. But even though we dont experience any issues now we would like to follow good design. I do understand that 1 worker per service makes it easier to scale things that require more computing power, since you can just increase the amount of workers for that particular work.
Ty in advance!