Multiple Worker instances and polling

You mean like if you have multiple workers listening to the same task queue, which one will receive the workflow task?

Short answer, it’s random. Task queue has multiple partitions (by default 4). When a worker tries to poll a task queue, it is first randomly picked one of the partitions and it waits for tasks on that partition.
If a worker waits for too long for a task, the temporal server matching service will poll the root partition.

Regarding production deployments, see our docs page, and also the forum links mentioned in this post. Let us know if you have specific questions.

1 Like