Web / Apache Solr Interview questions
How does ZooKeeper coordinate a SolrCloud cluster?
ZooKeeper acts as the single source of truth for a SolrCloud cluster's metadata, using a hierarchy of znodes that every node watches for changes.
- /live_nodes - ephemeral znodes listing which Solr nodes are currently up; removed automatically if a node disconnects.
- /collections/<name>/state.json - shard and replica layout, including which replica is the leader for each shard.
- /configs - shared config sets (schema, solrconfig) that collections reference.
- Overseer - a designated node that processes cluster-state changes like collection creation, sequentially.
Because these znodes are watched, changes propagate quickly: if a node crashes, its ephemeral /live_nodes entry disappears, triggering leader election for any shard it was leading, without any manual intervention.
More Related questions...