Distributed Systems 6.1: Consensus

  Рет қаралды 38,733

Martin Kleppmann

Martin Kleppmann

Күн бұрын

Пікірлер: 21
@daratha83
@daratha83 3 жыл бұрын
I accidently came to this channel and noticed that you are the famous Martin Kleppmann, author of the 'Designing Data Intensive Applications'. Nice to meet you Martin, I really enjoyed reading your book.
@RandomShowerThoughts
@RandomShowerThoughts Жыл бұрын
oh wow, I didn't even realize. I was looking at the book and wanted a video companion
@zhou7yuan
@zhou7yuan 3 жыл бұрын
Fault-tolerant total order broadcast [0:15] Manual failover [1:15] Consensus and total order broadcast [3:07] Common consensus algorithms [5:03] Paxos: single-value consensus Multi-Paxos: generalisation to total order broadcast Raft, Viewstamped Replication, Zab: total order broadcast by default Consensus system models [5:54] partially synchronous, crash-recovery Leader election [10:16] Ensure 1 leader per turn: Term++ / leader election 1 node vote once / term quorum of nodes Can we guarantee there is only one leader? [14:07] only unique leader per term cannot different terms Checking if a leader has been voted out [16:20] Shall I be your leader in term t? → yes ← yes Can we deliver message m next in term t? → ok ← ok Right, now deliver the message
@hainguyen9148
@hainguyen9148 2 жыл бұрын
I click the button like before watching the video
@RosamundaLearned
@RosamundaLearned 19 күн бұрын
Great analysis, thank you! I need some advice: I have a SafePal wallet with USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How can I transfer them to Binance?
@giuliosalierno3817
@giuliosalierno3817 Жыл бұрын
Thank you Prof. Kleppmann for this lecture. I have just one question: Is the second quorum intended to prevent multiple leaders from making the same request of delivering a message? Is this concept applied in the Paxos algorithm through the promise messages sent by acceptor nodes? Thank you
@abdelaziz2788
@abdelaziz2788 Жыл бұрын
17:15 =ينفع ادخله؟ -اه = ينفع اطلعه؟ -اه =ينفع ادخله؟ -اه =ينفع اطلعه؟ -اه =ينفع ادخله -اه
@lalitha7777
@lalitha7777 3 жыл бұрын
Very informative and interesting.
@AP-eh6gr
@AP-eh6gr 2 ай бұрын
videos are clearer than the book 😅
@za406
@za406 Жыл бұрын
Question re: the second quorum where the master asks for permission to send message M in term T. From what you said, it seems like this double-check is designed to ensure total order even if there are two active leaders at a given time. However, if this second quorum passes but the leader crashes prior to actually delivering M, couldn't we result in a split-brain state again?
@bibop224
@bibop224 3 жыл бұрын
Is the two generals problem an instance of the consensus problem? We have two "nodes" that want to agree on a value (the date of the attack). Or is there something that makes two generals problem different than a consensus problem as defined in this video?
@kleppmann
@kleppmann 3 жыл бұрын
There is a difference, but it's very subtle. The way consensus is formally defined, we say (slightly simplified) that consensus is achieved if all non-faulty nodes eventually reach a decision (liveness), and no two nodes make different decisions (safety). The liveness property is predicated on the assumption that any network partition is eventually repaired, and so any two non-faulty nodes will eventually be able to communicate. However, it's acceptable for there to be a period of time during which one node has made a decision and another node has not yet made a decision, and it's okay for this period to last for a long time. On the other hand, if one node makes a decision and the other node remains undecided for a long time, that is not considered a valid solution to the two generals problem, because if the undecided node waits until after the attack date to make its decision, that would be equivalent to having decided the wrong date. The requirement that the two generals reach agreement within some time bound makes the two generals problem harder than the consensus problem.
@bibop224
@bibop224 3 жыл бұрын
@@kleppmann That makes sense, thank you!
@rutvijravi6199
@rutvijravi6199 2 жыл бұрын
@@kleppmann I see another difference in addition to what you have stated. The 2 generals problem also requires common knowledge to be established between the generals on the decided value (time to attack). Whereas in consensus, the leader has to know whether a quorum decided, but the nodes in the quorum (that have decided) don't necessarily need to know (that the leader knows that they decided) before the leader ACKs the client. Is my understanding correct?
@luismrguimaraes
@luismrguimaraes Жыл бұрын
@@rutvijravi6199 This does seem correct.
@allyourcode
@allyourcode 3 жыл бұрын
@14:36 A few seconds later, I got video buffering. Sus.
@LinhNguyen-bp9hd
@LinhNguyen-bp9hd 2 жыл бұрын
after watching the series so many times I still cannot understand how the concurrent messages' order will be decided. Total order broadcast makes sure that the messages' order will be the same on all nodes, but how can the concurrent messages's order is decided?
@vhscampos1
@vhscampos1 2 жыл бұрын
My understanding is that, in the case of Raft at least, since all messages are first sent to the leader, which does the sequencing, the order between concurrent messages is defined by the order in which they arrive at the leader. All replicas will deliver them in the same order because the leader sends messages via FIFO broadcast.
@chaz-e
@chaz-e 2 жыл бұрын
broadcasted msgs reach the Master then based on order of msgs received the order is decided/maintained.
@tianwenchu1663
@tianwenchu1663 Жыл бұрын
Firstly, I think during the lecture 4.3, the total order broadcast is actually presented as leaderless design database, a client can send read/write request to some node, and then this node using gossip protocol to send such read/write as message to each other replication nodes. To ensure executing order is same between nodes (if event logic require, as no property as commutative), then they can rely on FIFO total order broadcast to sync, such broadcast does not need a leader, they still uses gossip protocol to flow the messages. Due to no leader, they need to rely on some timestamp to sort the messages on each replica, so here comes the lamport counter or vector clock. If using lamport counter, the order from causality message pair is preserved, however we face the lost writes from the concurrent writes. Because the lamport timestamp cannot detect if two messages are concurrent, such order between concurrent writes is simply performed as last write win. Then this order of overridden may not be aligned with what application wants. If not accepted, we can use vector clock to preserve all values from concurrent writes, and let the application layer to resolve, say we have 5 concurrent writes on a single key-value, we can return application a list of 5 values for such key, and next application sending a write, it needs to pick one. Such way needs a version vector on each key-value/row/document which records the state of single object. Please check last section from DDIA chapter 5. Now comes to lecture 6.1, which is using a single leader design, all writes flow only to such leader. Then we rely on leader node to come up with the sequence/order and sync with all replica nodes. The way how leader treat concurrent writes can have similar approaches 1. Using transactions with locks, so that the concurrent writes order can be executed in an undeterministic order. This can also encounter lost writes, because the last writes overrides may not from the request application really wants. (Example can be 5 writes to set value from x to i) 2. Using transactions with actual serial execution, each transaction as a whole run 1-1 following the order of landing on leader node, still last write overrides. 3. Same idea by using version vector, storing all values from the concurrent writes for the target value, let application decide.
@khacdoi1995
@khacdoi1995 3 жыл бұрын
niceeee
Distributed Systems 6.2: Raft
38:09
Martin Kleppmann
Рет қаралды 34 М.
Distributed Systems 4.2: Broadcast ordering
16:19
Martin Kleppmann
Рет қаралды 51 М.
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 101 МЛН
Молодой боец приземлил легенду!
01:02
МИНУС БАЛЛ
Рет қаралды 2,2 МЛН
Paxos Agreement - Computerphile
14:17
Computerphile
Рет қаралды 132 М.
Distributed Systems 7.2: Linearizability
18:44
Martin Kleppmann
Рет қаралды 38 М.
Distributed Systems 5.1: Replication
25:21
Martin Kleppmann
Рет қаралды 45 М.
Explaining Distributed Systems Like I'm 5
12:40
HashiCorp
Рет қаралды 42 М.
Designing for Understandability: The Raft Consensus Algorithm
1:00:28
Distributed Systems 3.3: Causality and happens-before
16:25
Martin Kleppmann
Рет қаралды 41 М.
Understand RAFT without breaking your brain
8:51
Core Dump
Рет қаралды 31 М.
Distributed Systems 7.3: Eventual consistency
14:59
Martin Kleppmann
Рет қаралды 28 М.
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН