Posted by: Anthony Drewery | November 28, 2005

Load-balancing inbound email

If you have a small to medium sized Exchange environment the chances are you’ll have a single point for inbound email and your MX records will look something like this:

MX 10 smtp.mydomain.com
MX 20 smtp.myisp.com

Your primary inbound point would be your Internet connection and your secondary is often your ISP who provides a store and forward service if your server or Internet connection is unavailable.

If you have a larger environment you may have more than one mail gateway (we have 2 in the US, 2 in the UK and 1 in Australia) and might want to load balance inbound email between them. There are two possible ways to achieve this.

The first method is to use a concept called DNS round-robin. Here you would create A records for your gateways each with it’s own IP address but using the same name. For example:

A smtp.mydomain.com 212.111.212.111
A smtp.mydomain.com 212.111.212.112
A smtp.mydomain.com 212.111.212.113
A smtp.mydomain.com 212.111.212.114

(I made the IP addresses up)

The MX record would then be:

MX 10 smtp.mydomain.com

The second method is to give all the MX records for your gateways the same value. You would have individual A records and your MX records would look like this:

MX 10 smtp1.mydomain.com
MX 10 smtp2.mydomain.com
MX 10 smtp3.mydomain.com
MX 10 smtp4.mydomain.com

Whilst none of these methods will give you 100% perfect load-balancing they are effective in distributing the load between gateways. We have also experimented with Windows Network Load Balancing but have found that it doesn’t play well in our Cisco routed environment. From the Microsoft document “Network Load Balancing : Configuration Best Practices for Windows 2000 and Windows Server 2003”:


Some routers require a static ARP entry because they do not support the resolution of unicast IP addresses to multicast media access control addresses. For example, Cisco routers require an ARP (address resolution protocol) entry for every virtual IP address. While Network Load Balancing uses Level 2 Multicast for the delivery of packets, Cisco’s interpretation of the RFCs is that Multicast is for IP Multicast. So, when the router doesn’t see a Multicast IP address, it does not automatically create an ARP entry, and one has to manually have to add it on the router.


Responses

  1. […] As touched on in a previous post you may have issues when accessing a load balanced address through a firewall. Specifically, one particular server is favoured and if it goes offline then the other nodes do not take over. These issues have been documented by Cisco. […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: