Presentation is loading. Please wait.

Presentation is loading. Please wait.

Failure and Availibility DS Lecture # 12. Optimistic Replication Let everyone make changes –Only 3 % transactions ever abort Make changes, send updates.

Similar presentations


Presentation on theme: "Failure and Availibility DS Lecture # 12. Optimistic Replication Let everyone make changes –Only 3 % transactions ever abort Make changes, send updates."— Presentation transcript:

1 Failure and Availibility DS Lecture # 12

2 Optimistic Replication Let everyone make changes –Only 3 % transactions ever abort Make changes, send updates –If someone else’s changes come through with T_him < T_you, your changes are overridden Wait for a bit before committing –deadlocks

3 Two Phase Commit Blocking: Trades availability for correctness How? TMCohort Can commit? yes Do Commit Committed

4 2PC Blocking TMCohort Can commit? yes Do Commit Committed

5 2PC Blocking After Can_Commit, TM fails –Everyone blocks After Do_Commit, chort fails –TM blocks Single host failure can compromise the availability of the system

6 2PC Blocking Blocks because of the fear of unknown –The system can be in an unknown state, so everyone blocks hoping for stability

7 3PC Remove the fear of unknown Structure the state transition to remove ambiguity between commit/abort

8 3PC: Three Phase Commit Non-blocking consistency Combines agreement with transactions –1. There's no single state from which it's possible to make a transition directly to either a commit or abort state. –2. There is no state in which it is not possible to make a final decision and from which a transition to a commit state can be made.

9 Three-phase Commit

10 3PC Protocol Timeout is more meaningful Phase 1: yes/no –Failure, Timeout: abort Phase 2: Prepare to commit –Cohort Failure Before vote –abort After vote –Commit Phase 3: Commit –All acks: commit –After failure: commit

11 Recovery Checkpoints –Independent –Coordinated Logging –Independent checkpoints –Store activity

12 Quorum-based Protocols Read and Write quorum –K + G > N If Write quorum > n/2 + 1 –Always an overlap with read quorum Improve availbility

13 Starbucks 2PC? Interesting story from the web.. Synchronous Vs Asynchronous –Failure Model


Download ppt "Failure and Availibility DS Lecture # 12. Optimistic Replication Let everyone make changes –Only 3 % transactions ever abort Make changes, send updates."

Similar presentations


Ads by Google