# Multiple instances of worker services interacting with temporal server

**URL:** <https://community.temporal.io/t/multiple-instances-of-worker-services-interacting-with-temporal-server/9806>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [October 12, 2023, 3:29am UTC](https://community.temporal.io/t/multiple-instances-of-worker-services-interacting-with-temporal-server/9806 "2023-10-12T03:29:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![waykar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/waykar/32/4392_2.png) [@waykar](https://community.temporal.io/u/waykar)\
**Post date:** [October 12, 2023, 3:29am UTC](https://community.temporal.io/t/multiple-instances-of-worker-services-interacting-with-temporal-server/9806/1 "2023-10-12T03:29:19Z")

</div>

If we have multiple instances (say 3) of a worker service running and it interacts with the temporal server.  
If we have an API being invoked in container 1 which triggers WF1, and on container 2 we have WF2 being triggered. How are the respective activities executed for WF1 and WF2. Will it utilize container 3 worker threads as well?  
I would be interested in understanding this in more detail. Can you please point me to the documentation?

---

<div class="post-metadata">

**Author:** ![antonio.perez](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/antonio.perez/32/2417_2.png) [@antonio.perez](https://community.temporal.io/u/antonio.perez)\
**Post date:** [October 14, 2023, 12:08am UTC](https://community.temporal.io/t/multiple-instances-of-worker-services-interacting-with-temporal-server/9806/2 "2023-10-14T00:08:49Z")

</div>

Hi @waykar

When your workers connect to the server, they open a long poll connection requesting for workflow and activity tasks. You can find an small explanation here [Workflow vs Activity - #3 by antonio.perez](https://community.temporal.io/t/workflow-vs-activity/9826/3), let me know if it helps.

> Will it utilize container 3 worker threads as well?

Temporal server will do a fairly distribution of the load (tasks) across the workers listening to the same taskqueue, so it is highly possible that astivity tasks get dispatched to all workers.

> If we have an API being invoked in container 1 which triggers WF1, and on container 2 we have WF2 being triggered.

The same mentioned before for activities applies to workflows. If you have more than one worker listening to the same taskqueue, when you schedule a workflow it can run in any worker

Antonio

---

<div class="post-metadata">

**Author:** ![waykar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/waykar/32/4392_2.png) [@waykar](https://community.temporal.io/u/waykar)\
**Post date:** [October 15, 2023, 4:42am UTC](https://community.temporal.io/t/multiple-instances-of-worker-services-interacting-with-temporal-server/9806/3 "2023-10-15T04:42:54Z")

</div>

@antonio.perez This does help in understanding the internals. Thank you

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [October 16, 2023, 4:39pm UTC](https://community.temporal.io/t/multiple-instances-of-worker-services-interacting-with-temporal-server/9806/4 "2023-10-16T16:39:54Z")

</div>

Also, workflow is not tied to a specific worker and can move between them at any time. Otherwise, a failure of a single worker might block workflow execution.
