[Dovecot] Dovecot Failover

Timo Sirainen tss at iki.fi
Fri Apr 19 10:43:08 EEST 2013


On 19.4.2013, at 9.59, Nikolaos Milas <nmilas at noa.gr> wrote:

> Assuming we have two (low traffic) servers (on different data centers) replicated using dsync, what is the best way to automatically direct users to the main server when it is up and to the redundant one when the main server is down?
> 
> Using DNS? I've seen that DNS-based failover has generally issues (for example: http://serverfault.com/questions/60553/why-is-dns-failover-not-recommended, which is informative although it refers to web servers).
> 
> What is the suggested approach? HAProxy? Heartbeat/Pacemaker?

Well, there are two failure reasons:

a) Dovecot server fails. For that, you could use any kind of a proxy that redirects traffic to the other server (even Dovecot proxy on another server).

b) Network connection to the whole data center dies, or the whole data center loses power or otherwise dies. There's really no other choice to failover that than DNS, unless you manage to route the same IP address to two different data centers and just update the route.

I'd be more worried about b), since you can already fix a) pretty quickly with VMs. Or a) could also be switched to become a Dovecot proxy on demand if there's a bigger problem that can't be immediately fixed.



More information about the dovecot mailing list