Discussion:
Load Balancing (2) Exim servers
J***@languageworks.com
2007-11-08 19:13:02 UTC
Permalink
Hi Exim Friends,

How can I load balance (2) Exim servers for Inbound and OutBound
Deliveries. Any info will be much appreciated.

Jeremy Davila (Embedded image moved to (Embedded image (Embedded image moved to
Systems Administrator file: pic02065.gif) moved to file: file: pic22559.gif)
Direct: 646-205-2136 pic26717.gif)

The LanguageWorks, Inc.
1123 Broadway, Suite 201
New York, NY 10010






The LanguageWorks, Inc. is an ISO 9001:2000 certified company which:
"Facilitates global communication by providing foreign language
translation, editing, proofreading, and cultural analysis. Additional
services include on-site interpreting and document review, foreign language
page layout, conversion of web sites into multiple languages, and
multilingual voice-overs for radio spots and video productions."

CONFIDENTIALITY NOTICE:
The information in this E-Mail may be confidential and may be legally
privileged. It is intended solely for the addressee(s). If you are not the
intended recipient, any disclosure, copying, distribution or any action
taken or omitted to be taken in reliance on this E-Mail, is prohibited and
may be unlawful. If you have received this E-Mail message in error, notify
the sender by reply E-Mail and delete the message.
Ken Price
2007-11-08 19:34:15 UTC
Permalink
Can you be more specific with your requirements?

Round-Robin DNS is the most simple form of load balancing two servers.
With user directories shared over NFS and account information stored
in a shared MySQL server.

High-availability load balancing requires a setup like the one above,
plus a hardware or software load balancer. See the following sites:

http://www.linuxvirtualserver.org/
http://www.linux-ha.org/
http://www.keepalived.org/

Regards,
Ken


----- Message from ***@languageworks.com ---------
Date: Thu, 8 Nov 2007 14:13:02 -0500
From: ***@languageworks.com
Reply-To: ***@languageworks.com
Subject: [exim] Load Balancing (2) Exim servers
Post by J***@languageworks.com
Hi Exim Friends,
How can I load balance (2) Exim servers for Inbound and OutBound
Deliveries. Any info will be much appreciated.
Jeremy Davila (Embedded image moved to
(Embedded image (Embedded image moved to
Systems Administrator file: pic02065.gif)
moved to file: file: pic22559.gif)
Direct: 646-205-2136 pic26717.gif)
The LanguageWorks, Inc.
1123 Broadway, Suite 201
New York, NY 10010
"Facilitates global communication by providing foreign language
translation, editing, proofreading, and cultural analysis. Additional
services include on-site interpreting and document review, foreign language
page layout, conversion of web sites into multiple languages, and
multilingual voice-overs for radio spots and video productions."
The information in this E-Mail may be confidential and may be legally
privileged. It is intended solely for the addressee(s). If you are not the
intended recipient, any disclosure, copying, distribution or any action
taken or omitted to be taken in reliance on this E-Mail, is prohibited and
may be unlawful. If you have received this E-Mail message in error, notify
the sender by reply E-Mail and delete the message.
----- End message from ***@languageworks.com -----
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Ian Eiloart
2007-11-09 11:31:14 UTC
Permalink
Post by J***@languageworks.com
Hi Exim Friends,
How can I load balance (2) Exim servers for Inbound and OutBound
Deliveries. Any info will be much appreciated.
The simplest method is to make the two servers equal priority in your MX
records. You'll get load balanced to within about 10 to 15% of optimal.
Alternatively, you can offer a single MX record pointing to a round robin A
record.

For outbound, your mail clients will be configured to access a single
domain. Make that domain a Round Robin DNS pointing to two IP addresses.

Ideally, you should keep your MX IP addresses different from your message
submission IP addresses, so that you can distinguish between inbound and
outbound domains. It's pretty easy to arrange this just by changing your MX
records.

Assuming that we're talking about servers for languageworks.com, you have
this set up:

chip-74 % host languageworks.com
languageworks.com has address 209.218.206.60
languageworks.com mail is handled by 0 nyclns01.languageworks.com.
languageworks.com mail is handled by 10 nyclns04.languageworks.com.
chip-75 % host nyclns01.languageworks.com
nyclns01.languageworks.com has address 209.218.206.60
chip-76 % host nyclns04.languageworks.com
nyclns04.languageworks.com has address 209.218.206.68

Just change the MX records so that both servers have the same priority (and
are configured the same way).
--
Ian Eiloart
IT Services, University of Sussex
x3148
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Adrian Chapela
2007-11-09 11:50:43 UTC
Permalink
Post by Ian Eiloart
Post by J***@languageworks.com
Hi Exim Friends,
How can I load balance (2) Exim servers for Inbound and OutBound
Deliveries. Any info will be much appreciated.
The simplest method is to make the two servers equal priority in your MX
records. You'll get load balanced to within about 10 to 15% of optimal.
Alternatively, you can offer a single MX record pointing to a round robin A
record.
For outbound, your mail clients will be configured to access a single
domain. Make that domain a Round Robin DNS pointing to two IP addresses.
Ideally, you should keep your MX IP addresses different from your message
submission IP addresses, so that you can distinguish between inbound and
outbound domains. It's pretty easy to arrange this just by changing your MX
records.
Assuming that we're talking about servers for languageworks.com, you have
chip-74 % host languageworks.com
languageworks.com has address 209.218.206.60
languageworks.com mail is handled by 0 nyclns01.languageworks.com.
languageworks.com mail is handled by 10 nyclns04.languageworks.com.
chip-75 % host nyclns01.languageworks.com
nyclns01.languageworks.com has address 209.218.206.60
chip-76 % host nyclns04.languageworks.com
nyclns04.languageworks.com has address 209.218.206.68
Just change the MX records so that both servers have the same priority (and
are configured the same way).
You also can use DRBD and heartbeat to achive high availability with two
servers. You can replicate mailbox and spool with DRBD and with
heartbeat you can use only one IP for two servers and you only have a
active server. This is a good solution for your local mail clients.

Best regards.
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Ian Eiloart
2007-11-09 12:18:59 UTC
Permalink
--On 9 November 2007 12:50:43 +0100 Adrian Chapela
Post by Adrian Chapela
You also can use DRBD and heartbeat to achive high availability with two
servers. You can replicate mailbox and spool with DRBD and with
heartbeat you can use only one IP for two servers and you only have a
active server. This is a good solution for your local mail clients.
Best regards.
Provision of IP failover is highly dependent on the platform that you're
using. It's not required for MX availability, because remote servers will
try all your advertised servers. It is required for MSA availability,
because MUAs will not.

We use MacOSX servers. OSX has a reasonably easy to configure IP failover
mechanism, as long as you only have two servers. When we went beyond two
servers, we deployed spread and wackamole which make failover
configurations for any number of servers trivial. For example, we have 12
imap server IP addresses, to ensure good load balancing with either 4, 3 or
2 available hosts. Wackamole simply needs to know what the addresses are,
and endeavours to share them out equally among available servers.

<http://www.spread.org/>
<http://www.backhand.org/wackamole/>
--
Ian Eiloart
IT Services, University of Sussex
x3148
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Adrian Chapela
2007-11-09 12:27:48 UTC
Permalink
Post by Ian Eiloart
--On 9 November 2007 12:50:43 +0100 Adrian Chapela
Provision of IP failover is highly dependent on the platform that
you're using. It's not required for MX availability, because remote
servers will try all your advertised servers. It is required for MSA
availability, because MUAs will not.
Yes you are right, but if you have clients locally on your company, they
must connect to a smtp server and DNS round robin it isn't the best
solution to get hight availability (IMHO).
Post by Ian Eiloart
We use MacOSX servers. OSX has a reasonably easy to configure IP
failover mechanism, as long as you only have two servers. When we went
beyond two servers, we deployed spread and wackamole which make
failover configurations for any number of servers trivial. For
example, we have 12 imap server IP addresses, to ensure good load
balancing with either 4, 3 or 2 available hosts. Wackamole simply
needs to know what the addresses are, and endeavours to share them out
equally among available servers.
Yes.. it sounds perfect...
Post by Ian Eiloart
<http://www.spread.org/>
<http://www.backhand.org/wackamole/>
Best regards.
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Ian Eiloart
2007-11-09 14:10:23 UTC
Permalink
--On 9 November 2007 13:27:48 +0100 Adrian Chapela
Post by Adrian Chapela
Post by Ian Eiloart
--On 9 November 2007 12:50:43 +0100 Adrian Chapela
Provision of IP failover is highly dependent on the platform that
you're using. It's not required for MX availability, because remote
servers will try all your advertised servers. It is required for MSA
availability, because MUAs will not.
Yes you are right, but if you have clients locally on your company, they
must connect to a smtp server and DNS round robin it isn't the best
solution to get hight availability (IMHO).
That depends what you mean by "client". If you mean an MTA attempting to
relay, then round robin should do reasonably well at low cost. If you mean
mail user agents (MUAs) then round robin doesn't help at all, as I said.

Absolutely right - DNS round robin does nothing for MUAs (mail clients).
Mail clients won't attempt to connect to a second IP address, so DNS round
robin does nothing to achieve high availability at all. It merely serves to
provide load balancing. Actually, if that makes the servers more capable,
then you may get some small availability gains.

So, for high availability you need to ensure that every IP address in the
round robin is highly available. For that, you need IP failover. For MX
hosts, you don't need IP failover because remote servers should try all the
available IP addresses.
Post by Adrian Chapela
Post by Ian Eiloart
We use MacOSX servers. OSX has a reasonably easy to configure IP
failover mechanism, as long as you only have two servers. When we went
beyond two servers, we deployed spread and wackamole which make
failover configurations for any number of servers trivial. For
example, we have 12 imap server IP addresses, to ensure good load
balancing with either 4, 3 or 2 available hosts. Wackamole simply
needs to know what the addresses are, and endeavours to share them out
equally among available servers.
Yes.. it sounds perfect...
Post by Ian Eiloart
<http://www.spread.org/>
<http://www.backhand.org/wackamole/>
Best regards.
--
Ian Eiloart
IT Services, University of Sussex
x3148
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with th
Adrian Chapela
2007-11-09 15:05:59 UTC
Permalink
Post by Ian Eiloart
--On 9 November 2007 13:27:48 +0100 Adrian Chapela
Post by Adrian Chapela
Post by Ian Eiloart
--On 9 November 2007 12:50:43 +0100 Adrian Chapela
Provision of IP failover is highly dependent on the platform that
you're using. It's not required for MX availability, because remote
servers will try all your advertised servers. It is required for MSA
availability, because MUAs will not.
Yes you are right, but if you have clients locally on your company, they
must connect to a smtp server and DNS round robin it isn't the best
solution to get hight availability (IMHO).
That depends what you mean by "client". If you mean an MTA attempting
to relay, then round robin should do reasonably well at low cost. If
you mean mail user agents (MUAs) then round robin doesn't help at all,
as I said.
I am talking about MUAs
Post by Ian Eiloart
Absolutely right - DNS round robin does nothing for MUAs (mail
clients). Mail clients won't attempt to connect to a second IP
address, so DNS round robin does nothing to achieve high availability
at all. It merely serves to provide load balancing. Actually, if that
makes the servers more capable, then you may get some small
availability gains.
So, for high availability you need to ensure that every IP address in
the round robin is highly available. For that, you need IP failover.
For MX hosts, you don't need IP failover because remote servers should
try all the available IP addresses.
Yes...
Post by Ian Eiloart
Post by Adrian Chapela
Post by Ian Eiloart
We use MacOSX servers. OSX has a reasonably easy to configure IP
failover mechanism, as long as you only have two servers. When we went
beyond two servers, we deployed spread and wackamole which make
failover configurations for any number of servers trivial. For
example, we have 12 imap server IP addresses, to ensure good load
balancing with either 4, 3 or 2 available hosts. Wackamole simply
needs to know what the addresses are, and endeavours to share them out
equally among available servers.
Yes.. it sounds perfect...
Post by Ian Eiloart
<http://www.spread.org/>
<http://www.backhand.org/wackamole/>
Best regards.
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use th
Jeroen van Aart
2007-11-13 01:51:34 UTC
Permalink
Post by J***@languageworks.com
How can I load balance (2) Exim servers for Inbound and OutBound
Deliveries. Any info will be much appreciated.
Except for roundrobin DNS this is not that easy to setup. But if you're
willing to use a 3rd party spamfilter like Postini you get the ability
to do load balancing of 2 or more smtp servers. Either with or without
failover smtp (which can also be multiple independently load balanced
servers, what's in a name ;-). It's quite easy to setup and rather
flexible. I'm using it here to have a failover smtp server to the main
server. And unlike the usual failover in mx records, where spammers
specifically target the lowest priority mx record (often being a fail
over, or backup), this will not be abused by spammers (yet?).

Regards,
Jeroen
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Andrew Johnson
2007-11-13 12:11:30 UTC
Permalink
2 other alternatives :-

Hardware loadbalancer (such as Alteon or F5)

Linux as a loadbalancer - there are various iptables options that can be
used to loadbalance connections, though I'm not sure how well these work if
one of your email servers goes down.

At least with the Alteon load balancers, they can do helath checks and look
for smtp banners to decide if the server is available.

-Andy-

-----Original Message-----
From: Jeroen van Aart [mailto:***@atypon.com]
Sent: 13 November 2007 01:52
To: exim-***@exim.org
Subject: Re: [exim] Load Balancing (2) Exim servers
Post by J***@languageworks.com
How can I load balance (2) Exim servers for Inbound and OutBound
Deliveries. Any info will be much appreciated.
Except for roundrobin DNS this is not that easy to setup. But if you're
willing to use a 3rd party spamfilter like Postini you get the ability to do
load balancing of 2 or more smtp servers. Either with or without failover
smtp (which can also be multiple independently load balanced servers, what's
in a name ;-). It's quite easy to setup and rather flexible. I'm using it
here to have a failover smtp server to the main server. And unlike the usual
failover in mx records, where spammers specifically target the lowest
priority mx record (often being a fail over, or backup), this will not be
abused by spammers (yet?).

Regards,
Jeroen
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Graeme Fowler
2007-11-13 12:28:19 UTC
Permalink
Post by Andrew Johnson
2 other alternatives :-
Hardware loadbalancer (such as Alteon or F5)
Linux as a loadbalancer - there are various iptables options that can be
used to loadbalance connections, though I'm not sure how well these work if
one of your email servers goes down.
...and wearing my list owner hat for the Linux Virtual Server project, I
would like to point everyone towards linuxvirtualserver.org and the
resources contained therein.
Using iptables for load balancing isn't very robust.
Using LVS for load balancing isn't very robust on its' own...
Post by Andrew Johnson
At least with the Alteon load balancers, they can do helath checks and look
for smtp banners to decide if the server is available.
...unless you make use of one of the varied approaches to combining load
balancing and health checking - the two most common (it seems) being
keepalived (http://www.keepalived.org) and ldirectord
(http://www.vergenet.net/linux/ldirectord/). There's also heartbeat
(which is part of the linux-ha project, http://linux-ha.org/Heartbeat).

These are all tremendously flexible pieces of software. I have built
several load-balanced HA SMTP/IMAP/POP systems using one or more of
them.

Graeme
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Renaud Allard
2007-11-13 12:28:05 UTC
Permalink
Post by Andrew Johnson
2 other alternatives :-
Hardware loadbalancer (such as Alteon or F5)
Linux as a loadbalancer - there are various iptables options that can be
used to loadbalance connections, though I'm not sure how well these work if
one of your email servers goes down.
At least with the Alteon load balancers, they can do helath checks and look
for smtp banners to decide if the server is available.
Another free and secure alternative:

OpenBSD's hoststated as a loadbalancer.
hoststated is a host status daemon for server load-balancing. It moni-
tors groups of hosts for availability, which is determined by checking
for a specific service common to a host group. When availability is con-
firmed, Layer 3 and/or Layer 7 load-balancing services are set up by
hoststated.

Loading...