When multiple Activities in a Temporal workflow need to share resources like ML models, file caches, or database connections, routing them all to the same Worker avoids redundant overhead. The pattern works by having each Worker poll both a shared Task Queue and a unique per-Worker Task Queue. The Workflow first calls an Activity on the shared queue to discover a Worker's unique queue name, then routes all subsequent Activities to that specific queue, ensuring data locality throughout the workflow execution.

1m read timeFrom temporal.io
Post cover image
47 Impressions