[Dovecot] cluster with dsync mirror
I have an idea for running a pair of redundant dovecot mail servers that may be odd but it might work. I'm interested in any thoughts on the topic.
Would it work to run 'dsync mirror' every minute against either mdbox or sdbox mailbox on a dedicated network connection between two (or potentially three or four) mail servers? I'm trying to avoid using a NAS/SAN or some other dedicated NFS server in a simple environment with a limited number of users. Everything else about the systems could be identical. Both could receive mail using Postfix with dovecot LDA. Thank you.
Bryan
On 16.8.2010, at 7.33, Bryan Vyhmeister wrote:
Would it work to run 'dsync mirror' every minute against either mdbox or sdbox mailbox on a dedicated network connection between two (or potentially three or four) mail servers? I'm trying to avoid using a NAS/SAN or some other dedicated NFS server in a simple environment with a limited number of users. Everything else about the systems could be identical. Both could receive mail using Postfix with dovecot LDA. Thank you.
Were you thinking about master/slave or multi-master setup? Multi-master might work ok with director, as long as dsyncing is done often enough.
If you don't have many users, then maybe dsyncing once a minute is enough. A more optimal version would go something like:
- create a dsyncing server process
- create a Dovecot plugin (using notify plugin, similar to mail_log) that notifies dsyncing process every time some user's mailbox changes
- based on that information, dsyncing process either runs dsync or delays it a bit. like maybe flag changes and expunges would be delayed a bit, but new mails would be immediately synced
- run a full dsync for every user once in a while anyway, just in case some notifications were missed
- implement a QRESYNC-like syncing for dsync to improve performance and reduce network traffic
On Mon, Aug 16, 2010 at 5:15 AM, Timo Sirainen tss@iki.fi wrote:
On 16.8.2010, at 7.33, Bryan Vyhmeister wrote:
Would it work to run 'dsync mirror' every minute against either mdbox or sdbox mailbox on a dedicated network connection between two (or potentially three or four) mail servers? I'm trying to avoid using a NAS/SAN or some other dedicated NFS server in a simple environment with a limited number of users. Everything else about the systems could be identical. Both could receive mail using Postfix with dovecot LDA. Thank you.
Were you thinking about master/slave or multi-master setup? Multi-master might work ok with director, as long as dsyncing is done often enough.
I was thinking about multi-master. I didn't think about director but that would solve the issue of not connecting to the same server each time and would cause dsync to not have to happen quite as often.
If you don't have many users, then maybe dsyncing once a minute is enough. A more optimal version would go something like:
- create a dsyncing server process - create a Dovecot plugin (using notify plugin, similar to mail_log) that notifies dsyncing process every time some user's mailbox changes - based on that information, dsyncing process either runs dsync or delays it a bit. like maybe flag changes and expunges would be delayed a bit, but new mails would be immediately synced - run a full dsync for every user once in a while anyway, just in case some notifications were missed - implement a QRESYNC-like syncing for dsync to improve performance and reduce network traffic
I'll have to investigate this further. This sounds like an even better solution. Thank you!
Bryan
I used a setup like this, to sync mail between 3 different
datacenters, in a multimaster setup.
For this I used unison, running every 28seconds. And it worked well
for two years, before I changed to a better approach. Older versions
of dovecot didn't like the moves very much (pre 1.0), but when I
upgraded it to 1.0.x versions, it seemed to be happy. I discontinued
it before 1.1 was out.
Quoting Bryan Vyhmeister dovecot@bsdjournal.net:
I have an idea for running a pair of redundant dovecot mail servers that may be odd but it might work. I'm interested in any thoughts on the topic.
Would it work to run 'dsync mirror' every minute against either mdbox or sdbox mailbox on a dedicated network connection between two (or potentially three or four) mail servers? I'm trying to avoid using a NAS/SAN or some other dedicated NFS server in a simple environment with a limited number of users. Everything else about the systems could be identical. Both could receive mail using Postfix with dovecot LDA. Thank you.
Bryan
What do you use now?
On 8/16/2010 6:27 AM, Patrick Domack wrote:
I used a setup like this, to sync mail between 3 different datacenters, in a multimaster setup.
For this I used unison, running every 28seconds. And it worked well for two years, before I changed to a better approach. Older versions of dovecot didn't like the moves very much (pre 1.0), but when I upgraded it to 1.0.x versions, it seemed to be happy. I discontinued it before 1.1 was out.
Quoting Bryan Vyhmeister dovecot@bsdjournal.net:
I have an idea for running a pair of redundant dovecot mail servers that may be odd but it might work. I'm interested in any thoughts on the topic.
Would it work to run 'dsync mirror' every minute against either mdbox or sdbox mailbox on a dedicated network connection between two (or potentially three or four) mail servers? I'm trying to avoid using a NAS/SAN or some other dedicated NFS server in a simple environment with a limited number of users. Everything else about the systems could be identical. Both could receive mail using Postfix with dovecot LDA. Thank you.
Bryan
On Mon, Aug 16, 2010 at 9:27 AM, Patrick Domack patrickdk@patrickdk.com wrote:
I used a setup like this, to sync mail between 3 different datacenters, in a multimaster setup.
For this I used unison, running every 28seconds. And it worked well for two years, before I changed to a better approach. Older versions of dovecot didn't like the moves very much (pre 1.0), but when I upgraded it to 1.0.x versions, it seemed to be happy. I discontinued it before 1.1 was out.
I am interested in what you are using now as well. Did you always have your users connect to the same system? Thank you for your response.
Bryan
participants (4)
-
Bryan Vyhmeister
-
Marc Perkel
-
Patrick Domack
-
Timo Sirainen