DBMS/Cassandra

Cassandra Data replication

seungh0 2023. 3. 3. 07:51
반응형
  • Cassandra stores replicas on multiple nodes to ensure reliability and fault tolerance.
  • A replication strategy determines the nodes where replicas are placed.
    • total number of replicas across the cluster is referred to as the replication factor.
      • RF 1 → only one copy of each row in the cluster. (one node)
  • All replicas are equally important (there is no primary and master replica)

 

Replication strategy

  • SimpleStrategy
    • Use only for a single datacenter and one rack.
  • NetworkTopologyStrategy (Recommended)
    • use when you have your cluster deployed across multiple datacenters.
    • this strategy specified how many replicas you want in each datacenter.
    • how many replicas to configure in each datacneter?
      • two primary considerations
        • being able to satisfy read locally, without incurring cross data-center latency
        • failure scenarios.
      • Two replicas in each datacenter
        • this configuration tolerates the failure of a single node per replication group and still allows local read at a consistency level of ONE.
      • Three replicas in each datacenter
        • this configuration tolerates either the failure of one node per replication group at a strong consistency level of LOCAL_QUORUM or multiple node failure per datacenter using consistency level ONE.
반응형