A beginner question about Murder

Bron Gondwana brong at fastmail.fm
Fri Sep 10 00:31:04 EDT 2010


On Fri, Sep 10, 2010 at 09:37:29AM +0530, Shuvam Misra wrote:
> > Yes, this.  Absolutely.  The replication code is pretty safe for multi-master
> > in my branch already.  At least for mailboxes.  Sieve, Seen and Subs are
> > somewhat trickier.  I think the only really safe way is to keep "deletion"
> > entries around and replicate those too so you can tell the difference between
> > a creation at one and and a deletion at the other!
> 
> Aren't we really talking single-master at the mailbox level? The problems
> of true multi-master are non-trivial, IMHO, but if we are running a pair
> of Cyrus stacks replicating on each other, each mailbox will have its
> master copy only on one server, and will replicate on the other.

... ish.  I should write this up in more detail - but it's _fairly_ safe
even against changes on both ends.  I wrote up the UID promotion logic.
 
> The trick then will be to separate out the IMAP daemon and the sync_server
> to make them work on separate partitioned areas of the same message
> store and meta-data store. The IMAP daemon will only serve those parts
> which have local store as master, and sync-server will only update those
> areas for which it is acting as replica server.

Actually I plan to make sync_server update anything.  It won't be told about
stuff that isn't getting changes from the other end.

> If the buddy server fails, then I should be able to get the remaining
> server into full-serving mode by switching config files, shutting down
> sync-server, and allowing the IMAP daemon to serve data from the entire
> (now undivided) store.

Ideally it should just be a matter of creating or removing a single file
on the filesystem without needing to restart anything.  A "server X is
down" file, which would pause replication attempts and cause the next
replica to be chosen for all mailboxes mastered on that host.

> Please correct me if my understanding is wrong? Will this be the right
> way to proceed?

Hey - it doesn't even exist yet!  But my idea is to have multiple target
replication in a fairly flexible way, and I'm leaning towards having both
"for all mailboxes" replication target in the config file and "per mailbox"
replication target in the mailboxes.db.

(possibly the one in the imapd.conf should actually just add itself to any
mailbox where it isn't already present - so that the change can then
propagate to every other server in the murder, and they can all know where
the mailbox might be found)

hmm...

Bron.


More information about the Info-cyrus mailing list