icerpc / icerpc-csharp

A C# RPC framework built for QUIC, with bidirectional streaming, first-class async/await, and Protobuf support.
https://docs.icerpc.dev
Apache License 2.0
101 stars 13 forks source link

Missing Quic keep alive option to enable keep alive #3353

Closed bentoi closed 3 months ago

bentoi commented 1 year ago

There's no option to enable keep alive on a Quic connection. As a consequence the Quic connection might idle timeout if there's no activity and even if an icerpc request is pending. This is quite bad IMO.

Should we consider adding a workaround to keep alive the Quic connection? One option would be to open an unidirectional stream to send a byte regularly (implemented in the Quic transport).

See also https://github.com/dotnet/runtime/issues/87478. Hopefully this will motivate the Quic developers for adding this option.

bernardnormier commented 10 months ago

See also: https://github.com/microsoft/msquic/issues/3880

bentoi commented 8 months ago

FYI, they added KeepAliveInterval which I believe can be used for this purpose: https://github.com/dotnet/runtime/pull/94211

bernardnormier commented 7 months ago

Let's update the code conditionally (and add a test) once dotnet 9 preview 1 is out.