gateway-api icon indicating copy to clipboard operation
gateway-api copied to clipboard

Support Request Timeouts for GRPCRoute

Open arkodg opened this issue 1 year ago • 3 comments
trafficstars

What would you like to be added:

A request.Timeout field within GRPCRoute similar to the one added in HTTPRoute as part of https://gateway-api.sigs.k8s.io/geps/gep-1742/

Why this is needed:

  1. Set a request timeout for unary rpc, that may vary from the default timeout of the implementation
  2. Disable timeouts (set to 0s) for streaming rpc

arkodg avatar Jun 07 '24 23:06 arkodg

cc @robscott @frankbu @gnossen

arkodg avatar Jun 07 '24 23:06 arkodg

Good call @arkodg! I think this one should be relatively straightforward, but because it's a new API field in a GA resource, we'll likely need to track it with a separate GEP. Do you mind adding this to https://github.com/kubernetes-sigs/gateway-api/discussions/3103 if you think you'd have time to lead this in v1.2?

robscott avatar Jun 08 '24 00:06 robscott

sure @robscott done

arkodg avatar Jun 08 '24 00:06 arkodg

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 09 '24 22:09 k8s-triage-robot

This is still in progress, and may be in scope for 1.3.

/remove-lifecycle stale

youngnick avatar Sep 11 '24 04:09 youngnick

What does the roadmap look like for this item, seems like it was removed from the plan for 1.3?

Not having this makes 'this implementation supports GRPCRoutes' type proclamations misleading, since the actual behavior on timeouts can make long gRPC streams completely unusable. Implementations can offer various workarounds but in the end IMO this should just be a part of the CRD since the functionality is so commonly needed with GRPC too.

Antvirf avatar Apr 19 '25 08:04 Antvirf

what status about this issue?

csh0101 avatar Jul 18 '25 06:07 csh0101

For others who come across this issue, I was able to work around the lack of this for now when using Envoy gateway by using a BackendTrafficPolicy

---
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
  name: mgmt-timeouts
spec:
  targetRefs:
    - group: 'gateway.networking.k8s.io'
      kind: GRPCRoute
      name: mgmt
  timeout:
    http:
      requestTimeout: 0s
      connectionIdleTimeout: 3600s
  tcpKeepalive:
    idleTime: 30s
    interval: 30s
    probes: 5

cclloyd avatar Nov 06 '25 23:11 cclloyd