eecs 591
play

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

EECS 591 D ISTRIBUTED S YSTEMS Manos Kapritsos Fall 2020 S TATE M ACHINE R EPLICATION M ODELING FAULTS Mean Time To Failure/Mean Time To Recover used mostly for disks of questionable value in expressing reliability Threshold: out of makes


  1. EECS 591 D ISTRIBUTED S YSTEMS Manos Kapritsos Fall 2020

  2. S TATE M ACHINE R EPLICATION

  3. M ODELING FAULTS Mean Time To Failure/Mean Time To Recover used mostly for disks of questionable value in expressing reliability Threshold: out of makes condition for correct operation explicit measures fault-tolerance of the architecture, not of individual components Enumerate failure scenarios

  4. A HIERARCHY OF FAILURE MODELS Fail-stop Crash Send omission Receive omission = benign failures General omission Arbitrary (Byzantine) failures

  5. A HIERARCHY OF FAILURE MODELS crash

  6. F AULT TOLERANCE : THE PROBLEM Clients Server Solution: replicate the server

  7. R EPLICATION IN TIME When a server fails, restart it or replace it Failures are detected , not masked Lower maintenance, lower availability Tolerates only benign failures

  8. R EPLICATION IN SPACE Run multiple copies of a server (replicas) Vote on replica output Failures are masked High availability and can tolerate arbitrary failures but at high cost

  9. T HE ENEMY : NON - DETERMINISM An event is non-deterministic if its output is not uniquely determined by its input The problem with non-determinism: Replication in time: must reproduce the original outcome of all non-deterministic events Replication in space: each replica must handle non- deterministic events identically

  10. T HE SOLUTION : STATE MACHINES Design the server as a deterministic state machine 4 f e a 1 3 b d c 2

  11. T HE SOLUTION : STATE MACHINES State machine example: a switch click off on click

  12. S TATE M ACHINE R EPLICATION Ingredients: a server 1. Make server deterministic (state machine) 2. Replicate server 3. Ensure that all replicas go through the same sequence of state transitions 4. Vote on replica outputs x = 1 = x=2

  13. ���������� S TATE M ACHINE R EPLICATION Ingredients: a server 1. Make server deterministic (state machine) 2. Replicate server 3. Ensure that all replicas go through the same sequence of state transitions 4. Vote on replica outputs x = 1 All state machines receive all commands in the same order x=2

  14. S TATE M ACHINE R EPLICATION Ingredients: a server 1. Make server deterministic (state machine) 2. Replicate server 3. Ensure that all replicas go through the same sequence of state transitions 4. Vote on replica outputs

  15. 4. Vote on replica outputs … When in trouble, cheat! Voter and client share fate! ’

  16. A DMINISTRIVIA Send me your paper preferences by tonight Send me your group declaration preferences by Oct 1 Homework #2 will be sent out later today due Monday, Oct 12, before class Implementation project will be out next Monday due Monday October 26, by end of day Research project topics due next Thursday, 10/08

  17. P RIMARY -B ACKUP

  18. T HE MODEL Failure model: crash Network model: synchrony Reliable, FIFO channels All messages are delivered within time Tolerates crash failures

  19. T HE IDEA Clients communicate with a single replica ( primary ) Primary: sequences and processes clients’ requests updates other replicas ( backups ) Backups use timeouts to detect failure of primary On primary failure, a backup becomes the new primary

  20. A SIMPLE PRIMARY - BACKUP PROTOCOL request reply new primary sync Active replication: sync = client request(s) Passive replication: sync = state update

  21. W EAKENING THE MODEL Failure model: crash Network model: synchrony Unreliable, FIFO channels Channels may drop messages All messages are delivered within time (looks paradoxical) Tolerates crash failures

  22. A SLIGHTLY DIFFERENT PRIMARY - BACKUP PROTOCOL request reply new primary ack sync

  23. G ENERALIZING TO MORE BACKUPS Primary backups

  24. G ENERALIZING TO MORE BACKUPS update Primary backups

  25. G ENERALIZING TO MORE BACKUPS update Primary backups

  26. G ENERALIZING TO MORE BACKUPS (active updates) Primary backups

  27. G ENERALIZING TO MORE BACKUPS (passive updates) Primary backups

  28. G ENERALIZING TO MORE BACKUPS (passive updates) Primary backups

  29. G ENERALIZING TO MORE BACKUPS Primary ack ack ack ack ack backups

  30. G ENERALIZING TO MORE BACKUPS reply Primary backups

  31. H ANDLING QUERIES query Primary backups

  32. H ANDLING QUERIES Primary backups

  33. H ANDLING QUERIES reply Primary However… backups

  34. H ANDLING QUERIES query Primary backups

  35. H ANDLING QUERIES query Primary The primary cannot respond until it has received all acks for prior updates ack ack ack ack ack backups

Recommend


More recommend