[Bucardo-general] hub-and-spoke replication

Joshua Tolley josh at endpoint.com
Mon Aug 24 16:48:19 UTC 2009

Because it (sort of) came up on the lists, and because I was curious to know
if I could make it work, I've just committed a test demonstrating several
databases replicating in a star-like pattern -- see t/15-star.t. It creates
three databases, called A, B, and C. A is the center of the star (or you could
call it, as I have in some of the comments because I'm all about inconsistent
names for things :), the hub of a hub-and-spoke system). Database A has
pushdelta syncs defined to each of the other databases, so changes to A get
replayed in B and C. On their end, B and C have syncs defined back to A, *with
makedelta turned on*. That means changes to B and to C get pushed back to A,
and since makedelta is on, once the changes are made to A, records are made
such that those changes are also pushed to the other spokes. That way, changes
to B end up, after passing through two syncs, in C.

This works, in theory, but there are problems. Most notably, let's say I
insert a value into B. This gets replicated to A with the sync from B to A,
and delta records made such that it also gets replicated to each of the spokes
when the syncs from A to each spoke run again. But these replications go to
*each* spoke node, including B. So rows are replicated from B to A, and then
back to B again. So performance under a scenario like this could be fairly
bad. Bucardo could perhaps be modified to support this more gracefully, but it
would take some work (and some demand for the capability). Also, these are
pushdelta syncs, not swap syncs. I've not worked through the logic in my head
enough, but I'm afraid this might be more likely to cause conflicts.

Anyway, it's there -- I hope someone finds it useful. Enjoy.

Josh Tolley  josh at endpoint.com  801-485-0203
End Point Corporation

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090824/6c931e1c/attachment.bin 

More information about the Bucardo-general mailing list