[Dovecot] database failover
Trying to get dovecot to _only_ use local copy of database, only querying another database server (same database, just replicated) if local copy is not responding, I have google fu'd a bit and found my only answer in so far as dovecot did this once upon as time, but it was only due to a dovecot bug, that has since been fixed, is that so? The wiki shows no information of failover, just load sharing, or is it an undocumented feature, or can dovecot not do failover, if not, can it be made so?
Trying to cut down on network traffic, postfix does this nicely, I thought dovecot did too.
Am 10.12.2011 11:07, schrieb Nick Edwards:
Trying to get dovecot to _only_ use local copy of database, only querying another database server (same database, just replicated) if local copy is not responding, I have google fu'd a bit and found my only answer in so far as dovecot did this once upon as time, but it was only due to a dovecot bug, that has since been fixed, is that so? The wiki shows no information of failover, just load sharing, or is it an undocumented feature, or can dovecot not do failover, if not, can it be made so?
Trying to cut down on network traffic, postfix does this nicely, I thought dovecot did too.
as far i know recent dovecot cant do it youre right postfix does
you can do a master-master setup i.e with mysql solving this works nice here, but might not be the best solution perhaps ldap, or other databases are better
Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
Thanks, we considered options, ruled out master-master for security, and since everything is with mysql (AAA) we decided not to introduce another database type, we only use a few servers, so we might use a cron job every minute to test for db response and if fails drop interface, returns up interface, as we use linux HA solution, so if the heartbeat fails it ignores it, and other alerting will notify us eventually if it stays down, not optimum I know, in fact darn right messy, but it'll suffice until Dovecot offers such a solution.
On Sat, Dec 10, 2011 at 8:18 PM, Robert Schetterer robert@schetterer.orgwrote:
Trying to get dovecot to _only_ use local copy of database, only querying another database server (same database, just replicated) if local copy is not responding, I have google fu'd a bit and found my only answer in so far as dovecot did this once upon as time, but it was only due to a dovecot bug, that has since been fixed, is that so? The wiki shows no information of failover, just load sharing, or is it an undocumented feature, or can dovecot not do failover, if not, can it be made so?
Trying to cut down on network traffic, postfix does this nicely, I
Am 10.12.2011 11:07, schrieb Nick Edwards: thought
dovecot did too.
as far i know recent dovecot cant do it youre right postfix does
you can do a master-master setup i.e with mysql solving this works nice here, but might not be the best solution perhaps ldap, or other databases are better
Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria
On Mon, Dec 12, 2011 at 09:25:14PM +1000, Nick Edwards wrote:
Thanks, we considered options, ruled out master-master for security, and since everything is with mysql (AAA) we decided not to introduce another database type,
But LDAP master-master is sooo nice :-) and once you have your users in LDAP it's triviall to re-use it as user source in lots of services (postfix lookups, authenticated smtp, apache basic auth, dovecot, etc..).
To get away from our SPoF mysql userdatabase I wrote some scripts that checkes for changes in the mysql userdatabase, and push these to LDAP every x minutes. The mysql-database is still our master user source, but I'm looking forward to getting rid of it completely real soon now.
-jf
On 10.12.2011, at 12.07, Nick Edwards wrote:
Trying to get dovecot to _only_ use local copy of database, only querying another database server (same database, just replicated) if local copy is not responding, I have google fu'd a bit and found my only answer in so far as dovecot did this once upon as time, but it was only due to a dovecot bug, that has since been fixed, is that so? The wiki shows no information of failover, just load sharing, or is it an undocumented feature, or can dovecot not do failover, if not, can it be made so?
Trying to cut down on network traffic, postfix does this nicely, I thought dovecot did too.
You could add two passdbs + userdbs with different configs. The second dbs would be used when first db is down, but also for unknown users / wrong authentications.
But yeah, the load balancing should be optional. There are just so many other things to do as well..
Hello Timo,
On Sat, Dec 10, 2011 at 8:26 PM, Timo Sirainen tss@iki.fi wrote:
On 10.12.2011, at 12.07, Nick Edwards wrote:
Trying to get dovecot to _only_ use local copy of database, only querying another database server (same database, just replicated) if local copy is not responding, I have google fu'd a bit and found my only answer in so far as dovecot did this once upon as time, but it was only due to a dovecot bug, that has since been fixed, is that so? The wiki shows no information of failover, just load sharing, or is it an undocumented feature, or can dovecot not do failover, if not, can it be made so?
Trying to cut down on network traffic, postfix does this nicely, I thought dovecot did too.
You could add two passdbs + userdbs with different configs. The second dbs would be used when first db is down, but also for unknown users / wrong authentications.
But yeah, the load balancing should be optional. There are just so many other things to do as well..
Yes, it would be nice, but I understand you have many things on your todo list.
participants (4)
-
Jan-Frode Myklebust
-
Nick Edwards
-
Robert Schetterer
-
Timo Sirainen