[feature]/[question] add operators to distinct_hosts (specify minimum number of distinct_hosts required)
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
I often find myself wishing nomad was able to schedule job in a way that places groups on at least two or three different hosts. If service count is low (think 2 or 3) I can get away with using `distinct_hosts` but for high count groups this becomes unusable very fast as number of not fully packed hosts rises over time.
I don't know how feasible it is, but something like this would be extremely useful and a default for me even for stateless services:
```
job "service" {
group "example" {
count = 10
constraint {
operator = "distinct_hosts"
operator = ">="
value = "2"
}
...
}
}
```
EDIT: Please note that this is different and probably conflicting option to the one described here https://github.com/hashicorp/nomad/issues/1387 :)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing the requested distinct_hosts minimum-count behavior with the conflicting proposal in issue 1387. Then trace the existing distinct_hosts constraint from the job configuration example into Nomad's scheduling implementation and tests; done means an agreed operator syntax and defined placement behavior for high-count groups.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100