We are trying out a modulus function to return investments in random order https://github.com/consul/consul/pull/2131 However we ran into the gotcha of having a seed value too big for the modulus function to work as expected If the seed is bigger than the investment id, the records are returned ordered by id By dividing the seed by a big number, this problem seems to get fixed