Re: [lvs-users] question about load balancing smtp

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [lvs-users] question about load balancing smtp
From: Bruce Richardson <itsbruce@xxxxxxxxxxx>
Date: Mon, 26 Apr 2010 11:27:13 +0100
On Mon, Apr 26, 2010 at 12:01:17PM +0200, Michiel van Es wrote:
> I know that with DNS and the SMTP protocol load balancing and failover 
> can be established.
> But I want to experience load balancing through a software load balance 
> setup, a load balancer can balance the load on several algorithms which 
> a smtp proxy or dns setup doesn't have.

Do you actually need this for incoming mail, though?  Given that any
external SMTP host that's trying to send you mail will keep trying MX
hosts until it finds one that's listening?  Given the resilience of the
protocol, a combination of DNS load-balancing (multiple A records for
the same MX record) and MX load-balancing (multiple MX records with the
same priority) is perfectly good for managing mail load until you reach
very high volumees of mail.

> What about outgoing smtp servers for mailing list servers etc?

Can you not put a minimal SMTP service on those servers and make
configure that service to be aware of multiple mail gateways within your
datacentre?  If your mailing list server is a *nix box, that's trivial.

> I understood that LVS is capable of showing the source ip to the real 
> servers so there are no problems with the protocol's own resilience 
> features.

I don't see what that has to do with it.  The reason why load-balancing
can cause problems is because when you use LVS to cluster SMTP services
then multiple hosts appear to the outside world as one host; if an
external SMTP host has a problem with the particular realserver it
connects to, it will then back off and not try to connect to any of the
other realservers (because it thinks there's only one host there).
There are several ways in which this can delay mail delivery in ways
which would not happen if you used simple DNS and MX load-balancing, as
described above.  I can talk you through them if you like.  

Unless you have very high mail volumes, you gain nothing from
TCP/IP-level load-balancing and you actually create unnecessary delays.


A problem shared brings the consolation that someone else is now
feeling as miserable as you.

Please read the documentation before posting - it's available at: mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to

<Prev in Thread] Current Thread [Next in Thread>