From: aa on
Hi,
I need to create an infrastructure that allows to divide a list of mails to
send among a series of postfix mail servers.

For example, I imagine this situation so :
I install a series of postfix mail servers and when it's necessary to send a
mail it's enough to send it to an IP address that the actual delivery of
the mail is delegated to a server that has the lowest charge of jobs...

I'm wondering if a particular configuration of postfix can be useful to
resolve this issue...

Someone advised me to insert in the DNS zone a list of MX records defined
with the same level of priority so the DNS server will choose one of them
without invoking always the same mail server....
It could be an idea, in my opinion, but I'd prefer a "less random" solution
and a more scientific one....

Thanks for every suggestion you'll send to me....
From: Patrick Chemla on
Le 16/02/2010 17:47, donovan jeffrey j a �crit :
> DNS round robin is bad, it works but is defective for real load
> balancing. The client choose the IP to use, this is "random", and
> after can use the same ip for a while... this is not random.
>

Again, I am doing every days exactly what required at the beginning of
this thread.

I have one Postfix server who simply relays all emails to send to a farm
of 40 mail sub-servers.

To load balance, I simply use a local DNS who manage a local domain. All
40 sub-servers are identified as equivalent MX of this local domain. The
Postfix server just ask the DNS what is the MX of this local domain, and
get a name /ip from the DNS.

I am very satisfied of this load balancing.

Again, I said before that the statistics show a difference of less than
2% of the traffic to the sub-server who work the most and the one who
work the less. It is, as I think, very very well load balanced.

When a sub-server fails, some messages are stuck in the Postfix, but a
very small percentage. Immediatly after you restart the sub-server, or
you put it out of the DNS, all messages are processed.

I don't think there is a need for more precision in the load balancing.

I don't think there is a need for keepalive, or any expensive device to
do it.

Patrick

From: Eero Volotinen on
2010/2/16 aa <kipstar1900(a)gmail.com>:
> Hi,
> I need to create an infrastructure that allows to divide a list of mails to
> send among a series of postfix mail servers.
>
> For example, I imagine this situation so :
> I install a series of postfix mail servers and when it's necessary to send a
> mail it's enough to send it to an IP address that  the actual delivery of
> the mail is delegated to a server that has the lowest charge of jobs...
>
> I'm wondering if a particular configuration of postfix can be useful to
> resolve this issue...
>
> Someone advised me to insert in the DNS zone a list of MX records defined
> with the same level of priority so the DNS server will choose one of them
> without invoking always the same mail server....
> It could be an idea, in my opinion, but I'd prefer a "less  random" solution
> and a more scientific one....
>
> Thanks for every suggestion you'll send to me....
>

How about OpenBSD relayd: https://calomel.org/relayd.html

--
Eero

From: Patrick Chemla on
Le 16/02/2010 15:09, aa a �crit :
>
> Someone advised me to insert in the DNS zone a list of MX records
> defined with the same level of priority so the DNS server will choose
> one of them without invoking always the same mail server....
> It could be an idea, in my opinion, but I'd prefer a "less random"
> solution and a more scientific one....

I did this to load balanced among 40 mail servers. It works very very
fine with a load difference of less than 2% among the 40 servers. I
don't think it is too random.



Patrick

From: Jordi Espasa Clofent on
Use your favorite load-balance app. You have several options in BSD or
GNU/Linux flavors. Personally I use with total success LVS+heartbeat to
load-balance 3 Posfifix (only to send) with 70k account behind.

;)