Dovecot Director: Preferred backend server

Steven Varco dovecot.org at bbs.varco.ch
Mon Aug 30 20:38:26 EEST 2021


HAProxy is fundamentally different as it operates on connections only, which is not what you usually want on IMAP Servers.
Instead you want to route all connections from the same USER to the same server and for this you must have a layer-7 proxy like dovecot director.

The implication with something like HAProxy would be that a user may has severall connections from different devices (Desktop mailclinet, Smartphone, Tablet, etc.) and if these (indpendent) connections go to seperate backend servers, it will cause issues.

-- 
https://steven.varco.ch/ 


> Am 30.08.2021 um 18:56 schrieb dovecot at ptld.com:
> 
>> I have a dovecot cluster with directror and two IMAP Servers behind.
>> Since they are in geographical different locations I would like to
>> have users to go to a specific IMAP backend server (if both are up)
>> and only switch to the other if one goes down (failover).
>> As to my current knowledge the PassDB extra field „host=„ is not
>> suitable in this case as it would never route the client to a
>> different backend, even if the „user specific backend“ would be down.
>> Is their a way in dovecot to achive this? As far as I searched the
>> documentation I could not find any information on this so far.
>> If not, it may also help if I could get certain users to „initially"
>> go to a specific backend (since director usually routes a client/user
>> to the same backend server it initially connects) and therefore it
>> would be interesting to know how dovecot director chooses wether a
>> user goes to server1 or server2?
>> And if a client already gets to server2, how to bring it „back“ to server1?
> 
> 
> Have you looked into HAProxy? Don't know if it the answer you seek but it allows for sticky connections and does keep alive checking to stop routing to a non-responsive server.
> https://www.haproxy.org/



More information about the dovecot mailing list