Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEP: Timeouts #1742

Open
youngnick opened this issue Feb 20, 2023 · 16 comments
Open

GEP: Timeouts #1742

youngnick opened this issue Feb 20, 2023 · 16 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@youngnick
Copy link
Contributor

What would you like to be added:

Gateway API needs whatever support we can do for timeouts. This GEP is to consider what timeouts are available, find some common ground, and then to implement that common ground somehow. (Very likely a Policy object, but not certain).

Why this is needed:
Timeouts are a critical part of any proxy infrastructure, and since many Gateway implementations use a proxy, they're important here as well.

@youngnick youngnick added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 20, 2023
@youngnick youngnick self-assigned this Feb 20, 2023
@youngnick
Copy link
Contributor Author

The first step here is a preliminary GEP PR that talks about the Why and What we need to do; in this case this includes a review of all the implementations, what dataplanes they use, and what information we have about the data plane's timeout capabilities. That should set us up for what we can do, which can then help us define what we will do.

I've already done the comparison, and am in the process of writing this PR up.

@shaneutt
Copy link
Member

shaneutt commented Mar 8, 2023

@arkodg provided several details relevant to this in #1741 which we should reference while working here.

@candita
Copy link
Contributor

candita commented Mar 15, 2023

@youngnick
Would like to request discussion of:

  • tunnel timeouts (for websocket connections, maybe the same use case as @liangyuanpeng mentioned above
  • server-side connection timeouts

@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 13, 2023
@youngnick
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 14, 2023
@shaneutt shaneutt removed the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Aug 22, 2023
@youngnick youngnick moved this from Proposed to Experimental in Gateway API Enhancement Proposals (GEPs) Sep 14, 2023
@youngnick youngnick removed their assignment Sep 14, 2023
@shaneutt shaneutt removed this from the v1.0.0 milestone Sep 27, 2023
@rainest
Copy link
Contributor

rainest commented Nov 14, 2023

With https://gateway-api.sigs.k8s.io/geps/gep-1742/#timeout-values and #2013 there's no option that NGINX-based implementations would support, correct? I don't know of any that add timeout behaviors other than the idle/time between individual reads behavior offered by ngx_http_proxy_module (https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/balancer.md#set_timeouts just configures those for the lua-nginx-module-based implementations).

Would a TTFB timeout or idle timeout make sense as an alternative? Idle appears to have the widest support, as it's available in Envoy (idle_timeout), NGINX (proxy_read_timeout), and HAProxy (timeout server). Traefik does have idleConnTimeout, but I don't read that as applying within a request, only after for open inactive connections similar to NGINX's keepalive_timeout.

Idle timeout de facto satisfies TTFB (inclusive of headers) insofar as a connection not receiving response headers is idle after the client headers and body are sent, albeit with caveats after that a pure idle timeout can time out after headers are received also. Traefik does support a headers-only timeout (forwardingTimeouts.responseHeaderTimeout) for that.

IDK how we'd eventually structure the config, but I'd also expect idle to be the main option for L4 routes, since we don't really have much universal there besides time between packets.

Lastly, despite the

A standard API for every possible timeout that implementations may support.

non-goal, I think it'd make sense to have an ImplementationSpecific option that lets you specify a Duration and string identifier. That's maybe less a standard API for each and more an acknowledgement that we know the timeout options across implementations are quite varied and that we'll probably never have standard APIs for all. However, reviewing the offerings does indicate that most could be handled with a basic duration+identifier combo--I don't see any that clearly use more complex configuration.

Although the extensionRef HTTPRouteFilter is available as an alternative at the HTTPRouteRule level, having timeouts split across two sections depending on whether they're standard or not feels bad at a UX level.

@tao12345666333
Copy link
Member

According to GEP-713, perhaps we can try adding a TimeoutPolicy and redefining some specific behaviors?

@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 4, 2024
@kflynn
Copy link
Contributor

kflynn commented Mar 4, 2024

Not stale...

@kflynn
Copy link
Contributor

kflynn commented Mar 4, 2024

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 4, 2024
@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 2, 2024
@kflynn
Copy link
Contributor

kflynn commented Jun 2, 2024

I think we’re going to make this a goal for v1.2…

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 2, 2024
@k8s-triage-robot
Copy link

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-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 31, 2024
@kflynn
Copy link
Contributor

kflynn commented Sep 1, 2024

Definitely not stale. 😂

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 1, 2024
@shaneutt shaneutt moved this to In Progress in Gateway API Pipeline Sep 18, 2024
@shaneutt
Copy link
Member

/lifecycle frozen
/priority important-soon

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Sep 18, 2024
@kflynn kflynn moved this from Experimental to Standard in Gateway API Enhancement Proposals (GEPs) Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
Status: In Progress
Development

No branches or pull requests

8 participants