Paxos Made Moderately Complex Robert Van Renesse Cornell University - - PowerPoint PPT Presentation

paxos made moderately complex
SMART_READER_LITE
LIVE PREVIEW

Paxos Made Moderately Complex Robert Van Renesse Cornell University - - PowerPoint PPT Presentation

Paxos Made Moderately Complex Robert Van Renesse Cornell University Problems Addressed Implementation of Multi-Decree Paxos Not a simple protocol! Liveness How to make Paxos live without overly


slide-1
SLIDE 1

Paxos Made Moderately Complex

Robert Van Renesse Cornell University

slide-2
SLIDE 2

Problems Addressed

  • Implementation of Multi-Decree Paxos
  • Not a simple protocol!
  • Liveness
  • How to make Paxos live without overly simplifying?
  • Practicality of Paxos
  • How to make Paxos more pragmatic?
slide-3
SLIDE 3

Comparison with the Required Paper

  • What’s adopted?
  • The multi-paxos protocol
  • Basic state reduction optimizations
  • What’s new?
  • Very detailed pseudocode
  • More cool optimizations!
slide-4
SLIDE 4

Pseudocode

slide-5
SLIDE 5
slide-6
SLIDE 6

Working of the Pseudocode

  • Leader uses scouts to get the next ballot number
  • Clients bcast the requests to replicas
  • Replicas propose the commands
  • Leaders instruct commanders to carry out the

voting

  • Decision is relayed back to the clients
slide-7
SLIDE 7

Message Sequence Chart

Multi-decree paxos in action

slide-8
SLIDE 8

Components and States

  • Replicas
  • Maintain a state, slot_num, proposal set, decision set
  • Leaders
  • Manage different proposals using different ballots
  • Responsible for relaying a decision to the replicas
  • Monitor other leaders when passive
  • Acceptors
  • They are the voters
  • “Memory of Paxos”
  • Scouts and Commanders
  • Identify acceptors for a particular <ballot, slot, proposal> triplet - p1a message
  • Preempt if higher ballots are running for the same proposal
slide-9
SLIDE 9

Pragmatism with Paxos

  • State Reduction
  • Already discussed in the required paper
  • Garbage Collection
  • Read-only commands
  • Collocation of replicas
slide-10
SLIDE 10
  • Garbage Collection
  • When all replicas know of a decision for a slot, that information can be discarded from the

acceptor.

  • Replica tells leader, leader informs acceptors
  • 2f + 1 replicas to safely perform garbage collection
  • Read-Only Command optimization
  • Once a leader’s ballot is accepted, “attach” RO request to the update
  • Use only one replica instead of all the replicas
  • Using “leases”, a leader can become THE president.
  • No need of jumping through all the hoops
  • When the leaders and replicas are collocated…
  • Mostly they are collocated
  • Can send to local leaders instead of broadcasting to all leaders
slide-11
SLIDE 11

Takeaways

  • Exercise with 10 programming questions asking you to

do all the optimizations!

  • Full fledged pseudocode
  • Critical Optimizations for a practical implementation
  • Garbage Collection
  • Read-Only optimization
  • Collocation