kubernetes-ingress-controller icon indicating copy to clipboard operation
kubernetes-ingress-controller copied to clipboard

Be able to set idle_timeout in KongIngress CRD

Open YanshuoH opened this issue 10 months ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Problem Statement

Currently we've tested Kong gRPC proxy, but it occurs to us that there is no way to set idle_timeout in KongIngress.

For example, using a gRPC Stream will create a long-lived TCP connection, yet such connection may not have any data to transmit.

By default, Kong has an idle_timeout of 60s, with the following conditions:

  • no action in TCP connection
  • keepalive interval is greater than 60s

we've encountered rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: PROTOCOL_ERROR error on client side.

With a lower keepalive interval (< 60s), the above error still occurs.

Such probolem can be by-passed with a client side reconnect mechanism, but it would be better if we can configure it.

Proposed Solution

Provide the possibility to configure idle_timeout in KongIngress CRD like read_timeout / write_timeout etc.

Additional information

Kong Mesh has such feature to set tcp.idleTimeout and http.idleTimeout. I haven't researched Kong's API/code, but it may be possible to implement in KIC.

FYI: https://docs.konghq.com/mesh/latest/policies/timeout/

Acceptance Criteria

No response

YanshuoH avatar Sep 27 '23 05:09 YanshuoH