CAP
img(°0°)

CA: single server
CP: multi servers, like 2pc
AP: multi servers, like raft

consistent

quorum
The W+R>N quorum solves the problem of sharing a single value among multiple servers.quorum can be used to implement a distributed log.
Can a situation occur in which a read doesn’t return the most up-to-date value?
If R+W > N, then this situation is guaranteed not to occur.
There are N nodes that might hold the value. A write contacts at least W nodes - place a “write” sticker on each of these. A subsequent read contacts at least R nodes - place a “read” sticker on each of these. There are R+W stickers but only N nodes, so at least one node must have both stickers. That is, at least one node participates in both the read and the write, so is able to return the latest write to the read operation.

2pc
refer
cons: may bad performance and too much constraint

paxos
A Paxos node can take on any or all of three roles: proposer, acceptor, and learner. A proposer proposes a value that it wants agreement upon. It does this by sending a proposal containing a value to the set of all acceptors, which decide whether to accept the value. Each acceptor chooses a value independently — it may receive multiple proposals, each from a different proposer — and sends its decision to learners, which determine whether any value has been accepted.
Ongoing(a little hard to descripe the algorithm)
refer

zab
Zookeeper Atomic Broadcast (ZAB) is the protocol under the hood that drives ZooKeeper replication order guarantee. It also handles electing a leader and recovery of failing leaders and nodes.
refer1
refer2

raft
Raft implements consensus by first electing a distinguished leader, then giving the leader complete responsibility for managing the replicated log. The leader accepts log entries from clients, replicates them on other servers, and tells servers when it is safe to apply log entries to their state machines.
refer

gossip
A gossip protocol is a procedure or process of computer-computer communication that is based on the way social networks disseminate information or how epidemics spread. It is a communication protocol.
refer

compare
img(°0°)
img(°0°)