Anycast provider for SMTP?

Joe Abley jabley at hopcount.ca
Mon Jun 15 18:58:05 UTC 2015


Hi Joe,

On 15 Jun 2015, at 13:50, Joe Hamelin wrote:

> I have a mail system where there are two MX hosts, one in the US and 
> one in
> Europe.  Both have a DNS MX record metric of 10 so a bastardized
> round-robin takes place.  This does not work so well when one site 
> goes
> down.   My solution will be to place a load balancer in a hosting site
> (virtual, of course) and have it provide HA.  But what about HA for 
> the
> LB?  At first glance anycasting would seem to be a great idea but 
> there is
> a problem of broken sessions when routes change.
>
> Have any of you seen something like this work in the wild?

If you can give responses to QTYPE=MX queries that match the location of 
the client, you can approximate this without deploying your SMTP servers 
using anycast. This feels like a simpler solution to operate; anycast 
sometimes pits BGP-fearing, syseng people against neteng people when 
things break at 3am, and if that rings true for you then a solution that 
avoids it might be of interest.

So, suppose clients in region A could query NETHEAD.COM/IN/MX and get a 
response that looks like

   NETHEAD.COM. IN MX 10 REGION-A-MX.NETHEAD.COM.
                IN MX 20 REGION-B-MX.NETHEAD.COM.
                IN MX 20 REGION-C-MX.NETHEAD.COM.

whereas clients in region B might see a response that looks more 
sensible to them:

   NETHEAD.COM. IN MX 10 REGION-B-MX.NETHEAD.COM.
                IN MX 20 REGION-A-MX.NETHEAD.COM.
                IN MX 20 REGION-C-MX.NETHEAD.COM.

etc, etc.

That way you still get a reasonable fallback in the event that one MX 
target is unreachable for a particular client, but you steer the bulk of 
your traffic in a way that makes sense (and which your syseng people 
don't have to understand the details of).

You can achieve the above DNS trickery using various load balancers that 
other people in this thread have already mentioned. You can also install 
your own geomaps in your own nameservers and handle it yourself, or you 
can buy managed DNS service from various people that can do this kind of 
thing.

Disclaimer: Dyn, for whom I work, sells such a service.


Joe



More information about the NANOG mailing list