Interview concept

What is the CAP theorem?

The CAP theorem states that during a network partition a distributed system must choose between consistency and availability, since partition tolerance is required in practice. It frames core tradeoffs in distributed data stores.

Interview concept

How it works

The three properties

Consistency means every read sees the latest write; availability means every request gets a response; partition tolerance means the system survives dropped messages.

Choosing under partition

When a partition occurs, a system favors either consistency (reject some requests) or availability (serve possibly stale data).

Practical nuance

Real systems tune consistency levels rather than picking one extreme, as in eventual or tunable consistency.

Interview concept

Responsible use

Use any live AI assistant only where interview, workplace, school, and platform rules allow it. Do not use generated answers to misrepresent your skills, experience, or authorship.

FAQ

Common questions.

Can a system have all three of CAP?

Not during a network partition. When partitions happen, you trade consistency against availability; partition tolerance is a practical requirement.

How does CAP show up in interviews?

System design interviews expect you to justify consistency versus availability choices for stores, caches, and replication.