-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RevisionSpec.Timeout has deviated from the original specification #12634
Comments
/assign @dprotaso |
It feels like "time to first response byte" is a valid but niche use case. Rather than introducing a flag to change the meaning of Thinking about it, it seems like the main use case for |
(I don't like It still seems useful to be able to specify a first but and max stream duration at the Revision level, to enable safe lame-duck operation and bound times for proxy-level drain and restart without complicated TCP handoffs. |
I had not. Though now I wonder if adding support for idleTimeout (#10852) would cover the niche case of first byte timeout |
It is confusing inded. IMHO Should we capture this in a design doc and describe how previous cases can be handled with the "new" design? |
@dprotaso enable it to be taken into account by the timeout handler? what happens if its disabled, the behaviour uses the MaxDuration only and ignore first byte response? |
I'm also wondering about the plan -- do we mean a feature flag that makes |
so here is my proposal: Based on the user choice, the timeout handler would use the FirstByte or MaxDuration. and I think since the MaxDuration seems to be the more common use case, we can make it the default, but at the same time allow the user to choose FirstByte if needed. This new behaviour can start behind a feature gate for a release or two, then be on by default. We can allow the user to choose using an annotation on the revision? |
Circling back - our timeout to first byte logic is currently broken for web sockets. When using web sockets the connection will remain open for user reported issue: https://knative.slack.com/archives/CA9RHBGJX/p1645566907713149 This simplifies the original plan since the earlier concern we had was about breaking compatibility with long running web sockets connections isn't an issue. Thus all I think we need to do is:
I think this would be covered as a new property - |
Nader is going to drive this for the 1.6 release /assign @nader-ziada |
With #11980 we should now be able to make the necessary changes for 1.7 |
/area API
I dropped the ball regarding how we handled
RevisionSpec.Timeout
in the OSS implementation. We deviated from what was originally in the spec and opt'd to change the spec (#10806) rather than fix the behaviour.We prioritized backwards compatibility over remaining conformant.
In hindsight this was a mistake since:
Timeout
andMaxDuration
being so similar is confusing and bad UX for end-usersNew plan is here: #12634 (comment)
I think the best path forward here is:Drop MaxDurationSeconds from the RevisionSpec #12635Yes this is poor form but it's only been out for two weeks in the latest release at the time of writing and hasn't been documentedcreate a feature flag that enables the first byte timeout logic (on by default)notify users about this default and be explicit they should set it for compatibilityafter N releases we swap the default to be conformant to the spec's original intentionFor those who opt into the first-byte timeout we provide a maxDuration annotation so they still have that abilityAllow a per-revision override via annotations so existing revisions can work independently of the operator settingsThe text was updated successfully, but these errors were encountered: