Re: split the load?

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Robert Black
CC: exim-users
Subject: Re: split the load?
On Fri, 22 Nov 1996, Robert Black wrote:

> You could then randomise the order by doing something like looping over the
> list of MX records of the current priority and swapping each in turn with one
> of the others in the list picked at random.


Martyn Johnson (private communication) has suggested a much simpler way
of doing this, which I will probably adopt. In brief: you multiply each
MX by N, add a random number in the range 0-N, and then sort as before.
A simple pseudo-random number generator is used, seeded with the time.
It doesn't really matter if it is a lousy generator. I suppose I could
exclusive-or the process number into the seed as well.


--
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714