Re: updated load balancing qmail-qmqpc.c mods

2000-08-09 Thread David Dyer-Bennet
Bruno Wolff III <[EMAIL PROTECTED]> writes on 9 August 2000 at 09:12:29 -0500 > On Wed, Aug 02, 2000 at 05:08:28PM +, > JuanE <[EMAIL PROTECTED]> wrote: > > > > I did not think of that. Good suggestion. > > > > It seems like it would be a good compropmise if you can take your down >

Re: updated load balancing qmail-qmqpc.c mods

2000-08-09 Thread Bruno Wolff III
On Wed, Aug 02, 2000 at 05:08:28PM +, JuanE <[EMAIL PROTECTED]> wrote: > > I did not think of that. Good suggestion. > > It seems like it would be a good compropmise if you can take your down > server out of the rotation relatively quickly. If not, then you'll waste > considerable time pol

Re: updated load balancing qmail-qmqpc.c mods

2000-08-03 Thread Frank D. Cringle
Pavel Kankovsky <[EMAIL PROTECTED]> writes: > On 2 Aug 2000, Frank D. Cringle wrote: > > > Generating a random permutation algorithmically is not too easy. > > Oh really? > > [ swap each element with a randomly chosen partner ] Yes, that will do it. When I was originally working with this stu

Re: updated load balancing qmail-qmqpc.c mods

2000-08-03 Thread Pavel Kankovsky
On 2 Aug 2000, Frank D. Cringle wrote: > Generating a random permutation algorithmically is not too easy. Oh really? int i, j, x; int a[N]; for (i = 0; i < N; ++i) a[i] = i; for (i = N - 1; i > 0; --i) { j = random(i); x = a[i]; a[i] = a[j]; a[j] = x; } where random(i) i

Re: updated load balancing qmail-qmqpc.c mods

2000-08-03 Thread Eric Cox
Warning: This may be a stupid idea... Could you take the number of milliseconds in the timeb stucture, modulo , and use that as the first server to start from? That could be done with a simple AND of a short, and I think would provide a nice even spread across the servers. And it doesn't re

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread Michael T. Babcock
: "JuanE" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 02, 2000 12:37 PM Subject: Re: updated load balancing qmail-qmqpc.c mods > > I agree with you both (Jay and Michael), at least partially. I agree that > altough what Jay proposes will work, it i

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread Michael T. Babcock
e of use of down servers. Over time, if a server was down for a long time, it would stop being polled for a connection as often. - Original Message - From: "David Dyer-Bennet" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 02, 2000 1:03 PM S

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread JuanE
David Dyer-Bennet writes: > JuanE <[EMAIL PROTECTED]> writes on 2 August 2000 at 16:37:36 GMT > > > > 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 picki

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread David Dyer-Bennet
JuanE <[EMAIL PROTECTED]> writes on 2 August 2000 at 16:37:36 GMT > > 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. >

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread JuanE
-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'

RE: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread Austad, Jay
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

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread Michael T. Babcock
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 rotatio

RE: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread Austad, Jay
c(size); p=array; for(f=0;fmailto:[EMAIL PROTECTED]] Sent: Wednesday, August 02, 2000 8:58 AM To: JuanE; [EMAIL PROTECTED] Subject: Re: updated load balancing qmail-qmqpc.c mods Again, its unnecessary and does not add anything to the 'system' of distributing load across servers.

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread JuanE
PROTECTED]> > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > In-Reply-To: <[EMAIL PROTECTED]> > From: "JuanE" <[EMAIL PROTECTED]> > To: James Raftery <[EMAIL PROTECTED]> > Subject: Re: updated load balancing qmail-qmqpc.c mo

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread Michael T. Babcock
Again, its unnecessary and does not add anything to the 'system' of distributing load across servers. Distributing in a true round-robin fashion is sufficient if the servers are of equal quality (and/or drop connections sooner if they are not). True round-robin distribution cannot easily be acco

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread James Raftery
On Wed, Aug 02, 2000 at 11:13:22AM +, JuanE wrote: > This way, you will redistribute the load randomly to all > servers and not just the next one on the list. Not quite. If choose truly randomly the liklehood of you choosing the same server /every/ time is the same as the liklihood of choosin

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread JuanE
I like the idea of statically listing them, but as you mentioned it is not very scalable. The shuffling can be very expensive. I believe it would grow with N^2. Instead of shuffling, just plain random sampling would be better computationally. See me previous posting. I think this is a "profile,

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread JuanE
the array by a random number, it > would shuffle it it randomly. That would keep it from banging on the server > immediately after the dead one, and give everything an even chance again. > > Jay > > -Original Message- > From: JuanE [mailto:[EMAIL PROTECTED]] >

Re: updated load balancing qmail-qmqpc.c mods

2000-08-02 Thread Frank D. Cringle
"Austad, Jay" <[EMAIL PROTECTED]> writes: > From: JuanE [mailto:[EMAIL PROTECTED]] >> Assume you have 4 servers A, B, C, D, and that server C is down. When your >> random seed hits server A, B or D (with probability 1/4, respectively) the >> message will go through fine. When your random seeds hit

RE: updated load balancing qmail-qmqpc.c mods

2000-08-01 Thread Austad, Jay
hance again. Jay -Original Message- From: JuanE [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 01, 2000 6:57 PM To: [EMAIL PROTECTED] Subject: Re: updated load balancing qmail-qmqpc.c mods Jay, If I understand this correctly, then I think there is a flaw in this type of random r

Re: updated load balancing qmail-qmqpc.c mods

2000-08-01 Thread JuanE
Jay, If I understand this correctly, then I think there is a flaw in this type of random round robin. I think I can best describe it with an example. Assume you have 4 servers A, B, C, D, and that server C is down. When your random seed hits server A, B or D (with probability 1/4, respectively)