Geo: Hybrid Synchronization
I was talking to @dzaporozhets
and @DouweM
about an idea that came after a call with a prospect. Geo currently requires us to elect a primary node where writing operations will happen, all the other nodes will be read-only. This is a requirement right now as setting up a multi-master geographical distributed setup requires a lot of coordination we can't do right now:
- Database must be able to handle multi-master updates in a clustered environment (preferably with no global lock, as to prevent latency from killing us)
- Git (requires either a global lock mechanism or an intermediary step to merge, elect a winner and rollback others trying to concurrently update a repository, all this 'transactionally')
So an idea is to have a hybrid type of node synchronization, instead of electing a primary, let's say we have 3 regions: A B C, all this regions can do writing operations locally but they may or may not be interested in having access to repositories being worked by the other regions.
Region A, wants region B repositories Region B, wants region A and C repositories Region C, is fine
So you will get in Region A, all their repositories as expected, but also a automatically mirrored (read only) copy of repositories in B.
Some other things that may be good to consider:
- How to do authentication?
- We can setup the same OAuth mechanism so you can join from A to B with your current "A" account.
- Should we place a link somewhere like: "Go to primary"?
- Should we display menu itens for issues/merge request etc that when clicked will bring us back to the primary node for that repository?