mirror of
https://github.com/Snapchat/KeyDB.git
synced 2026-02-27 14:14:29 +00:00
4
Multimaster Support
John Sully edited this page 2019-04-04 16:16:24 -04:00
KeyDB now has support with multiple masters when replicating. This mode is enabled with the following configuration line:
multi-master yes
When KeyDB connects with multiple masters it behaves differently than with traditional replication:
- Multiple invocations of the replicaof command will result in adding additional masters, not replacing the current one
- KeyDB will not drop its database when sync'ing with the master
- KeyDB will merge any reads/writes from the master with its own internal database
- KeyDB will default to last operation wins
This means that a replica with multiple masters will contain a superset of the data of all its masters. If two masters have a value with the same key it is undefined which key will be taken. If a master deletes a key that exists on another master the replica will no longer contain a copy of that key.
This feature is still experimental, if you try it out please let us know how it works for you.