flp impossibility weakest failure detector
play

FLP Impossibility & Weakest Failure Detector Consensus - PowerPoint PPT Presentation

FLP Impossibility & Weakest Failure Detector Consensus Protocols in Theory Philip Daian - 10/25 slides influenced by Birman FA12 slides Consensus! Courtesy of https://rethinkdb.com Consensus Example Clients Storage Leader Consensus


  1. FLP Impossibility & Weakest Failure Detector Consensus Protocols in Theory Philip Daian - 10/25 slides influenced by Birman FA12 slides

  2. Consensus! Courtesy of https://rethinkdb.com

  3. Consensus Example Clients Storage Leader

  4. Consensus Example 100101 - S3 100101 - S3 Clients Storage 100101 - S3 Replicated Leader 100101 - S3

  5. Consensus Summary ● Important problem! We’ve already talked quite a bit about forms of consensus State machine replication -> consensus on state of machine ○ ○ Leader election in leadered protocols -> consensus on leader Paxos, CORFU -> essentially consensus protocols ○ ○ Byzantine Generals -> consensus in malicious actor setting ● Applications: “clock synchronization, PageRank, opinion formation, power smart grids, state estimation, control of UAVs, load balancing and so on” (Wiki) Conditions: Termination , Validity, Integrity, Agreement ● ○ Conditions vary depending on problem model / definitions Focus on consensus on a simple bit for simplicity; such protocols can extend ●

  6. Impossibility of Distributed Consensus with One Faulty Process 1985 ● 2001 Dijkstra prize; best paper in distributed systems distributed systems, distributed algorithms algorithms, complexity, e-voting, and impossibility results, theory oblivious transfer formal modeling

  7. FLP : Primary Result asynchronous deterministic distributed consensus impossible with even 1 crash failure asynchronous deterministic guaranteed

  8. Follow along! http://the-paper-trail.org/blog/a-brief-tour-of-flp-impos sibility/

  9. message buffer Communication Model processes

  10. message buffer send(p, m) (p, m) processes

  11. message buffer (p, m) ∅ ∅ p processes receive(p)

  12. message buffer reliable (p, m) m p processes receive(p)

  13. message buffer Step - Part 1 : event reliable (p, m) m p processes receive(p)

  14. message buffer Step - Part 2 reliable # send(p, m) p processes finite # send(p, m)

  15. message buffer Configuration reliable ... p processes

  16. Schedule - σ p0 v1 p1 v2 Event Event Event (receipt of m (receipt of m (receipt of m p2 by p) by p) v3 by p) p3 v4

  17. Run run p0 v1 p1 v2 Event Event Event (receipt of m (receipt of m (receipt of m p2 by p) by p) v3 by p) p3 v4

  18. 0-Valent Configuration All Schedule - σ1 p0 v1 Processes p1 v2 Schedule - σ2 Decide p2 v3 0 Schedule - σ3 p3 v4

  19. Initial configuration All Schedule - σ1 p0 v1 Processes p1 v2 Schedule - σ2 Decide p2 v3 0 Schedule - σ3 p3 v4

  20. 1-Valent Configuration All Schedule - σ1 p0 v1 Processes p1 v2 Schedule - σ2 Decide p2 v3 1 Schedule - σ3 p3 v4

  21. Bivalent Configuration (Read: Undecided) Decide 0 Schedule - σ1 p0 v1 Decide 1 Schedule - σ2 p1 v2 Decide 0 Schedule - σ3 p2 v3 Schedule - σ4 p3 v4

  22. Now, we prove: Any protocol in our model must have an infinitely long run (that never terminates)

  23. Proof Outline ● Start from the initial guaranteed bivalent configuration (Lemma 2) Since the configuration is bivalent, there must be another bivalent ● configuration reachable from the configuration by applying e last (Lemma 3) ● Since the configuration is bivalent… (Lemma 3) Bivalent Initial Event Event Bivalent Bivalent Configuration Infinitely Configuration Configuration (Lemma 3) (Lemma 3) Lemma 2

  24. Lemma 1; Housekeeping Schedules are commutative

  25. Proof! (Lemma 1) [from the paper]

  26. Lemma 2 There is an initial bivalent configuration (see: bivalent; read: undetermined / undecided)

  27. Initial Configurations - neighbors 0-valent 1-valent p0 v1 v1’ p1 v2 v2 p2 v3 v3

  28. Initial Configurations 0-valent 1-valent p0 v1 v1’ p1 v2 v2 p2 v3 v3

  29. Initial Configurations 0-valent 1-valent p0 v1 v1’ p1 v2 v2 p2 v3 v3

  30. Initial Configurations 0-valent 1-valent p0 v1 v1’ p1 v2 v2 p2 v3 v3 bivalent OR both 0 OR both 1

  31. 3 Processes - All Possible Inputs p0 0 1 1 0 0 1 1 0 p1 0 0 1 1 1 1 0 0 p2 0 0 0 0 1 1 1 1

  32. 3 Processes - Neighbors differ by 1 Process Input p0 0 1 1 0 0 1 1 0 p1 0 0 1 1 1 1 0 0 p2 0 0 0 0 1 1 1 1

  33. We want to prove There is an initial bivalent configuration assume the opposite - All initial configurations univalent (see: bivalent; read: undetermined / undecided)

  34. 3 Processes - A Univalent-Only Scheme 1 0 1 0 1 0 1 0 p0 0 1 1 0 0 1 1 0 p1 0 0 1 1 1 1 0 0 p2 0 0 0 0 1 1 1 1

  35. 3 Processes - Another Univalent-Only Scheme 0 0 0 0 1 1 1 1 p0 0 1 1 0 0 1 1 0 p1 0 0 1 1 1 1 0 0 p2 0 0 0 0 1 1 1 1

  36. So Univalent only schemes don’t work Must have initial bivalent configuration!

  37. Reminder ● Start from the initial guaranteed bivalent configuration (Lemma 2) Since the configuration is bivalent, there must be another bivalent ● configuration reachable from the configuration by applying e last (Lemma 3) ● Since the configuration is bivalent… (Lemma 3) Bivalent Initial Event Event Bivalent Bivalent Configuration Infinitely Configuration Configuration (Lemma 3) (Lemma 3) Lemma 2

  38. Lemma 3 If C is a bivalent configuration, and e is an event applicable to C, there is a bivalent configuration reachable by applying e last (this is the big one)

  39. 2 Ingredients: Lemma 3 An event, e (fix any event) D - all configurations right after e D Receive e Any New Configuration Configuration

  40. Lemma 3 We will show: D has a bivalent configuration (through series of contradictions )

  41. Lemma 3 - Contradiction 1 D has only 1-valent configurations (E0 has seen e) Receive e Initial C E0 Bivalent 0 Valent

  42. Lemma 3 - Contradiction 1 D has only 1-valent configurations (E0 has seen e) Just received e Other events Initial C F0 E0 D Bivalent 1 Valent? 0 Valent

  43. Lemma 3 - Contradiction 1 D has only 1-valent configurations (E0 has seen e) Just received e Other events Initial C F0 D E0 Bivalent 1 Valent? 0 Valent

  44. Lemma 3 - Contradiction 1 D has only 1-valent configurations (E0 has not seen e) Events (no e ) Initial C E0 Bivalent 0 Valent

  45. Lemma 3 - Contradiction 1 D has only 1-valent configurations (E0 has not seen e) Events (no e ) Initial C E0 e D F0 Bivalent 0 Valent 1 Valent?

  46. Lemma 3 - Contradiction 1 D has only 1-valent configurations (E0 has not seen e) Events (no e ) Initial C E0 e D F0 Bivalent 0 Valent 1 Valent?

  47. Summary Disproven : D has only 1-valent configurations D has only 0-valent configurations (same) 2 Possibilities: D has only 1, 0 valent configurations (no bivalent) [next] D has bivalent configurations

  48. Lemma 3 - Contradiction 1 D has only 1, 0-valent configurations D0 D 0 Valent ) e t o g t s u j ( s t n e v E Initial C Bivalent Events (just got e ) D1 1 Valent

  49. Lemma 3 - Contradiction 1 D has only 1, 0-valent configurations (e’ and e have different destinations) D0 D 0 Valent ) e t o g t s u j ( s t n e v E Initial C Bivalent (just got e’ ) C0 (just became (just got e ) D1 1-valent) 1 Valent 1 Valent

  50. Lemma 3 - Contradiction 1 D has only 1, 0-valent configurations (e’ and e have different destinations) D0 D 0 Valent ) e t o g t s u j ( s t n e v E e’ Initial C Bivalent (just got e’ ) C0 (just became (just got e ) D1 1-valent) 1 Valent 1 Valent

  51. Lemma 3 - Contradiction 1 D has only 1, 0-valent configurations (e’ and e have different destinations) D0 D 0 Valent ) e t o g t s u j ( s t n e v E e’ Initial C Bivalent (just got e’ ) C0 (just became (just got e ) D1 1-valent) 1 Valent 1 Valent

  52. Lemma 3 - Contradiction 1 D has only 1, 0-valent configurations D (e’ and e have same destination, p) D0 0 Valent Events (just got e ) Initial C Bivalent (just got e’ ) ( j u s t g C0 o t e ) (just became D1 1 Valent 1-valent) 1 Valent

  53. Lemma 3 - Contradiction 1 D has only 1, 0-valent configurations D (e’ and e have same destination, p) R - p “crashes” D0 E0 0 Valent 0 Valent Events (just got e ) Initial C Bivalent (just got e’ ) ( j u s t g C0 o t e ) R - p “crashes” (just became D1 E1 1 Valent 1-valent) 1 Valent 1 Valent

  54. Lemma 3 - Contradiction 1 D has only 1, 0-valent configurations D (e’ and e have same destination, p) A R - p “crashes” D0 E0 R - p “crashes” 0 Valent 0 Valent Events (just got e ) Initial C Bivalent (just got e’ ) ( j u s t g C0 o t e ) R - p “crashes” (just became D1 E1 1 Valent 1-valent) 1 Valent 1 Valent

  55. Lemma 3 - Contradiction 1 D has only 1, 0-valent configurations D (e’ and e have same destination, p) Receive e A R - p “crashes” D0 E0 Receive e’, e R - p “crashes” 0 Valent 0 Valent Events (just got e ) Initial C Bivalent (just got e’ ) ( j u s t g C0 o t e ) R - p “crashes” (just became D1 E1 1 Valent 1-valent) 1 Valent 1 Valent

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend