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.

Attention

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.

Configuration

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

  1. filter_chains:
  2. - filters:
  3. - name: envoy.filters.network.zookeeper_proxy
  4. config:
  5. stat_prefix: zookeeper
  6. - name: envoy.tcp_proxy
  7. config:
  8. stat_prefix: tcp
  9. cluster: ...

Statistics

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

NameTypeDescription
decoder_errorCounterNumber of times a message wasn’t decoded
request_bytesCounterNumber of bytes in decoded request messages
connect_rqCounterNumber of regular connect (non-readonly) requests
connect_readonly_rqCounterNumber of connect requests with the readonly flag set
ping_rqCounterNumber of ping requests
auth.<type>_rqCounterNumber of auth requests for a given type
getdata_rqCounterNumber of getdata requests
create_rqCounterNumber of create requests
create2_rqCounterNumber of create2 requests
setdata_rqCounterNumber of setdata requests
getchildren_rqCounterNumber of getchildren requests
getchildren2_rqCounterNumber of getchildren2 requests
remove_rqCounterNumber of delete requests
exists_rqCounterNumber of stat requests
getacl_rqCounterNumber of getacl requests
setacl_rqCounterNumber of setacl requests
sync_rqCounterNumber of sync requests
multi_rqCounterNumber of multi transaction requests
reconfig_rqCounterNumber of reconfig requests
close_rqCounterNumber of close requests
setwatches_rqCounterNumber of setwatches requests
checkwatches_rqCounterNumber of checkwatches requests
removewatches_rqCounterNumber of removewatches requests
check_rqCounterNumber of check requests

Dynamic Metadata

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

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