QA
Senior LevelSystem Design & Architecture

Compare Read Repair versus Active Anti-Entropy (Merkle Trees) in Cassandra.

❓ Interview Prompt: Compare Read Repair (syncing stale replicas on read) vs Active Anti-Entropy (background Merkle Tree comparison) in Cassandra.

Differentiating data consistency repair mechanisms in distributed databases (Cassandra):

β€’
Read Repair: When a client executes a read query, the database compares row digests across replicas. If a replica is stale, a background Read Repair task writes the latest data to the stale replica.
β€’
Active Anti-Entropy (AAE): Background process that builds Merkle Trees (cryptographic hash trees) for data ranges and compares them between nodes to detect and repair out-of-sync replicas without scanning raw data!

Code Implementation Example

json
{
  "repairMechanism": "Active Anti-Entropy (AAE)",
  "dataStructure": "Merkle Tree (Cryptographic Hash Tree)",
  "execution": "Background N-to-N Node Sync",
  "advantage": "Detects data drift without scanning raw disk records"
}
πŸ’‘Active Anti-Entropy Merkle Tree repair specification payload.
🎯 Interview Key Takeaway

Use Read Repair for opportunistic inline syncs, and Active Anti-Entropy Merkle Trees for background data drift repair.

#System Design#Read Repair#Anti-Entropy#Cassandra#Senior
Back to all System Design & Architecture Questions→

More System Design & Architecture Interview Questions

Beginner LevelSystem Design & Architecture

Explain the CAP Theorem and PACELC Theorem with real-world database examples.

Beginner LevelSystem Design & Architecture

What is Vertical Scaling (Scale Up) vs Horizontal Scaling (Scale Out)?

Beginner LevelSystem Design & Architecture

How do Load Balancers distribute traffic (Round Robin, Least Connections, IP Hash)?