Why are RDBMS considered Available (CA) for CAP Theorem

前端 未结 3 1853
逝去的感伤
逝去的感伤 2021-01-01 20:18

If I understand the CAP Theorem correctly, availability means that the cluster continues to operate even if a node goes down.

I\'ve seen a lot of people (http://blo

3条回答
  •  粉色の甜心
    2021-01-01 21:05

    First of all, let me clarify and state that the consistency in RDBMS is different than consistency in distributed systems. RDBMS (single system) applies consistency to transactional consistency, where as in distributed systems consistency means view from anywhere in the system (read from any node) is consistent. So RDMBS single node cannot be discussed with regards to CAP theorem. It is like comparing apple to orange.

    RDBMS with master-slave can be compared to distributed systems. Here RDBMS can be configured to CA/CP or AP. MySQL for example, provides a way to configure the system in a way that if there is a quorum loss (not enough secondary available for commit log replication), the cluster is not available (CP system). MySQL also provides a configuration to allow the cluster to operate as long as master is available (CA system) with the potential of data loss. SQL Server AlwaysOn is an AP system, because commit log replication is asynchronous (even on sync replicas).

    So RDBMS can be any of CA, CP or AP in a distributed world.

提交回复
热议问题