Coordination systems

For data replication and execution of distributed DDL queries (ON CLUSTER), ADQM requires you to configure and enable one of the coordination services for a cluster:

  • Apache ZooKeeper — well-known open-source service for synchronization and coordination of distributed systems.

    ZooKeeper is implemented in Java and has a simple and powerful data model. The ZAB (ZooKeeper Atomic Broadcast) coordination algorithm used in ZooKeeper provides linearizable writes, but does not guarantee linearizability for reads, since each ZooKeeper node performs reads locally.

  • ClickHouse Keeper — alternative coordination service that provides a ZooKeeper-compatible client-server protocol.

    ClickHouse Keeper is implemented in C++ and has the same data model as ZooKeeper.The used RAFT algorithm provides better consistency guarantees compared to ZooKeeper — optionally allows linearizable reads. ClickHouse Keeper can be used as a standalone replacement for ZooKeeper (when it is installed on separate servers) or as an internal part of a ClickHouse server.

General recommendations for choosing a coordination service depending on system requirements:

  • For test or small clusters, you can use the integrated ClickHouse Keeper installed on the same servers as ClickHouse.

  • For production environments, it is recommended to install ClickHouse Keeper or ZooKeeper on separate servers.

  • If you already have an external ZooKeeper cluster configured, you can use it for an ADQM cluster.

  • Since the format of ClickHouse Keeper snapshots and logs is incompatible with ZooKeeper, you should convert and copy data manually when migrating an ADQM cluster from ZooKeeper to ClickHouse Keeper.

  • The interserver protocol in ClickHouse Keeper is also incompatible with ZooKeeper, so you cannot create a mixed cluster that uses both ZooKeeper and ClickHouse Keeper at the same time.

Found a mistake? Seleсt text and press Ctrl+Enter to report it