Worker Configuration Patterns
These patterns cover how you set up Workers, route work to them, and give Activities the external dependencies they need — while keeping Workflow code deterministic and testable.
Patterns in this section
Worker-Specific Task Queues
Routes Activities to a specific Worker using a unique Task Queue, for Worker affinity and host-specific processing.
Activity Dependency Injection
Injects external dependencies — clients, connections, configuration — into Activities at Worker startup, keeping Workflow code deterministic and Activities testable.
Choosing a pattern
A sequence of Activities must run on the same Worker host: use Worker-Specific Task Queues to pin them to one Worker.
Activities depend on external resources: use Activity Dependency Injection to supply them at startup rather than constructing them inside each Activity.
Related sections
- QoS & Throughput Patterns — Task Queue routing for rate control and fairness
- Performance & Latency Patterns — run Activities in-process with Local Activities