YouTube Lecture Notes: Multi-Clouds and Consensus

Those are my notes from watching the following video: Google I/O 2009 - Transactions Across Datacenters.


Those notes are not curated, with lots of open questions. Take it for what it is.

Different Kind of Consistencies


You can just not care, record the writes. Data to be figured-out by the reader.

Weak Consistency

Weak consistency: best try, “message in a bottle”.

Eventual Consistency

Eventual consistency: 1 master (r/w), some replicas (read-only). Called Master Slave Replication (MSR).

Pros / Cons: - (+) Better read availability / speed for people on other continent - (-) Read lags if done on a replica - (-) If master crash, some data loss possible. - (-) If master goes offline, read OK but write goes down as long as the master is down.

Eventual Consistency: Multi-Master Replication

Accept write from multiple places!

Strong Consistency

Implemented by ??? (Paxos I guess).

Pros / Cons: - (+) Absolutely consistent. - (-) Performance degradation.

How to Achieve Consensus

Two Phase-Commit (2PC)

Write-ahead log. I don’t get how you can completely be sure something makes it in. - (-) Everything needs to be synchronous: poor throughput.

3PC allows async.


Paxos is a consensus protocol that is similar to 2PC/3PC, but lighter. Still impacts latency quite a lot.