Replication mechanism

Introduction

Like all other aspects of FineDB, its replication mechanism try to be simple (to code and to set up) and efficient (fast, not ressource intensive) at the same time. It is based on two principles:

  1. Data are pushed from the source to the destination.
  2. Each server can push data to only one other node.

Master-slave replication

Every operation processed by the master server is echoed to the slave.

/img/master-slave.png

In a multi-slave environment, slave servers form a chain, each one pushing data to the next.

/img/master-multislave.png

Master-master replication

Loop cluster

Using the same technic than for master/slave replication, it is possible to set up a "loop". When a key/value must be created or updated, each server send it to the next one; it is discarded when it come back to the original server.

/img/loop-multimaster.png

Loop clusters are fine when there is few computers in the cluster.

Dispatcher

For bigger clusters, the replication needs an additional software to distribute data. Then all servers get the data without waiting for other servers to process it.

/img/multimaster.png