You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support GRPC and HTTP2 without explicit port labeling #4283
However, the Runtime Contract states that the platform will perform automatic detection between HTTP/1.1, QUIC, and HTTP/2.
Unless overridden by setting the name field on the inbound port, the platform will perform automatic detection as described above.
Developers SHOULD prefer to use automatic content negotiation where available
I suggest the update to the contract as we do not have line of sight to implementing this as it has strong dependencies on features in Envoy and Istio which AFAIK are not being worked on. Some background on how we landed this without automatic upgrade can be seen in this comment: #2539 (comment).
Please do not close this issue by changing the runtime contract, this should be considered as a bug for Knative, even if fixing it will be hard due to Knative's use of Istio.
As a developer, I should not have to opt-into using HTTP2 to use HTTP2.
Having the explicit choice for what protocol your app supports feels like a feature. This can help to catch errors in expectations that have performance implications in the differences between HTTP/1 and HTTP/2.
While the automatic detection could be a useful default, given the underlying dependencies in our stack cannot support those requirements. It's unclear Knative can even support this without significant work in Envoy and Istio.
Changing the runtime contract and aligning the expectations in the contract with what we can deliver feels like the right decision. We can re-evaluate that decision in the future if/when Envoy improves this experience.
I commented this somewhere else, but pasting here and elaborating.
Our support today looks like:
(empty): HTTP/1.1 only
"h2c": HTTP/2 only
"http1": HTTP/1.1 only
This makes (empty) == "http1" in todays world.
I have concerns with making (empty) automatically upgrade to HTTP/2.0 in the future and leave the "http1" as the option with no upgrade. This breaks the equality between (empty) and "http1" which has the potential to 1) be breaking 2) be surprising to developers. I don't want to rule it out as our considerations and our understanding of developer expectations could change by the time we are able to implement this, but we should discuss at that time how automatic HTTP upgrading works and if it should be the default behavior.
I am fine keeping this issue open to track automatic HTTP/2.0 upgrades as a feature request.
Issues go stale after 90 days of inactivity.
Mark the issue as fresh by adding the comment /remove-lifecycle stale.
Stale issues rot after an additional 30 days of inactivity and eventually close.
If this issue is safe to close now please do so by adding the comment /close.
Per discussion with @ZhiminXiang , we will be creating multiple issues to better track progress in this area. #10856 -> Health prober work (almost done in #10628) #10857 -> Queue proxy #10858 -> Activator
Once these three are complete, we can enable E2E tests, and discuss a timeline to enable the feature.
@AyushChothe just to confirm you're aware that you can set the containerPort.name to h2c and it will use http2 cleartext?
@dprotaso Yes, I know that. We need the feature to upgrade the port from http1 to h2c without explicit labeling, i.e if the sidecar probe detects the support for HTTP/2.
Activity
dgerd commentedon Jun 6, 2019
I have a proposal out to update this in the runtime contract to reflect our current behavior. Discussion on it can be seen here: https://github.com/knative/serving/pull/4035/files#r283535192
I suggest the update to the contract as we do not have line of sight to implementing this as it has strong dependencies on features in Envoy and Istio which AFAIK are not being worked on. Some background on how we landed this without automatic upgrade can be seen in this comment: #2539 (comment).
Runtime Contract: Update Protocols and Ports section
steren commentedon Jun 13, 2019
Please do not close this issue by changing the runtime contract, this should be considered as a bug for Knative, even if fixing it will be hard due to Knative's use of Istio.
As a developer, I should not have to opt-into using HTTP2 to use HTTP2.
rgregg commentedon Jun 13, 2019
Having the explicit choice for what protocol your app supports feels like a feature. This can help to catch errors in expectations that have performance implications in the differences between HTTP/1 and HTTP/2.
While the automatic detection could be a useful default, given the underlying dependencies in our stack cannot support those requirements. It's unclear Knative can even support this without significant work in Envoy and Istio.
Changing the runtime contract and aligning the expectations in the contract with what we can deliver feels like the right decision. We can re-evaluate that decision in the future if/when Envoy improves this experience.
steren commentedon Jun 13, 2019
Please at least keep this open as a feature request.
dgerd commentedon Jun 14, 2019
I commented this somewhere else, but pasting here and elaborating.
Our support today looks like:
(empty): HTTP/1.1 only
"h2c": HTTP/2 only
"http1": HTTP/1.1 only
This makes (empty) == "http1" in todays world.
I have concerns with making (empty) automatically upgrade to HTTP/2.0 in the future and leave the "http1" as the option with no upgrade. This breaks the equality between (empty) and "http1" which has the potential to 1) be breaking 2) be surprising to developers. I don't want to rule it out as our considerations and our understanding of developer expectations could change by the time we are able to implement this, but we should discuss at that time how automatic HTTP upgrading works and if it should be the default behavior.
I am fine keeping this issue open to track automatic HTTP/2.0 upgrades as a feature request.
vagababov commentedon Jun 14, 2019
tcnghia commentedon Dec 5, 2019
/assign tanzeeb
knative-housekeeping-robot commentedon Mar 5, 2020
Issues go stale after 90 days of inactivity.
Mark the issue as fresh by adding the comment
/remove-lifecycle stale.Stale issues rot after an additional 30 days of inactivity and eventually close.
If this issue is safe to close now please do so by adding the comment
/close.Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.
/lifecycle stale
21 remaining items
rafaeltello commentedon Feb 26, 2021
Per discussion with @ZhiminXiang , we will be creating multiple issues to better track progress in this area.
#10856 -> Health prober work (almost done in #10628)
#10857 -> Queue proxy
#10858 -> Activator
Once these three are complete, we can enable E2E tests, and discuss a timeline to enable the feature.
evankanderson commentedon Mar 18, 2021
/triage accepted
dprotaso commentedon Jun 2, 2021
@rafaeltello Are you continuing work on the queue proxy/activator issues?
ZhiminXiang commentedon Jun 2, 2021
I don't think @rafaeltello will continue working on it.
AyushChothe commentedon Jun 20, 2024
Is anyone going to work on this? This is an important issue that needs to be resolved.
dprotaso commentedon Aug 1, 2024
@AyushChothe just to confirm you're aware that you can set the
containerPort.nametoh2cand it will use http2 cleartext?AyushChothe commentedon Aug 1, 2024
@dprotaso Yes, I know that. We need the feature to upgrade the port from
http1toh2cwithout explicit labeling, i.e if the sidecar probe detects the support for HTTP/2.