BlogsTemporalWorker Affinity

Worker Affinity

Worker Affinity

1
posts
2026

Worker Affinity with Task Queues allows ensuring that multiple Activities within a workflow execute on the same Worker. This is achieved by using a combination of shared and unique task queues. The workflow first discovers an available worker via a shared queue and then routes all subsequent activities to that worker's unique queue, maintaining data locality for scenarios like file processing, ML model caching, and database connection pooling.

2026

Worker Affinity with Task Queues

5/11/2026

Introduces the concept of Worker Affinity with Task Queues as a validated pattern to ensure Activity execution on the same Worker. Details a method using shared and unique task queues for workflow-driven worker discovery and subsequent activity routing to maintain data locality.