NatLabRockies / NatLabRockies/openstudio-server-helm
Phase 2: Queue Priority Mechanism for Fair Scheduling
Nobody has claimed this yet.
- Dominant language
- Go Template
- Stars
- 12
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
Problem
Resque uses FIFO ordering on a single simulations list. There is no priority queuing, backpressure mechanism, or job batching (B11). At scale, requeued jobs (retries) compete with fresh jobs at the same priority, and long-running simulations can block shorter ones.
What Phase 1 Did
- Nothing — queue structure unchanged.
worker.queues: "simulations,requeued"still uses flat priority.
What Should Be Done (This Issue)
- Multiple queue support: Add ability to configure separate Resque queues for different priority levels (e.g.,
expedited,bulk,requeued) - Queue routing: Allow web-background to enqueue jobs to different queues based on analysis parameters (requires app changes)
- Worker queue configuration: Support
worker.queueGroupsin values.yaml, each with its own worker count, queue list, and scaling behavior - Separate worker deployments (optional): Create dedicated worker Deployment(s) for high-priority queues with different resource profiles
- Backpressure: Add configurable queue depth limit — when
simulationsqueue exceeds threshold, web-background stops creating new jobs until it drains - Dashboard: Add Resque queue depth annotation to Prometheus metrics
Design Notes
- Kubernetes-level approach: multiple worker Deployments with different
QUEUESvalues - Requires OpenStudio Server application changes to route jobs to correct queues
- Resque naturally supports multiple queues —
QUEUES=expedited,simulations,requeuedprocesses in priority order - Backpressure is best implemented at the app layer (web-background checks queue depth before enqueueing)
- The chart should support
worker.additionalDeploymentslist for custom queue groups
References
.agents/results/result-tf-infra.md— B11: FIFO Queue Fairness (MEDIUM)openstudio-server/values.yaml—worker.queuesopenstudio-server/templates/worker/worker-deploy.yaml
Acceptance Criteria
-
worker.queueGroupsconfig creates separate Deployments per queue group - Expedited jobs bypass bulk queue (app-level change documented)
- Queue depth limit prevents unbounded backlog
- Prometheus metrics expose per-queue depth
- Backward compatible — existing single-queue config still works
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading openstudio-server/values.yaml and openstudio-server/templates/worker/worker-deploy.yaml, then trace how worker.queues is rendered into deployments. The work is done when queueGroups can create separate worker Deployments while preserving the existing configuration, with the documented application-level routing, queue limits, and per-queue metrics covered by the acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes, yaml
- Domain
- devops, infrastructure, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100