ZooKeeper proxy

The ZooKeeper proxy filter decodes the client protocol for Apache ZooKeeper. It decodes the requests, responses and events in the payload. Most opcodes known in ZooKeeper 3.5 are supported. The unsupported ones are related to SASL authentication.


The zookeeper_proxy filter is experimental and is currently under active development. Capabilities will be expanded over time and the configuration structures are likely to change.


The ZooKeeper proxy filter should be chained with the TCP proxy filter as shown in the configuration snippet below:

- filters:
  - name: envoy.filters.network.zookeeper_proxy
      stat_prefix: zookeeper
  - name: envoy.tcp_proxy
      stat_prefix: tcp
      cluster: ...


Every configured ZooKeeper proxy filter has statistics rooted at zookeeper.<stat_prefix>. with the following statistics:

Name Type Description
decoder_error Counter Number of times a message wasn’t decoded
request_bytes Counter Number of bytes in decoded request messages
connect_rq Counter Number of regular connect (non-readonly) requests
connect_readonly_rq Counter Number of connect requests with the readonly flag set
ping_rq Counter Number of ping requests
auth.<type>_rq Counter Number of auth requests for a given type
getdata_rq Counter Number of getdata requests
create_rq Counter Number of create requests
create2_rq Counter Number of create2 requests
setdata_rq Counter Number of setdata requests
getchildren_rq Counter Number of getchildren requests
getchildren2_rq Counter Number of getchildren2 requests
remove_rq Counter Number of delete requests
exists_rq Counter Number of stat requests
getacl_rq Counter Number of getacl requests
setacl_rq Counter Number of setacl requests
sync_rq Counter Number of sync requests
multi_rq Counter Number of multi transaction requests
reconfig_rq Counter Number of reconfig requests
close_rq Counter Number of close requests
setwatches_rq Counter Number of setwatches requests
checkwatches_rq Counter Number of checkwatches requests
removewatches_rq Counter Number of removewatches requests
check_rq Counter Number of check requests

Dynamic Metadata

The ZooKeeper filter emits the following dynamic metadata for each message parsed:

Name Type Description
<path> string The path associated with the request, response or event
<opname> string The opname for the request, response or event
<create_type> string The string representation of the flags applied to the znode
<bytes> string The size of the request message in bytes
<watch> string True if a watch is being set, false otherwise
<version> string The version parameter, if any, given with the request