grpc / grpc-node

gRPC for Node.js
https://grpc.io
Apache License 2.0
4.45k stars 645 forks source link

How to capture gRPC keep alives with tcpdump? #2751

Open josecazarin opened 4 months ago

josecazarin commented 4 months ago

Hello!

I've tried all the possible combinations of filters in tcpdump for later inspection to try to capture gRPC keep alive probes, but I can never see them in Wireshark. So I don't know if the changes I'm making to my Go code are actually taking effect. Does anyone have an ideia on how to configure tcpdump to capture keep alive probes?

I'm trying to capture those probes in different services running on the same host, so I'm basically using gRPC as a local IPC mechanism.

Thank you so much!

murgatroid99 commented 4 months ago

gRPC keepalives are implemented as HTTP2 pings. You should see those in the tcpdump output if you interpret the traffic as HTTP2.

davidfiala commented 4 months ago

If for any reason you think you are missing keepalives that should be there, please let me know how you have your server/client setup, library versions, etc in https://github.com/grpc/grpc-node/issues/2734 --- if you think your keepalives are working and you just want to inspect traffic, then please ignore my noise. :)