Conversation
This filter decodes the ZooKeeper wire protocol and emits stats & metadata about requests, responses and events. This wire protocol parsing is based on: https://github.com/twitter/zktraffic https://github.com/rgs1/zktraffic-cpp The actual filter structure is based on the Mysql proxy filter. Signed-off-by: Raul Gutierrez Segales <[email protected]>
|
Note: this is not finished yet, but early comments are welcomed :-) |
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
source/extensions/filters/network/zookeeper_proxy/zookeeper_filter.cc
Outdated
Show resolved
Hide resolved
snowp
left a comment
There was a problem hiding this comment.
Left you a few comments to get you started.
Has the maintainer sponsorship story for this extension been figured out as per https://docs.google.com/document/d/1eDQQSxqx2khTXfa2vVm4vqkyRwXYkPzZCcbjxJ2_AvA/edit ?
source/extensions/filters/network/zookeeper_proxy/zookeeper_decoder.cc
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_decoder.cc
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_decoder.h
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_decoder.h
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_utils.cc
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_utils.cc
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_utils.cc
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_utils.cc
Outdated
Show resolved
Hide resolved
test/extensions/filters/network/zookeeper_proxy/zookeeper_filter_test.cc
Outdated
Show resolved
Hide resolved
|
@snowp thanks for the comments! I'll address them right away. Whereas wrt to a senior maintaner sponsoring this, I was thinking maybe @mattklein123 or @zuercher :-) |
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Oops, my bad — I am somehow misread that I needed a senior maintainer... @snowp if you have some cycles for sponsoring, that would be great :-) |
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
docs/root/configuration/network_filters/zookeeper_proxy_filter.rst
Outdated
Show resolved
Hide resolved
docs/root/configuration/network_filters/zookeeper_proxy_filter.rst
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_decoder.cc
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_decoder.h
Outdated
Show resolved
Hide resolved
test/extensions/filters/network/zookeeper_proxy/zookeeper_filter_test.cc
Outdated
Show resolved
Hide resolved
source/extensions/filters/network/zookeeper_proxy/zookeeper_filter.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Also, rename the Opcodes enum for consistency. Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
snowp
left a comment
There was a problem hiding this comment.
Still missing some coverage on the create flags, otherwise I think this looks good
added. |
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
This is valid in the client protocol, so lets handle that. Also, this improves coverage for peekString(), since it tests the branch for zero-length strings. Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
* the try/catch block was redundant (happens in the decoder already) * move clear dynamic metadata into its own method Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
Signed-off-by: Raul Gutierrez Segales <[email protected]>
snowp
left a comment
There was a problem hiding this comment.
Just some minor comments, otherwise LGTM
source/extensions/filters/network/zookeeper_proxy/zookeeper_utils.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: Raul Gutierrez Segales <[email protected]>
snowp
left a comment
There was a problem hiding this comment.
Ok this looks good to me as a starting point to iterate on in further PRs.
Any @envoyproxy/senior-maintainers able to take a look at this?
alyssawilk
left a comment
There was a problem hiding this comment.
"LGTM" for source/common/common/enum_to_int.h pending the one nit :-)
Signed-off-by: Raul Gutierrez Segales <[email protected]>
|
/retest |
|
🙀 failed invoking rebuild of |
|
@rgs1 I have a question about this work. The two references are pcap interceptors, this change is an L7 proxy for zookeeper traffic? |
Correct -- it's L7 but it's also passive. It understands the ZK protocol, but just to emit stats and generate logging. It won't create its own clients or keep sessions on behalf of clients. |
|
@rgs1 but in order to use this filter, you now have:
|
True. That would be true as well if you were using a network load balancer of any sort (e.g.: an NLB in Amazon). |
This filter decodes the ZooKeeper wire protocol and emits
stats & metadata about requests. Responses and events
will be supported in a follow-up PR.
This wire protocol parsing is based on:
https://github.com/twitter/zktraffic
https://github.com/rgs1/zktraffic-cpp
The actual filter structure is based on the Mysql proxy filter.
Signed-off-by: Raul Gutierrez Segales [email protected]