
This is a playground to help you play with ClickHouse Keeper, which is an alternative to Apache ZooKeeper
ClickHouse Keeper is written in C++. It's open-source coordination that scales
The ClickHouse Keeper Servers are already running in cluster mode - with 3 nodes, where one is a leader and the other two are followers
To interact with the ClickHouse Keeper Server, you can use the ClickHouse Keeper Client (clickhouse-keeper-client) like this
clickhouse-keeper-client
For help, type help in the client console
Some more things you can do - for example you check if the server is up and running -
# Health Check - ("Are you OK?")
echo ruok | nc -v localhost 9181; echo
# Detailed server stats
echo stat | nc -v localhost 9181; echo
# Server information
echo srvr | nc -v localhost 9181; echo
# Monitoring metrics. `mntr` stands for Monitor
echo mntr | nc -v localhost 9181; echo
# Client connections
echo cons | nc -v localhost 9181; echo
# Active configuration
echo conf | nc -v localhost 9181; echo
# Disk usage information
echo dirs | nc -v localhost 9181; echo
# Is server read-only?
echo isro | nc -v localhost 9181; echo
The ClickHouse Keeper Server is being run as a systemd service. To check more, check
systemctl status clickhouse-keeper.service
cat /usr/lib/systemd/system/clickhouse-keeper.service
To see the all the files related to the ClickHouse Keeper, check here:
sudo ls -al /var/lib/clickhouse-keeper/
sudo ls -al /var/run/clickhouse-keeper/
sudo ls -al /var/log/clickhouse-keeper/
sudo ls -al /etc/clickhouse-keeper/
More details about ClickHouse Keeper is below. The details are from the official website
ClickHouse Keeper solves the well-known drawbacks of ZooKeeper and makes many additional improvements.
Coordination without the drawbacks. In order to overcome some shortcomings of ZooKeeper, we (ClickHouse team) started building a ClickHouse native Keeper from scratch based on our own requirements, optimized for usage in ClickHouse.
Benefits?
Is ClickHouse Keeper a replacement for ZooKeeper? ClickHouse Keeper is a drop-in replacement for ZooKeeper written in C++, with a fully compatible client protocol and the same data model, and features these improvements
When to use ClickHouse Keeper?
When NOT to use ClickHouse Keeper?
Keep your system afloat with RAFT!
ZooKeeper implementation: ZooKeeper is implemented in Java and its coordination algorithm, ZooKeeper Atomic Broadcast (ZAB), doesn't provide linearizability guarantees for reads.
ClickHouse Keeper implementation: Unlike ZooKeeper, ClickHouse Keeper is written in C++ and uses the RAFT algorithm implementation. This algorithm allows linearizability for reads and writes, and has several open-source implementations in different languages.
References: