Search code examples
riak

Does Riak (open source) support some form of multi-site replication?


The site is unclear on this one, only saying

Masterless multi-site replication

Does this imply that there is some master-master or master-slave system to replicate to another site?

What are the other options to back up a single-server or multi-server Riak DB to another site?


Solution

  • We only provide multi-site replication in the enterprise product. It is separate feature not present in the open source code. As the description notes, it is not a master-slave system - this allows for nodes to be down at either end.

    Riak is partition tolerant because it's eventually consistant (AP in CAP Theorem) however just having nodes in two data centers doesn't give you all the benefits of full replication. You may not have any copies of a particular piece of data in one data center just because you have nodes there. If a data center went down or there was a routing issue on the net, when it became available again the data would eventually become consistant but during the outage the full set of data would not be in both places.

    For example, the default bucket property for r (read quorum) is n_val/2 + 1 - this means if you are configured for 3 replicas (n_val) at least 2 nodes have to respond. This would mean even if that one data center that was still up had a node with a copy of a piece of data, it wouldn't be considered a valid read because the other two nodes were in the data center that was down.

    For information on backing up a Riak cluster see: http://wiki.basho.com/Backups.html

    If you have specific questions, please feel free to contact us on the riak-users mailing list:

    http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com