CAP Theorem Flashcards

(6 cards)

1
Q

What is CAP Theorem? Why is it important?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which aspect of CAP Theorem cannot typically be compromised?

A

Partition tolerance cannot be ignored as, by nature, if the system has multiple partitions and one fails, it will compromise both availability and consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In practical terms, which two options are the choices when building a distributed system?

A

Either consistency or availability must be prioritized.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When building a system that needed to prioritize availability and consistency, which would database type might you choose?

A

Since you don’t need partition tolerence, a relational database would be a good choice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In a system that prioritized both consistency and partition tolerance, which database store would be a good option?

A

A distributed store like BigTable or Hbase has strong consistency guarantees while retaining partition intolerance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What type of database might be used in a system that prioritizes availability with partition tolerance?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly