Just looking for a direction to go. There are several HA/load-balancing packages for Ubuntu 10.04 and I'm not sure which one to use. Here is my scenario:
Using Postfix for smtp, dovecot for pop/imap.
Two servers:
In normal operation I want one server to respond to smtp and the other to pop/imap.
If any server fails I want the other to respond to both smtp and pop/imap.
WHICH LOAD BALANCER/HA PACKAGE SHOULD I USE?
Looking for one that is the easiest to set up while still allowing different routing depending on incoming port.
NOTES:
I have file replication already set up, I'm using gluster. This will replicate the email files between servers.
MySQL is a separate server that we are already using for our production postfix/dovecot authentication.
WWW is also a separate server we're using for our webmail/postfixadmin service, using the aforementioned MySQL server.
Best Answer
You can use keepalived for high availability. You can define two VIPs: one for each service smtp and pop/imap. One node can be configured as master for smtp and the other can be configured as master for pop/imap. When any node fails, boths VIPs are assigned to the remaining node.
Also, keepalived supports several load balancing algorithms and can be configured with failover and check scripts.