[Date Prev][Date Next] [Chronological] [Thread] [Top]

Comments on replication consistency models

The Fedora folks have some comments defending their support of multi-master replication here

For the most part there's nothing noteworthy. Just wanted to address their point "There is no way for any LDAP loosely coupled replication to guarantee "read your writes" consistency." In fact, as we've discussed here a few times in the past, this not true.

We can guarantee "read your writes" consistency with the help of a tweaked chaining overlay. I.e.,
1) the client issues a write request to a slave
2) the slave chains the request to the master
3) when the chained write succeeds, the slave performs the write locally
4) the response is returned to the client

Assuming the client continues talking to the same slave, it will always see consistent data.

It's a form of two-phase commit but a very special case. Since it only requires waiting for one remote operation to succeed it's a lot more efficient than managing generalized N-server two-phase commit.

As a further optimization, the chained request can carry a control "don't loop back to me" telling the master not to propagate this update back to the initiating slave. It only saves a small bit of bandwidth, since with syncrepl, the subsequent redundant update would be idempotent.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/