I have a question. I read many blogs, websites about CAP theorem. They say that single-node systems are CA, but how can it be "A" if that single node goes down ? Because if it does, the system will be unavailable, right ? And is "availability" in CAP equal to "availability" in HA of distributed systems ?
1. We can build this chain:
One have to pick between C and A only when partitioning is happening. If there is no partitioning at any given time, then both C and A are reachable.
Since a single node system can not be partitioned, then it has to be both C and A.
2. Another option is to take a system and try to put it into a category: CP, AP or CA.
- CP - those system who sacrifice availability when partitioned
- AP - those system who sacrifice consistency when partitioned
- CA - those system who sacrifice partitioning; but there is only one type of systems without partitioning - single node systems!
At the end of the day, this confusion is based on theorem being applied out of context.
Every theorem has a specific context where it can be applied. CAP is applicable for distributed systems, hence it is not applicable to single node system.