[Dovecot] Fault tolerant architecture

list at airstreamcomm.net list at airstreamcomm.net
Tue Nov 29 01:16:37 EET 2011


On Mon, 28 Nov 2011 20:14:19 -0200, Marcelo Salhab Brogliato
<msbrogli-dovecot at vialink.com.br> wrote:
> Hi,
> I'm new to this list and want your help.
> I'm the mail admin for some domains in Rio de Janeiro - Brazil. Today we
> have only one machine running dovecot (imap+pop3) with local mail.
> We are migrating to two virtual machines in kvm running in separate
hosts.
> Then we have two main problems:
> - How to share mail files to both dovecots? We've been thinking about
NFS
> using local indexes. Is this a good approach?
> - How do we have a fault tolerant mail servers? Our first solutions is
> using two IP addresses in our DNS records.
> 
> About NFS using local indexes, I'm configuring a test server. But how to
> configure local indexes when my mail_location comes from sql
(userdb_home
> actually).
> I'm using dovecot 1.2.9.
> 
> I guess you already had some of these problems or maybe in another
> architecture these neither exists.
> 
> Thanks for any help,
> 
> Marcelo

Marcelo,

There are a number of ways to bring HA to a cluster of mail servers, one
that we have experimented with lately is a bit exotic, but might work for
you.

>From the base layer we are experimenting with GlusterFS, distributed and
replicated file system that offers very simple management and high
availablity.  It does run in userspace, which according to some will suffer
from performance bottlenecks, but so far we have not seen any serious
problems while running on 15k disks in raid 10.  Assuming you have two
virtual machines you could create a distributed file system between them,
and have a mirrored copy of the data on both.  

Next is dovecot/postfix/webmail which would be setup to use the local
GlusterFS mount on the system containing the mail storage and indexes. 

To provide HA on the connectivity side we used ucarp, which creates a
virtual IP address between two servers and fails that virtual IP over to
another server in the event of a server going down.  I personally would
never use DNS load balancing (two IPs for one DNS name) as it would round
robin to each server regardless of whether it is running or not.

This is somewhat exotic, but it works and provides a very high level of
availability.  However with HA comes more complexity and management.

Good luck and let me know if you would like more specifics.




More information about the dovecot mailing list