Distributed SQL

Distributed SQL databases typically use the Paxos or Raft algorithms to achieve consensus across multiple nodes.

"[1] Spanner uses atomic clocks with the Paxos algorithm to accomplish consensus with regards to state distributed between servers.

[4] In 2015, two Google engineers left the company to create Cockroach DB which achieves similar results using the Raft algorithm without atomic clocks or custom hardware.

Algorithmically they sacrifice availability in that a failure of a primary node can make the database unavailable for writes.

Implementations without custom hardware require servers to compare clock offsets and potentially retry reads.