Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cloud Storage Consistency Doug Terry Microsoft Research Silicon Valley … Explained through Baseball.

Similar presentations


Presentation on theme: "Cloud Storage Consistency Doug Terry Microsoft Research Silicon Valley … Explained through Baseball."— Presentation transcript:

1 Cloud Storage Consistency Doug Terry Microsoft Research Silicon Valley … Explained through Baseball

2 Data Replication in the Cloud Question: What consistency choices should cloud storage systems offer applications?

3 Some Popular Systems Amazon S3 – eventual consistency Amazon Simple DB – eventual or strong Google App Engine – strong or eventual Yahoo! PNUTS – eventual or strong Windows Azure Storage – strong (or eventual) Cassandra – eventual or strong (if R+W > N)... 3

4 A Spectrum of Consistency Strong Consistency Eventual Consistency Intermediate Consistency Lots of consistencies proposed in research community: probabilistic quorums, session guarantees, epsilon serializability, fork consistency, causal consistency, demarcation, continuous consistency,...

5 My Favorite Read Consistency Guarantees Strong ConsistencySee all previous writes. Eventual ConsistencySee subset of previous writes. Consistent PrefixSee initial sequence of writes. Monotonic ReadsSee increasing subset of writes. Read My WritesSee all writes performed by reader. Bounded StalenessSee all old writes.

6 Comparing Consistency Strong RMWMonotonicBoundedPrefix Eventual metric = set of allowable read results strength

7 Consistency Trade-offs Strong ConsistencySee all previous writes. Eventual ConsistencySee subset of previous writes. Consistent PrefixSee initial sequence of writes. Bounded StalenessSee all old writes. Monotonic ReadsSee increasing subset of writes. Read My WritesSee all writes performed by reader. ADF DAA CBA BCD CBB CCC consistencyperformance availability

8 The Game of Baseball for inning = 1.. 9 outs = 0; while outs < 3 visiting player bats; for each run scored score = Read (visitors); Write (visitors, score + 1); outs = 0; while outs < 3 home player bats; for each run scored score = Read (home); Write (home, score + 1); end game;

9 Official Scorekeeper Desired consistency? Strong = Read My Writes! 9 score = Read (visitors); Write (visitors, score + 1);

10 Umpire Desired consistency? Strong consistency 10 if middle of 9 th inning then vScore = Read (visitors); hScore = Read (home); if vScore < hScore end game;

11 Radio Reporter Desired consistency? Consistent Prefix Monotonic Reads or Bounded Staleness 11 do { BeginTx(); vScore = Read (visitors); hScore = Read (home); EndTx(); report vScore and hScore; sleep (30 minutes); }

12 Sportswriter Desired consistency? Eventual? Strong = Bounded Staleness 12 While not end of game { drink beer; smoke cigar; } go out to dinner; vScore = Read (visitors); hScore = Read (home); write article;

13 Statistician Desired consistency? Strong Consistency (1st read) Read My Writes (2 nd read) 13 Wait for end of game; score = Read (home); stat = Read (season-runs); Write (season-runs, stat + score);

14 Stat Watcher Desired consistency? Eventual Consistency 14 do { stat = Read (season-runs); discuss stats with friends; sleep (1 day); }

15 Official scorekeeper: score = Read (visitors); Write (visitors, score + 1); Statistician: Wait for end of game; score = Read (home); stat = Read (season-runs); Write (season-runs, stat + score); Umpire: if middle of 9 th inning then vScore = Read (visitors); hScore = Read (home); if vScore < hScore end game; Radio reporter: do { vScore = Read (visitors); hScore = Read (home); report vScore and hScore; sleep (30 minutes); } Sportswriter: While not end of game { drink beer; smoke cigar; } go out to dinner; vScore = Read (visitors); hScore = Read (home); write article; Strong Consistency Monotonic Reads Read My Writes Consistent Prefix Bounded Staleness Read My Writes Stat watcher: stat = Read (season-runs); discuss stats with friends; Eventual Consistency

16 Conclusions Replication schemes involve tradeoffs between consistency, performance, and availability Consistency choices can benefit applications But we, the research community, must provide better definitions, analysis, and tools


Download ppt "Cloud Storage Consistency Doug Terry Microsoft Research Silicon Valley … Explained through Baseball."

Similar presentations


Ads by Google