Apache Cassandra Developer Associate study materials
Apache Cassandra Developer Associate study resources

Apache Cassandra Developer Associate: Cassandra Architecture and Data Distribution

Apache Cassandra Developer Associate · Work through your exam, one topic at a time.

All guide sections

Cassandra Architecture and Data Distribution

This domain tests how Cassandra places data, replicates it, and coordinates reads and writes. Expect questions on token ownership, virtual nodes, replication factor, consistency levels, gossip, snitches, hinted handoff, and repair. The exam rewards knowing which component makes each decision.

Ring, tokens, and vnodes

Cassandra maps each partition key to a token with the partitioner (Murmur3Partitioner by default). Each node owns token ranges. Virtual nodes (vnodes), configured by num_tokens, give each node many small ranges, improving rebalancing and streaming granularity. The ring is logical: nodes do not form a literal circle, and the coordinator for a request is simply the node the client contacts.

Replication and consistency

Keyspaces define replication per data center. A replication factor (RF) of 3 means three replicas per partition in that DC. Consistency levels count replica responses, not nodes in the cluster. QUORUM is floor(RF/2)+1 within the relevant DC; LOCAL_QUORUM uses only the client's DC. Writes go to all reachable replicas; if a replica is down, hinted handoff can store a hint and replay it later. Hinted handoff is not a substitute for repair: repair reconciles missed writes and divergent replicas.

Worked example

A keyspace has RF=3 in DC1 and RF=3 in DC2. A client in DC1 writes at LOCAL_QUORUM, so it needs two acknowledgements from DC1 replicas. If one DC1 replica is down, the coordinator can still satisfy the write with the other two and record a hint. A read at LOCAL_QUORUM then contacts enough DC1 replicas to get two responses; if the down replica has not received the hint yet, repair or read repair eventually reconciles it. Using QUORUM instead would count replicas across both DCs and can succeed without local quorum, which is usually not the desired latency or failure semantics.

Traps

Do not confuse RF with the number of nodes: RF can exceed or be less than node count, though RF greater than node count reduces redundancy. Do not assume the coordinator is a replica. Do not apply a global QUORUM across DCs when LOCAL_QUORUM is intended. Vnodes change ownership granularity, not the replication factor.