EECS 591 D ISTRIBUTED S YSTEMS Manos Kapritsos Fall 2020 D EALING - - PowerPoint PPT Presentation

eecs 591
SMART_READER_LITE
LIVE PREVIEW

EECS 591 D ISTRIBUTED S YSTEMS Manos Kapritsos Fall 2020 D EALING - - PowerPoint PPT Presentation

EECS 591 D ISTRIBUTED S YSTEMS Manos Kapritsos Fall 2020 D EALING WITH MULTIPLE PROPOSERS I swear I wont follow an earlier leader! And, btw, here is my current accepted value (if any) by leader x. Proposer IAmLeader #1 YouAreLeader Decree


slide-1
SLIDE 1

EECS 591 DISTRIBUTED SYSTEMS

Manos Kapritsos Fall 2020

slide-2
SLIDE 2

Proposer Acceptors

IAmLeader #1 YouAreLeader Decree

Learner

DEALING WITH MULTIPLE PROPOSERS

I swear I won’t follow an earlier leader! And, btw, here is my current accepted value (if any) by leader x.

Accept

slide-3
SLIDE 3

Proposer #1 Acceptors

IAmLeader #1 YouAreLeader Decree

Learner

DEALING WITH MULTIPLE PROPOSERS

I swear I won’t follow an earlier leader! And, btw, here is my current accepted value (if any) by leader x.

Proposer #2

IAmLeader #2 YouAreLeader Decree Accept

slide-4
SLIDE 4

OVERVIEW OF PAXOS

Proposer

Send IAmLeader(n) to all If n is the highest leader # I have seen: respond with YouAreLeader(Value, LeaderWhoProposedValue) Wait for a majority of responses

Acceptor

Once majority is received, send Propose(n, V) where V is the highest-leader proposal among the responses (or my own value, if none of the responses had a value) If n is the highest leader # I have seen, send Accept(n, V) to the learner

slide-5
SLIDE 5

EXAMPLES OF ACCEPTOR STATES

Acceptors Value By leader x 37

  • (as leader #50 comes to power)
slide-6
SLIDE 6

EXAMPLES OF ACCEPTOR STATES

Acceptors Value By leader x x 37 37 y y 42 41

  • (as leader #50 comes to power)
slide-7
SLIDE 7

EXAMPLES OF ACCEPTOR STATES

Acceptors Value By leader x x 37 37 y x 42 41

  • (as leader #50 comes to power)
slide-8
SLIDE 8

TOLERATING FAILURES

There are acceptors A value is only chosen if accepted by a majority ( ) So, even if of those acceptors fail, one will remain and will be part of any future majority Safety Liveness The leader always waits for responses. So, even if replicas fail, it will not block

slide-9
SLIDE 9

THE THREAT TO LIVENESS:

DUELING PROPOSERS

Greetings, peasants! I am your fearless leader #1! Grant me your blessing! Greetings, peasants! I am your fearless leader #2! Grant me your blessing! Greetings, peasants! I am your fearless leader #3! Grant me your blessing! Greetings, peasants! I am your fearless leader #4! Grant me your blessing! Greetings, peasants! I am your fearless leader #6! Grant me your blessing! Greetings, peasants! I am your fearless leader #8! Grant me your blessing! Greetings, peasants! I am your fearless leader #5! Grant me your blessing! Greetings, peasants! I am your fearless leader #7! Grant me your blessing!

. . . . . .

slide-10
SLIDE 10

THE THREAT TO LIVENESS:

DUELING PROPOSERS

This problem can be avoided during synchrony (proposer faults can be detected accurately using timeouts) It’s impossible to avoid during asynchrony! Well, we kind of knew that already…

slide-11
SLIDE 11

Paxos cannot be both safe and live during asynchrony!

(that would violate FLP)

So it’s doing the next best thing: staying safe all the time and achieving liveness when the system starts behaving synchronously

THE BEAUTY OF PAXOS

slide-12
SLIDE 12

USING (MULTI)PAXOS TO IMPLEMENT STATE MACHINE REPLICATION

The original Paxos algorithm achieves agreement on one value SMR required replicas to agree on the sequence of commands that will be executed

1 2 3 4 5 6 7 8 9 10 11 12 13 14

MultiPaxos: Run an instance of Paxos for each slot in the sequence Important: we don’t need to run phase (election) every time!

  • 3. Ensure that all replicas go through the same

sequence of state transitions

slide-13
SLIDE 13

PAXOS/SMR IN REAL LIFE

Proposers, acceptors and learners are all collocated on replicas

IAmLeader #1 YouAreLeader

P A L L L A A

request A Command 0 is A Accept reply 1 2 3 4 5 6 7 8 9

A

slide-14
SLIDE 14

PAXOS/SMR IN REAL LIFE

Proposers, acceptors and learners are all collocated on replicas

IAmLeader #1 YouAreLeader

P A L L L A A

request A Command 0 is A Accept reply

P

1 2 3 4 5 6 7 8 9

A

slide-15
SLIDE 15

ADMINISTRIVIA

Upcoming deadlines

Declare project topic: 10/8 Problem set #2: 10/12 Midterm exam: 10/21 Implementation project: 10/26 Presentation slides: 11/2

Implementation project

Going out after class Groups of 2 (no need to declare)

slide-16
SLIDE 16

ADMINISTRIVIA

Presentations start on 10/19

2 papers in each class Write a short review for one of them We will setup a website for you to post reviews Schedule posted on Piazza

slide-17
SLIDE 17

WRITING REVIEWS

Strengths what is the contribution nice insight/implementation/presentation Short summary Weaknesses I think this doesn’t work, because… performance is bad indifferent motivation bad presentation (optional) future work?