Conversation
Explains the relationship between TemporalWorkerDeployment and Task Queues. Multiple task queues can be grouped in a single TWD by running multiple containers (each polling one queue) in the same pod. Splitting into separate TWDs is an optimization when queues have different scaling requirements or deployment cadences. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
183f4f2 to
1a88982
Compare
| └──────────────────────────────────────────────────────────────────┘ | ||
| ``` | ||
|
|
||
| > **Note:** Each worker process polls exactly one Task Queue. To handle multiple queues, run multiple containers. |
There was a problem hiding this comment.
From the controller perspective, it's totally fine to handle multiple queues within the same container though. If there are other reasons someone wants to separate pollers of different task queues into different containers, they're free to do that, but I can't think of a compelling benefit.
If different workers have different resource requirements or scaling requirements, they need to be put into different Deployments anyway.
|
|
||
| Consider creating separate TemporalWorkerDeployment resources when Task Queues have: | ||
|
|
||
| **Different scaling requirements** - One queue may need 10 replicas while another needs 2: |
There was a problem hiding this comment.
This guidance makes sense to me given the current state of the controller.
Someday I'd like to see the controller support creating multiple Deployments with the same Version, so that people can have multiple task queues in the same version, with workers scaled separately. I don't think we should block GA or AutoScaling on that though, so it will just have to come later I suppose
| value: "notifications" | ||
| ``` | ||
|
|
||
| **Different deployment cadences** - You want to roll out changes to one queue without affecting others, or test changes on a low-risk queue before rolling to critical queues. |
There was a problem hiding this comment.
This is the best reason to put your worker and task queue in a separate TWD. I'd love to live in a world some day where the only reason to separate your workers is because you want to deploy and version them separately (not just because you want to scale them separately)
Summary
docs/task-queues.mdexplaining the relationship between TemporalWorkerDeployment and Task QueuesWhy
Users are asking whether a single TWD can handle multiple Task Queues, or if each TWD should map to a single worker instance. This doc clarifies:
Checklist
🤖 Generated with Claude Code