最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Optimizing Worker Allocation for Prioritized Workflows in Temporal - Stack Overflow

programmeradmin0浏览0评论

I’m working on an application that runs long-running, heavy-duty batch jobs using Temporal workflows. Each job falls into one of three priority levels: low, medium, or high. Which is separated by creating thre type of worker queues.

To ensure high-priority jobs get precedence in terms of worker allocation and execution speed, we are configuring the following Temporal worker settings:

.setMaxConcurrentWorkflowTaskExecutionSize(x)  
.setMaxWorkerActivitiesPerSecond(y)  
.setMaxTaskQueueActivitiesPerSecond(z) 

These settings allow us to allocate more workers and execution capacity to high-priority workflows.

Potential Issue A concern I have is resource underutilization:

  1. If there are few or no high-priority jobs, then low-priority jobs may remain unnecessarily throttled because their configured limits are lower.
  2. As a result, system resources (CPU, memory, workers) may be underutilized even when there is pending work in lower-priority queues.

Question Is this concern valid? If so, what is the best way to dynamically adjust worker allocation so that available resources are fully utilized when high/medium-priority jobs are absent, while still ensuring that high-priority jobs take precedence when they arrive?

Would love to hear best practices or strategies (e.g., dynamic scaling, adaptive rate limits, multiple worker pools) that have worked in similar use cases.

Thanks!

发布评论

评论列表(0)

  1. 暂无评论