grpc / grpc-kotlin

Kotlin gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/kotlin
Apache License 2.0
1.2k stars 165 forks source link

Where can we find/configure the keep alive server-side settings? #331

Open liamcassidy-eb opened 2 years ago

liamcassidy-eb commented 2 years ago

Hello,

We've been encountering issues with connections getting closed. Eric Anderson recommended adjusting keep-alive settings on the server and client (here). However, when I went to configure these settings, I couldn't find any documentation on it or examples on the grpc kotlin side. Could you help point me to how we can configure the server-side options mentioned in the keep alive docs?

I'm adding some more background below in case it's helpful:

Extra context from our grpc gitter thread (If you need to see our convo in gitter you can find it here: https://gitter.im/grpc/grpc?at=622f8603f43b6d783fff8ad2)

Problem statement:

We are noticing issues where our grpc client hangs on making a unary request to our grpc server (Ultimately timing out due to our client timeout of 70ms). We believe it’s an issue with the connection or channel (e.g. the request getting queued but not sent, but we are unsure how to prove this using the grpc debug logs. Any assistance on troubleshooting strategy here is much appreciated!

Client/Service Context:

Client:

Python 3 grpc client running within a container managed by nomad

Channel setup:

Each running process of the python app maintains a channel that is reused by the client. The channel is only reset if we encounter an unknown exception The channel is set up with a round-robin load balancing policy

Service:

A Kotlin grpc server running within aws ECS and fronted by an aws ALB set up to load balance to target groups with a protocol version of GRPC

liamcassidy-eb commented 2 years ago

Hello it sounds like the Java api has been updated to support keepalive options. Has the Kotlin API been updated?