A Brief Analysis of Consensus Protocol: From Logical Clock to Raft

Logical Clock

Replicated State Machine


Basic Paxos


  • Paxos can only determine one value and cannot be used for continuous log replication.
  • The presence of multiple Proposers may lead to livelock. In the previous example, Server2 submits a proposal twice before a proposal is finally accepted. In some extreme scenarios, more submittals of proposals may be required.
  • The final result of a proposal is only known to partial Acceptors. This cannot guarantee that each instance for state machine replication has a completely consistent log.



  1. The Paxos protocol does not require a leader. Each Proposer can create a proposal. Leader selection and consensus agreement are separated at the very beginning of designing Raft, while leader selection and proposal are mixed together in Paxos, making Paxos hard to understand.
  2. The original Paxos protocol is only to reach consensus on one single event. Once a value is determined, it cannot be modified. However, in realistic scenarios (including database consistency), it is required to continuously reach consensus on the value of a log entry. Therefore, the Paxos protocol itself cannot meet the requirement: We need to make some improvements and supplements to the Paxos protocol to apply Paxos in engineering in a real sense. Making supplements to the Paxos protocol is very complex. Although the Paxos protocol has been proven by Lamport, the Paxos-based and improved algorithms like Multi-Paxos are unproven.
  3. Another disadvantage is that Paxos only provides a rough description. This requires that subsequent improvements on Paxos and projects that use Paxos like Google Chubby have to implement a set of projects to solve specific problems in Paxos. The implementation details of projects like Chubby are not made public. That is to say, to apply Paxos in your own projects, basically you have to customize and implement a set of Paxos protocols that meet your specific requirements.

Closing Words


  1. Time, clocks, and the ordering of events in a distributed system
  2. Implementing fault-tolerant services using the state machine approach- A tutorial
  3. Paxos Made Simple
  4. Paxos made live- An engineering perspective
  5. Multi-Paxos (one PPT presentation at Standford University)
  6. Zab- High-performance broadcast for primary-backup systems
  7. In search of an understandable consensus algorithm (Raft)




Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How 1970s database research influenced our new integration platform

#CitehBirthdays: Celebrating George Jingo, Citeh’s geek of a developer

How to make a Filled-Tracked-Style Circular Progress Bar in Flutter

GlowLotto vs PancakeSwap Lotto

The IBM Stock Trader operator, part 1: Usage

The Silver Lining of COVID Lockdown — How to upskill yourself with online courses

iZUMi Finance has reached a strategic partnership with BurgerCities

Laravel Artisan How To Make Controller

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Using Docker as your production machine with X11

Automated Invoice Processing: What is it, Why is it needed and How Does it Work?

The Power of Docker’s COPY — from

How we made our integration tests delightful by optimizing our GitHub Actions workflow