Load balancing a MailEnable cluster


SUMMARY

MailEnable Enterprise and Enterprise Premium support clustering two or more mail servers. When clustering, ideally you also would want to load balance the services, to give high availability in case of a server failure. For instance, if you have a cluster of two servers, you can have an MX record point to each server in the cluster and if one server fails, then the sender will send to the other server. But this does not help users who have accounts on the server, as they do not have the option to automatically go to a different server if one fails, and a load balancing solution solves this.

DETAIL

This article does not describe how to configure specific load balancing solutions so you will need to consult with their documentation on this. But you will need to know what services MailEnable use and how they can be used in a load balanced situation in order to be able to configure your load balancing.

Mail Services

The SMTP, IMAP, POP, XMPP and LDAP services require that connections are kept to the same server. In your load balancing solution documentation this may be called single affinity, session persistence, or something similar. Your load balancing solution should have information on how to configure it for these different protocols. You may wish to run your solution as as transparent proxy to preserve the connecting IP address to be able to use features such as greylisting, DNS blacklisting, SPF, etc.

Web services

Microsoft IIS is used to provide webmail, web administration, ActiveSync, CardDAV, CalDAV, and web services support. When you install MailEnable, even in a cluster, the web applications are configured so that sessions are not able to be shared between servers. So any load balancing solution will need to use single affinity, where a client will always be directed to the same server.

It is possible to configure webmail to be load balanced, by changing the IIS configuration to store session variables for the MailEnable Webmail IIS site in a database. If you do this, reinstalling MailEnable will overwrite the web.config file, so you may need to re-apply any changes after a software upgrade. The other services under IIS are not able to be load balanced as the applications store current connection information in memory only for the session, so it is not able to be shared across servers.

REFERENCES

Microsoft NLB information at https://docs.microsoft.com/en-us/windows-server/networking/technologies/network-load-balancing

HAProxy information at https://www.haproxy.org/

NGINX information at https://www.nginx.com/

 



Product:MailEnable
Article:ME020718
Module:General
Keywords:cluster,load,balance
Class:HOWTO: Product Instructions
Revised:Thursday, June 15, 2023
Author:
Publisher:MailEnable