High Availability

 

For high volume and sensitive environments, it is desirable to deploy the MailArchiva solution in a configuration that offers high availability and high performance. Using MailArchiva's inbuilt routing engine, it is possible to configure the product to receive smtp/milter traffic on a particular port, archive the emails and then forward it on to a nearby server. This simple configuration opens up the possibility to daisy chain two or more servers such that email data is replicated to all servers. 

 

High Availability

 

A load balancer (such as nginx) can be used to spray SMTP traffic evenly across all servers.  In this way, the throughput of the solution is increased considerably. Furthermore, the  fault tolerance of the solution is markedly improved due to the fact that redundancy is applied to all server and storage components.

 

If any server goes down, the load balancer will forward traffic to the other servers in the chain. Once more, when the faulty server is restored, the other servers in the chain will immediately begin to forward catchup traffic so that the restored server is brought up to date with all missing emails.

 

For optimal performance, it is recommended to install two 1 GB ethernet cards in each server. One interface is used for receiving traffic from the load balancer, the other for forwarding traffic to a nearby server. In this way, contention between receiving and forwarding traffic is eliminated.

 

It is also possible to configure a load balancer to balance MailArchiva console (HTTP/S) traffic across multiple servers. However, to preserve user session state between requests, it is advisable to enable sticky mode. Sticky mode ensures that users are kept on the same server as they were initially assigned.

 

Licensing: To implement the standard high availability configuration,  it is necessary to obtain an additional high availability license for each additional server. This high availability license is offered at reduced rates. Please contact MailArchiva sales for pricing information.
 

 




Configuration Steps

 

  1. Install and configure MailArchiva in an identical manner on each server
  2. On both server A and B, in Configuration->Listeners, create a SMTP listener to receive journaling traffic from the mail server/s on port 25
  3. On both server A and B, in Configuration->Listeners, create an SMTP listener to receive HA traffic on port 8091
  4. On server A in Configuration->Connections, create a SMTP client connection forward HA traffic to ip address (port 8091) of server B.
    a) Set max retries to 0.
    b) Increase queue limit to 100k or greater.
  5. On server B in Configuration->Connections, create a SMTP client connection forward HA traffic to the ip address (port 8091) of server A. 
    a) Set max retries to 0. 
    b) Increase queue limit to 100k or greater.
  6. On server A and B, in Configuration->Routes, create a new route, to
    a) receive journaling traffic on SMTP listener listening on port 25
    b) archive
    c) forward traffic to HA SMTP client connection
  7. Increase the maximum queue size in Configuration->Archive to 100k or even higher depending on traffic. 

With the above configuration:
 

  1. When journaling traffic is received on server A port 25, traffic is archived, and then forwarded to HA counterpart server B on port 8091.
  2. When Journaling traffic is received on server B port 25, traffic is archived, and then forwarded to HA counterpart server A on port 8091.
Note: Care should be taken in the setup above not to create an infinite mail loop. For example, one could do this by specifying port 25 instead of 8091 on a HA client SMTP connector.
© 2005 - 2024 ProProfs

Found this information useful? Visit mailarchiva.com to learn more about MailArchiva.

-