4.75. How do I set up a Mailman cluster or to load-balance Mailman between multiple servers?

Please note that this subject is pretty advanced for Mailman, and is intended for use at sites with high volumes or strict requirements for system availability, etc.... If you're not intimately familiar with all the terms and topics suggested, trying to do this sort of thing is a very quick way to mess up everything to do with all your mailing lists.

You have been warned.

There are actually three different major components to a Mailing List Management (MLM) system. One is the front-end Message Transfer Agent (MTA), which is used to handle communications between other mail servers on the Internet and the MLM. Another is the front-end web server software, which is used to handle user and administrator interactions with mailing lists, list configurations, etc.... The third component is the MLM itself - such as Mailman.

Setting up the front-end MTA or web server for use in a shared/load-balanced environment is beyond the scope of this FAQ. It should be relatively simple, but the details will be specific to the given program that you're using. You may be able to find some suggestions by searching through the archives of the mailman-users mailing list, or by using the search function of this FAQ.

Setting up Mailman itself to be shared across multiple servers is a relatively easy task. The entire /usr/local/mailman/ directory structure should be share-able via NFS in full read/write mode to all client systems, and the software has been developed with this kind of use in mind - any locking that needs to be done will occur in such a way that should be relatively NFS-friendly.

The one big thing you need to do if you're sharing the /usr/local/mailman/qfiles/ directory structure across NFS, is make sure to give the queue runners on each machine their own dedicated slice of the space to process. This is because the queue runners don't use any kind of locking, in order to avoid known performance and reliability problems with doing locking on NFS. If you set up /usr/local/mailman/qfiles to be shared across NFS and don't set up dedicated slices for each group of queue runners, you will be SERIOUSLY SCREWED.

Also keep in mind that if one of the machines goes down, then that slice will not be processed, and those messages will sit idle in the queues until another machine is configured to take them over. However, everything else should "just work".

The specifics of how you set up the queue runner slices will not be covered in this FAQ. Please see the documentation, the other entries in the FAQ Wizard, the archives of the mailman-users mailing list, the comments in Defaults.py, the other parts of the source code, etc... In particular, the post at http://mail.python.org/pipermail/mailman-users/2008-March/060753.html suggests a method. The entire thread containing that post is recommended reading.

Also note that this technique of setting up multiple groups of queue runners (with their own dedicated slices) is also good for enhancing performance on a single system, if your primary issue is with processing large queues within the Mailman system itself.

Some more details on this subject can be found in the message from Barry Warsaw to the mailman-users list at http://mail.python.org/pipermail/mailman-users/2006-November/054641.html.

This is one of many Frequently Asked Questions.

MailmanWiki: DOC/4.75 How do I set up a Mailman cluster or to load-balance Mailman between multiple servers? (last edited 2015-02-21 07:27:35 by JimTittsler)