Re: [exim] Load balancing between multiple exim servers

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Mike Brudenell
Fecha:  
A: Exim Users
Asunto: Re: [exim] Load balancing between multiple exim servers
Hi, John -

You should think about two use cases separately:

- MSA (Message Submission Agent), as used by your desktop client email
software etc to submit emails your users send out, and
- MTA (Message Transfer Agent), as used when another mail server (MTA)
wants to talk to yours.

For MTAs it's generally fine just to use MX records: it's what they're
designed for! Create one MX record for each of your mail servers. If
they're all to be treated equally give them the same weighting; if some
should only be used as fallback hosts for use when the main one(s) aren't
available give them a lower priority (ie, a higher number in the MX
record). An MTA wanting to transmit email to you will then try each MX
record in turn, starting with the highest priority (lowest value) ones, in
some order.

This approach means your site's email isn't reliant on a load balancer, and
also enables sending MTAs to do clever things if they want — eg, hints
databases that keep notes of whether a host has been tried very recently
and was down.

In contrast MSAs are generally dumber as they're just user/client software.
As such if you use only the DNS to, say, point your "smtp.example.com" DNS
record they're configured to send to at your mail gateways using Round
Robin DNS entries you're assuming:

- the client software will obtain all of the IP addresses associated
with the DNS name;
- will not just try the first of these addresses but will move on to the
second, third, etc if the earlier ones aren't available — trying a failed
host can sometimes cause a lengthy delay;
- the user is doesn't quit out of their email program before it's found
a working server to transmit the outgoing message to (if it doesn't it'll
likely remain in the application's Outbox until next time the user happens
to run the program).

So unless you've got a very small number of users it's probably worth using
some form of load balancer for the MSAs.

(Having said all that about MTAs and MX records, we actually changed to
using a load balancer for that too: mainly to keep our site Firewall rules
simpler, only having to guard the one IP address rather than many and
having to update the rule as we moved service around between servers.)

We have an F5 here but don't use it for SMTP:

- partly for historical reasons: we were already load balancing with
something else before we got it;
- partly because we had some problems with it in the early days;
- partly because it seems a bit of a sledge hammer to crack a nut —
instead we use keep it for the heavier weight protocols, particularly where
its special features like SSL offload or URL rewriting with iRules give a
significant benefit.

Instead we just use the Linux Virtual Server (LVS) load balancer for SMTP
(and a few other lightweight protocols: DNS and, in the old days, web
caching). This works well so we've stayed with it for these. But if you
have an F5 with plenty of capacity and no LVS then maybe the F5 is the way
to go.

Cheers,
Mike B-)

On 8 February 2017 at 03:32, Tech Gurus via Exim-users <exim-users@???>
wrote:

> Hi ,
>
> Looking for best approach to load balance between 4 exim servers .. The
> four servers have same config and relay fro same set of clients.
>
> Do I use F5 or other DNS based LB?
>
> Thanks
>
> John
> --
> ## List details at https://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/
>




--
Systems Administrator & Change Manager
IT Services, University of York, Heslington, York YO10 5DD, UK
Tel: +44-(0)1904-323811

Web: www.york.ac.uk/it-services
Disclaimer: www.york.ac.uk/docs/disclaimer/email.htm