Skip to content

Apache ZooKeeper Mastery: From ZAB Consensus to Coordination Internals

10-Phase Distributed Coordination & Consensus Architecture Curriculum

Target Audience: Principal Distributed Systems Architect, Database Reliability Engineer, Staff Java Systems Engineer
Depth: Cellular Anatomy, ZAB (ZooKeeper Atomic Broadcast) Protocol, Fast Leader Election, In-Memory DataTree, One-Time Watches, Apache Curator Recipes, KRaft Paradigm Shift


Curriculum Syllabus & Study Roadmap

Phase Module Title File Link Focus Areas
Phase 1 Architecture, ZAB Consensus & Foundations phase_01_architecture_zab_consensus_foundations.md Yahoo! Research origin (2007), Google Chubby comparison, Leader/Follower/Observer peer roles, ZAB protocol (Discovery, Sync, Broadcast), zxid 64-bit layout
Phase 2 Hierarchical DataTree, Znodes & Ephemerals phase_02_hierarchical_data_tree_znodes_ephemerals.md In-memory DataTree & DataNode Java structs, Persistent vs Ephemeral znodes, Sequential counters, Container & TTL znodes, Session timeout heartbeat bounds
Phase 3 Watch Mechanisms & Event Dispatching phase_03_watch_mechanisms_event_dispatching.md One-time watch semantics, WatchManager hash maps, Watch event serialization over NIO, Client watch re-registration, Persistent Recursive Watches (v3.6+)
Phase 4 Storage Engine: TxnLog, Snapshots & Disk Sync phase_04_storage_txnlog_snapshots_wal_internals.md Write-ahead transaction log (log.*), File pre-allocation (64MB), Fuzzy Snapshots (snapshot.*), autopurge daemon, Crash recovery replay
Phase 5 Leader Election, Epochs & Peer Lifecycle phase_05_leader_election_quorum_peer_lifecycle.md Fast Leader Election (FLE), Vote comparison rules (epoch, zxid, myid), Quorum peer states (LOOKING, FOLLOWING, LEADING, OBSERVING), Split-brain prevention
Phase 6 Distributed Primitives & Apache Curator Recipes phase_06_distributed_primitives_curator_recipes.md Distributed Locks (InterProcessMutex), Herd Effect avoidance, Leader Election recipe, Distributed Semaphores, Double Barriers
Phase 7 Security, ACLs, SASL/Kerberos & TLS phase_07_security_acls_sasl_kerberos_tls.md Multi-scheme ACLs (world, auth, digest, ip), SASL/Kerberos authentication, Netty-based TLS client & quorum encryption, Four-letter words auditing
Phase 8 Hardware, JVM, OS Kernel Tuning & Quorum Sizing phase_08_hardware_jvm_os_kernel_tuning.md Odd quorum sizing (\(2F+1\)), Dedicated NVMe disk isolation for TxnLog, Swapping mitigation (vm.swappiness=1), JVM G1GC pause bounds, syncLimit tuning
Phase 9 Real-World Choke Points & Telemetry phase_09_real_world_choke_points_watch_storms.md Watch Storms, Large znode payloads (>1MB), High connection churn, Snapshot latency spikes, Four-Letter words (mntr, stat, cons), Prometheus metrics
Phase 10 The Sandbox Destruction Labs phase_10_destruction_labs_playbook.md Lab 1: Herd effect lock stampede, Lab 2: Watch storm network saturation, Lab 3: TxnLog disk I/O stall & quorum drop, Lab 4: Leader kill & epoch failover

Companion Deep Dives & Revision Artifacts