Distributed Decision Making Flashcards

1
Q

What are the fault tolderant consesnsuses?

A
  • Practical Byzantine Fault Tolerance: Needs at least 3f + 1 nodes with f faulty nodes
  • Paxos, Raft: Need at least 2f + 1 nodes with f faulty nodes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Properties of consensus protocols?

A
  • Safety: never return an incorrect result
  • Availability: able to provide an aswer if n/2 + 1 servers are operational
  • No clocks: Do not depend on RTCs to work
  • Immune to stranglers: if n/2 + 1 nodes vote, the restult is considered safe
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the roles in Paxos?

A
  • Proposer: chooses a value or receives it from a client and sends it to acceptors to collect votes
  • Acceptor: votes to accept or reject the values proposed by the proposer, for fault tolerance, the algorithm requires a majority or acceptors
  • Learner: adopts the value when a large enough number of acceptors have accepted it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the phases of Paxos?

A

Voting: Preparation, Promise
Replication: Accept, Accepted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the Preparation phase in Paxos?

A

A proposer selects a proposal number n and sends a “prepare” request to acceptors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the Promise phase in Paxos?

A
  • If n is higher than every previous proposal number, the acceptor returns Promise to the proposer, and ignores all future proposal numbers less than n
  • If the acceptor accepted a proposal at some point in the past, it must include the previous proposal number m and the corresponding accepted value w in the reponse to the proposer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Accept phase in Paxos?

A

If the proposer received a response from the majority of acceptors, it sends an accept request for a proposal numbered n, the highest numbered proposal among the responses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the Accepted phase in Paxos?

A

If an acceptor received an accept request for proposal numbered n, it accepts the proposal unless it has already reponded to a prepare request having a number greater or equal than the proposal number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the main idea behind Raft?

A

It separated leader election and log replication states. When crashes are detected, choose new leader. The leader accepts commands from clients, and appends to its log. Then, it replicates its log to other servers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the roles in Raft?

A
  • Candidate: candidate for being a leader asking for votes
  • Leader: accepts log entries from clients, replicates them on other server
  • Follower: replicates the leader’s state machine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does Log Replication work in Raft

A
  • Each log has an index identifying its position in the log
  • The leader sends append_entries message to append an entry to the log
  • A log entry is committed once the leader that created the entry has replicated it on a majority of the servers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the main difference between the purpose of Paxos (+Raft) and Byzantine

A

Paxos and Raft assume the messages are valid and true (aka there are no malicious parties)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly