Austad, Jay writes:
Instead of having qmqpc picking the first available server, I would like it
to load balance between all servers I have listed as QMQP servers.
Do it the other way around. If a server thinks its load is too high,
it should shut down its qmqpc service.
--
-russ nelson
Wouldn't you just rotate the mailservers? Go from A to B to C instead of
picking one randomly? I don't see how random distribution is going to be less
balanced than a simple round-robin, and generating random numbers tends to take
more computation than incrementing a variable.
"Austad, Jay"
True, but its quite valid to round-robin several servers to keep any one from ever
getting a high load in the first place. eg. the way load-balancing HTTP usually
works.
Russell Nelson wrote:
Austad, Jay writes:
Instead of having qmqpc picking the first available server, I would like it
functions, it makes it very easy to do modifications.
Jay
-Original Message-
From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 22, 2000 3:55 PM
To: Russell Nelson
Cc: '[EMAIL PROTECTED]'
Subject: Re: qmqpc load balancing
True, but its quite valid to round-robin
Instead of having qmqpc picking the first available server, I would like it
to load balance between all servers I have listed as QMQP servers. In
qmail-qmqpc.c on line 153, it says:
i = 0;
for (j = 0;j servers.len;++j)
if (!servers.s[j]) {
doit(servers.s + i);
i = j + 1;
Almost. Note that 'i' has to point to the start of the \0 terminated
string that 'j' is currently scanning. servers.s is a series of \0
terminated strings. You need to do some work to make sure that i, is
pointing that the start of the string that j randomizes into.
Regards.
On Fri, Jul 21,
On Fri, Jul 21, 2000 at 04:35:57PM -0400, Paul Jarc wrote:
[EMAIL PROTECTED] writes:
On Fri, Jul 21, 2000 at 03:10:58PM -0500, Austad, Jay wrote:
Instead of having qmqpc picking the first available server, I would like it
to load balance between all servers I have listed as QMQP servers.
\0192.168.20.2\0192.168.20.3
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 21, 2000 3:44 PM
To: [EMAIL PROTECTED]
Subject: Re: qmqpc load balancing
On Fri, Jul 21, 2000 at 04:35:57PM -0400, Paul Jarc wrote:
[EMAIL PROTECTED] writes:
On Fri, Jul 21, 2000