Re: qmail-qmqpc.c load balancing mods

2000-07-26 Thread Paul Jarc
"Austad, Jay" <[EMAIL PROTECTED]> writes: > The for loop for doit() will loop twice the number of the servers we > have to make sure it looked at all of them, But that *doesn't* make sure you'll hit them all. If you want to hit them all, *start* at a random one, and then try them *in order*, wra

Re: qmail-qmqpc.c load balancing mods

2000-07-25 Thread JuanE
Looks like it's going to work, but I still like the round robin idea better. With the round robin idea you avoid the possibility of polling the same down server repeatedly. I admit that this seems like an unlikely event, but if you have few servers, it can be significant. (with 3 servers this wil

qmail-qmqpc.c load balancing mods

2000-07-25 Thread Austad, Jay
Here's the modified version of qmqpc that will pick a random server instead of the first available. I haven't tested it yet, but it compiles, and printf statements in strategic places give me the output I'm looking for. The rand() function is seeded with the current milliseconds from the system c