DBMS/Cassandra
Cassandra Data replication
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 strate..
Cassandra Partitioners
A partitioner determines how data is distributed across the nodes in the cluster (including replicas) Basically, a partitioners is a function for deriving a token (a representating a row from its partition key, typically by hasing) Each row of data is distiributed across the cluster by the value of the token. Strategies Murmur3Partitioner (default, from v1.2) uniformly distributes data across th..
Cassandra Gossip & seed nodes
Gossip protocol Gossip is a peer-to-peer communication protocol in which nodes periodically exchanges state information about themselves and about other nodes they know about. the gossip process runs every second and exchanges state messages with up to three other nodes in the cluster. Seed nodes list of seed nodes has no purpose other than bootstraping thre gossip process for new nodes joining ..
카산드라 Batch operation
Batch Operation 여러 쿼리들을 배치 처리할 수 있는 오퍼레이션. 해당 Batch Operation을 사용하면 각 오퍼레이션의 대상이 동일한 파티션인 경우 원자성과 격리성을 보장함. (다수의 파티션을 대상으로 하는 경우 원자성만 보장함) 다만 잘못 사용하는 경우, 많은 성능 하락을 유발할 수 있어서 잘 사용해야 함. Logged/UnLogged Batch 단일 파티션을 대상으로 하는 Batch Operation은 Unlogged Batch로도 원자성과 격리성을 보장할 수 있음. 다만 다중 파티션을 대상하는 Batch Operation은 원자성을 보장하기 위해서 Logged Batch를 필요로 함. 다만 다중 파티션을 대상으로 하는 경우 Logged Batch를 사용하더라도 격리성을 보장할 순 ..
[Cassandra] 인증/권한 설정하기
기본적으로 카산드라를 설치하면 인증/권한 설정이 되어 있지 않습니다. 인증/권한 설정을 하기 위한 방법입니다. 부주의로 운영 테이블에 DROP TABLE을 날린다거나... 등의 사고를 방지하기 위해서 인증/권한 설정은 필수입니다. (사람은 (특히 나 자신...) 언제나... 실수를 할 수 있기 때문에, 시스템적으로 사람의 실수를 최대한 막을 수 있어야 한다고 생각합니다 ㅎㅎ) system_auth keyspace에 대한 RF 변경 (무적권 해야함!!!) alter keyspace "system_auth" WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '3'} system_auth에 대한 RF를 변경해줘야 한다 (기본 SimpleStrate..