0

If I choose consistency and availability, this means that I can't have partition tolerance. What does this mean? Does this mean that the whole system has to be shut down? If so, I won't have availability either? Is this a contradiction?

I know that when there is no partition, you can have all three.

user4157124
  • 2,809
  • 13
  • 27
  • 42
Eli.Z
  • 11
  • 3
  • 2
    "CAP is frequently misunderstood as if one has to choose to abandon one of the three guarantees at all times. In fact, the choice is really between consistency and availability only when a network partition or failure happens; at all other times, no trade-off has to be made." See the [Wikipedia article.](https://en.wikipedia.org/wiki/CAP_theorem) – Renzo Oct 31 '19 at 10:46
  • Please ask one clear specific question about how you are stuck in some authoritative presentation. Please don't ask us to write another one. If your question involves an example give it but explain how it is an example of what the presentation has said. PS Before considering posting please always google your error message or many clear, concise & precise phrasings of your question/problem/goal, with & without your particular strings/names & site:stackoverflow.com & tags, & read many answers. If you post a question, use one phrasing as title. – philipxy Oct 31 '19 at 18:44
  • Does this answer your question? [Why isn't RDBMS Partition Tolerant in CAP Theorem and why is it Available?](https://stackoverflow.com/questions/36404765/why-isnt-rdbms-partition-tolerant-in-cap-theorem-and-why-is-it-available) – user4157124 Mar 23 '22 at 19:31

3 Answers3

1

CAP theorem merely states that when a strongly consistent system is partitioned, it would have an availability drop. It does not mean you can choose any one of three combinations {CP, AP, CA}.

Partitioning ("P") is beyond your control, it would happen, when it does, the system has effectively chosen P for you. The only two options remain, CP or AP. That means, either shutdown or serve eventually consistent data.

vasha
  • 96
  • 2
0

The CAP theorem is a theoretical reasoning on the cluster guarantees when one or more of its nodes get isolated from the rest. E.g. if one node is unable to reach the rest of the cluster it has three options: 1) respond to any received request thereby guaranteeing A but not C; 2) do not respond thereby ensuring C instead of A; 3) shutdown before receiving any request to terminate the partition.

Regarding the latter, you sacrificed P because you avoided the partition instead of tolerating it, i.e. the cluster minus the node that shuts down becomes CA - at least until the next partition occurs in which point more node(s) will need to shutdown. Since you can't really prevent partitions from happening this model converges to the scenario in which the cluster has only one node - in such case there is no "rest of the cluster" to get isolated from hence it is always CA.

In practice, if you want a cluster of nodes you do not want a one-node cluster, as plural is kind of the whole point, hence you are unlikely to find many CA alternatives and end up choosing between C and A.

See this answer for better examples.

João Matos
  • 6,102
  • 5
  • 41
  • 76
0

If I choose consistency and availability, this means that I can't have partition tolerance. What does this mean?

Partition tolerance says that if part of the system fails, the system continues to function. If you do not have partition tolerance, when part of the system fails, the system fails. Then partition is meaningless and you have a non-partitioned system.

I know that when there is no partition, you can have all three.

No, you cannot have all three. When there is no partition, you do not have partition tolerance.

M. Azyoksul
  • 1,580
  • 2
  • 16
  • 43