A ZooKeeper Observer that can follow multiple leaders

Imagine that you could have mount points in ZooKeeper. In your config you would associate a cluster config with a mount-point perhaps doing something like:

1
2
3
4
5
cluster1 = 10.0.1.1:2889:3889;10.0.1.2:2889:3889;10.0.1.3:2889:3889
cluster2 = 10.0.2.4:2889:3889;10.0.2.5:2889:3889;10.0.2.6:2889:3889

cluster1:/configs /cluster1/configs  # follows cluster 1
cluster2:/configs /cluster2/configs  # ditto for cluster 2

This would allow to effectively parallelize ZAB operations, which by definition are only linear. Of course, it means breaking ZooKeeper semantics across different paths in /. Though, in practice, it's unlikely that your apps need full semantics across all of the / namespace, anyway. Then, these operations would be close to parallel (i.e.: you stil serialize within your session):

1
2
3
zk = ZkClient.new(:cluster => "localhost:2181")
zk.create("/cluster1/configs/myconfig", json_blob)
zk.create("/cluster2/configs/myconfig", json_blob)

This could be a huge improvement for multi-tenant ZooKeeper setups, which could still share the costs of Observers.

pcap-ng support in Linux

Turns out that Apple already supports pcap-ng. The full RFC for pcap-ng is here. libpcap, actually does have some support for it but the most interesting bits (i.e.: process event blocks) are still missing. pcap is very useful to understand what's going on in your network, so pcap-ng support would indeed be great.