[Dovecot] best practises for mail systems
Matthias-Christian Ott
ott at mirix.org
Tue Jun 5 15:27:30 EEST 2012
On 2012-06-05 05:14, Костырев Александр Алексеевич wrote:
> On each host system we created one VM and passed through 3x2TB disks into it.
>
>
>
> In guests vms on top of this disks we made XFS and fired up glusterfs with distributed replicated volumes for our mailstorage.
>
> so it looks like this:
>
>
>
> vm1 replicate vm2
>
> disk1 ------------> disk4
>
> disk2 ------------> disk5
>
> disk3 ------------> disk6
>
>
>
> in each vm we mounted glusterfs and pointed dovecot to that dir for mail creation (as ltmp) and imap4 user access.
>
> also we use exim as smtp.
>
>
>
> So, with glusterfs as mailstorage we can go for LVS to load balancing for exim and dovecot.
>
> so wherenever one of host systems (hence one of mail vms) goes down, users don't notice that
>
> 'cause LVS points them to working smtp and imap4 servers
>
> and they get their mail 'cause of glusterfs.
> [...]
> Cons:
>
> - not quite sure if glusterfs is production ready solution 'cause I've experienced split-brains during setting it up
>
> - IO performance issue. Though we didn't yet run any io tests, but glusterfs uses fuse to mount on clients. And guys on #gluster told me writing to the glusterfs mount will not be strictly local io.
I'm not familiar with LVS, but from the project description it seems
that you need a "front server" that does the load balancing, so you
either have to run at least two of these servers in parallel or add to
your cons that you introduced a single point of failure. But you
mentioned that you only have two servers, so you really can do this.
I would rather ensure high availability by running the two servers as
masters and using either IP address takeover or DNS failover (with
dynamic DNS) and either use Dovecot's replication (I haven't tested it
yet and I'm not sure what happens in case of IP address takeover) or a
file system that can handle these kinds of errors (e.g. Coda). You could
do load balancing via round-robin DNS. This only protects you against
the failure of single machine and because IMAP sessions are not
replicated between the servers, connections will get reset if one server
fails, but it's cost-effective and uses software that already exists.
Regards,
Matthias-Christian
More information about the dovecot
mailing list