CAP Theorem Flashcards
(6 cards)
What is CAP Theorem? Why is it important?
CAP theorem states that a distributed system can only fulfill two of the following three requirements:
- Consistency
- Availability
- Partition Tolerence
All three are impoerant factors in a distributed system, but you have to evaluate trade-offs depending on your requirements.
Which aspect of CAP Theorem cannot typically be compromised?
Partition tolerance cannot be ignored as, by nature, if the system has multiple partitions and one fails, it will compromise both availability and consistency.
In practical terms, which two options are the choices when building a distributed system?
Either consistency or availability must be prioritized.
When building a system that needed to prioritize availability and consistency, which would database type might you choose?
Since you don’t need partition tolerence, a relational database would be a good choice.
In a system that prioritized both consistency and partition tolerance, which database store would be a good option?
A distributed store like BigTable or Hbase has strong consistency guarantees while retaining partition intolerance.
What type of database might be used in a system that prioritizes availability with partition tolerance?
Potentially a columnar store such as Cassandra or a document store like MongoDB, which doesn’t have as strict consistency requirements but is distributed and highly available.