Nomad doesn't spread processes evenly on all servers


I installed nomad + Consul on 4 servers (1 cluster)

I run a job that contains 1 group and 1 task (count = 48),

under job level:

spread {

attribute = “${node.datacenter}”

weight = 100


bottom line- I have a process I would like to run 48 times,

I expected Nomad to start 12 on every server, but I ended up with different number of processes on each server,

and one server without any processes at all…

server1 = 15 processes

server2 = 8 processes

server3 = 25 processes

server4 = 0.

Any idea what I am missing?



The “spread” stanza will spread allocations over the values in the set of attributes provided. In this case, you provided a set with 1 element (dc1). I think what you’re looking for is to spread across the set of attributes that would represent each client. Trying spreading across “”.