Digression that might be interesting for the HN crowd: The healthcheck for Apache ZooKeeper is simply sending it `ruok` and receiving `imok` if it's healthy:
$ echo ruok | nc 127.0.0.1 5111
imok $ echo ruok | nc 127.0.0.1 5111
imok