I was reading about CAP Theorem and got confused. For CA I took Oracle as an example. Consistency: Oracle is consistent since we don't have multiple nodes and agreed. Availability: How come it is highly available because it has only one node and what if it gets crashed?
2 Answers
Oracle has Real Application Cluster (RAC) technology that helps keep it highly available on multiple nodes (servers). I am not sure of the limit of servers in RAC cluster, but you can many (2, 3, 5, 8, etc). If the DBA designs things correctly, they can assign more than one node for an application service (either active-active or active-passive). If a node becomes un-available, planned or unplanned, the service will either fail over (active passive) or continue to operate (active-active) on other nodes. Oracle also has very sophisticated technology to continue read activity and even write activity if a node becomes unavailable. If designed correctly, the user wouldn't even know the node was unavailable in some cases. The "sticking-point" of RAC is the storage. Oracle RAC uses shared storage. If the storage has an issue, then all nodes in the RAC cluster are affected. It is not distributed like Cassandra. Hardware has many features to protect against storage issues (e.g. RAID). However, the bottom line is if, for whatever reason, the storage is affected, RAC can also be affected with it. Oracle does offer sharding, which is their answer to distributed systems, but it isn't quite as elegant. Without that, you don't have the distributed portion (partitioning) that other distributed systems have.
All that being said, hopefully that answers your question about about Oracle's high availability.
-Jim

- 1,974
- 1
- 9
- 19
If a single-node cluster crashes you do not have a cluster anymore - does it still make sense to reason about CAP theorem?
I believe it only makes sense when you have at least one node and partitions do occur. Having multiple nodes, one receives a message but it is unable to reach the rest of the cluster, what can it do? It can: 1) reply and become A but not C; 2) not reply and become C but not A.
If you have only one node there is no "rest of the cluster" to reach, hence you are both C and A - you are not P because you "solved" the problem by avoiding the partition instead of tolerating it.
See this answer for more examples.

- 6,102
- 5
- 41
- 76