1 / 12

CAP Theorem

CAP Theorem. Justin DeBrabant. Properties of Distributed Systems. Consistency all nodes have up-to-date view of data Availability every request receives a response Partition Tolerance system will continue to function if partitions are isolated from each other

rashad
Download Presentation

CAP Theorem

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CAP Theorem Justin DeBrabant CIS 570 - Advanced Systems - Fall 2013

  2. Properties of Distributed Systems • Consistency • all nodes have up-to-date view of data • Availability • every request receives a response • Partition Tolerance • system will continue to function if partitions are isolated from each other • Question: Is there a tradeoff here? CIS 570 - Advanced Systems - Fall 2013

  3. ACID • Atomicity • all or nothing • Consistency • data is always in a valid state • Isolation • concurrently executing transactions are isolated • Durability • once committed, changes made by transaction are permanent CIS 570 - Advanced Systems - Fall 2013

  4. BASE • Basically Available Soft-state Eventual Consistency • Forfeits the “C” and “I” of ACID in return for availability • most NoSQL systems provide BASE instead of ACID guarantees CIS 570 - Advanced Systems - Fall 2013

  5. ACID vs. BASE • ACID • Focuses on consistency and isolation • BASE • weak consistency • data can be stale • availability first • simpler implementation • faster • is this always true? CIS 570 - Advanced Systems - Fall 2013

  6. CAP Theorem • “At most two.” • you can have at most two of the CAP properties for any shared data system • Disclaimer: • some question the assumptions used to prove the “theorem” • thoughts? CIS 570 - Advanced Systems - Fall 2013

  7. CIS 570 - Advanced Systems - Fall 2013

  8. Consistency + Availability • Give up partitions • Characteristics • two-phase commit • cache validation protocols • Example • single-site databases CIS 570 - Advanced Systems - Fall 2013

  9. Consistency + Partitions • Give up availability • Characteristics • pessimistic locking • Example • distributed databases CIS 570 - Advanced Systems - Fall 2013

  10. Availability + Partitions • Give up consistency • Characteristics • optimistic concurrency control • conflict resolution protocols • Example • web caching • DNS • NoSQL systems CIS 570 - Advanced Systems - Fall 2013

  11. Take-Homes • In real-world systems, there are (probably) tradeoffs • Which do you tradeoff? • depends on… • workload • data • users • requires a deep understanding of the choices available • In reality, systems all along this spectrum are useful in different ways CIS 570 - Advanced Systems - Fall 2013

  12. Questions? CIS 570 - Advanced Systems - Fall 2013

More Related