consistency tradeoffs in modern distributed database system design

11
Consistency Tradeoffs in Modern Distributed Database System Design Article by Daniel J. Abadi, Yale University Presentation by Arinto Murdopo

Upload: arinto-murdopo

Post on 25-May-2015

2.835 views

Category:

Technology


0 download

DESCRIPTION

Slide for SDS homework. Original article can be downloaded from http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=6127847

TRANSCRIPT

Page 1: Consistency Tradeoffs in Modern Distributed Database System Design

Consistency Tradeoffs in Modern

Distributed Database System Design Article by Daniel J. Abadi, Yale University

Presentation by Arinto Murdopo

Page 2: Consistency Tradeoffs in Modern Distributed Database System Design

Outline

• CAP Theorem

• What’s wrong with CAP?

• Consistency/Latency Tradeoff

• Type of Replication

• PACELC

• DDBS in PACELC metrics

• Conclusion

Page 3: Consistency Tradeoffs in Modern Distributed Database System Design

CAP theorem

Consistency Availability

Partition Tolerance

CP

CA

AP

Page 4: Consistency Tradeoffs in Modern Distributed Database System Design

What’s wrong with CAP?

Consistency Availability

Partition Tolerance

CP

CA

AP

Reduced Consistency, let’s justify it!

(?)Tolerant to network partition

High availability Sacrifice consistency

Page 5: Consistency Tradeoffs in Modern Distributed Database System Design

What’s wrong with CAP?

The P in CAP is combination of: • Partition tolerance ~ commonly used as justification

• Existence of a network partition itself ~ often forgotten

Page 6: Consistency Tradeoffs in Modern Distributed Database System Design

Consistency/Latency Tradeoff

Modern Database Design • Dynamo ~ Amazon • Cassandra ~ Facebook • Voldemort ~ LinkedIn • PNUTS ~ Yahoo

Availability & Latency are critical!

High Availability -> Replication is needed

Replication is used -> Consistency/Latency Tradeoff occurs

Page 7: Consistency Tradeoffs in Modern Distributed Database System Design

Type of Replication

1. Data updates sent to all replicas at same time

a. Without preprocessing layer ~ latency

b. With preprocessing layer ~ consistency

2. Data updates sent to agreed-upon location first

a. Synchronous ~ consistency

b. Asynchronous ~ latency. Used by PNUTS.

c. Combination ~ configurable

Page 8: Consistency Tradeoffs in Modern Distributed Database System Design

Type of Replication

3. Data updates sent to an arbitrary location

• Location for data item is not always same

a. Synchronous ~ consistency

b. Asynchronous ~ latency

• Used by Dynamo, Cassandra, and Riak -> combined with 2c

Page 9: Consistency Tradeoffs in Modern Distributed Database System Design

PACELC

P ~ when there is partitioning • Trade off between AC E ~ else (which is no partitioning) • Trade off between LC

Page 10: Consistency Tradeoffs in Modern Distributed Database System Design

DDBS in PACELC metrics

DBSS A C L C

Dynamo v v

Cassandra v v

Riak v v

VoltDB/H-Store v v

Megastore v v

MongoDB v v

PNUTS v v

Dynamo, Cassandra and Riak have user-adjustable settings in LC tradeoff!

Page 11: Consistency Tradeoffs in Modern Distributed Database System Design

Conclusion

• CAP is still important

• Exploring new metrics is good

• PACELC metrics are worth to consider