I agree with you both (Jay and Michael), at least partially. I agree that
altough what Jay proposes will work, it is too much computation and that a
simpler round-robin (after picking initial position) would suffice.

My comment is that in the event of a down server, the simple round robin
will flood the next server in the chain with twice the load of the others.
Jay's solution does not do this (at a high computational cost).

What I proposed earlier is just one of *many* solutions that addresses the
flood problem at a lower computational cost.

Jay, I agree with you that selecting the same server many times in a row is
not an issue. This is guaranteed by the Law of Averages (for you math
wizzes out there, the Law of Large Numbers).

JES

Austad, Jay writes:

> I agree with you, I forgot to mention that, sorry.  I didn't have enough
> Mountain Dew yet.  :)
> 
> -----Original Message-----
> From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 02, 2000 10:44 AM
> To: Austad, Jay; [EMAIL PROTECTED]
> Subject: Re: updated load balancing qmail-qmqpc.c mods
> 
> 
> Re-read my point: its unnecessary.  I didn't say it wouldn't work.  I said
> the CPU use of doing it this way was unnecessary over a simpler round-robin
> approach (After picking an initial random server).
> 
> Note: I think using an array of pointers to server addresses would allow you
> to do your rotations a lot faster.  Think "point quicksort".
> 
> ----- Original Message -----
> From: "Austad, Jay" <[EMAIL PROTECTED]>
> 
> 
> > Even if one server is getting hit multiple times in a row, I don't think
> it
> > will matter.  I put in 10 servers in my qmqpservers file and some well
> > placed printf's in qmqpc and ran it 100,000 times several times through.
> > Each server was getting picked about 10% of the time +/- 1% or so.  If
> we're
> > sending millions of messages, this +/- 1% isn't going to make a
> significant
> > difference.
> 



Reply via email to