Replication

master-slave

For replica configurations, Master-Replica will receive all updates and it propagates those updates to its replicas. K-safety is a threshold for determining the fault tolerance of the replicated database. The value K represents the number of replicas per data object that must exist at all times.

propagation

When a txn commits on a replicated database, the DBMS has to decide whether it has to wait for that txn's changes to propagate to other nodes before it can send the acknowledgement to application.

  • Synchronous: The master sends updates to replicas and then waits for them to acknowledge that they fully applied (i.e., logged) the changes.
  • Asynchronous: The master immediately returns the acknowledgement to the client without waiting for replicas to apply the changes.
  • Semi-Synchronous: Replicas immediately send acknowledgements without logging them

CVV

  1. It asks all replicas for their version number
  2. It then asks the replica with the greatest version number for the file
  3. If the servers don't agree about the files version, the client can direct the servers to update a client that is behind, or inform them of a conflict. CVVs are compared just like vector timestamps. A conflict exists if two CVVs are concurrent, because concurrent vectors indicate that each server involved has seen some changes to the file, but not all changes.