Distributed Systems explained (with NodeJS)
summary
Code walks a key-value store in NodeJS demos across a four-node cluster and shows concrete failure modes: CA via two‑phase commit blocks writes when one node is down, AP uses sloppy quorums with timestamps plus anti‑entropy repairs to tolerate partitions, and CP uses raft leader election and majority commits to preserve consistency. Demos use iptables to simulate partitions and kill processes; numbers include four replicas and quorum thresholds, and a practical tip to set Cassandra read/write quorums to 2.
AI-written summary · about
