Skip to content

Support GRPC and HTTP2 without explicit port labeling #4283

Open

Description

@rgregg

In what area(s)?

/area networking

Describe the feature

Today to use GRPC or HTTP/2 for ingress into your service, you have to explicitly label the ports (see the GRPC sample: https://github.com/knative/docs/blob/master/docs/serving/samples/grpc-ping-go/sample.yaml)

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

Activity

  1. added
    kind/feature
    on Jun 6, 2019
  2. dgerd commented on Jun 6, 2019

    @dgerd

    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).

  3. added a commit that references this issue on Jun 6, 2019
    ca48d6c
  4. steren commented on Jun 13, 2019

    @steren
    Contributor

    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.

  5. rgregg commented on Jun 13, 2019

    @rgregg
    ContributorAuthor

    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.

  6. steren commented on Jun 13, 2019

    @steren
    Contributor

    Please at least keep this open as a feature request.

  7. dgerd commented on Jun 14, 2019

    @dgerd

    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.

  8. added this to the Ice Box milestone on Jun 14, 2019
  9. vagababov commented on Jun 14, 2019

    @vagababov
    Contributor
  10. tcnghia commented on Dec 5, 2019

    @tcnghia
    Contributor

    /assign tanzeeb

  11. modified the milestones: Ice Box, Needs Triage on Dec 5, 2019
  12. knative-housekeeping-robot commented on Mar 5, 2020

    @knative-housekeeping-robot

    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

  13. 21 remaining items

  14. rafaeltello commented on Feb 26, 2021

    @rafaeltello
    Contributor

    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.

  15. evankanderson commented on Mar 18, 2021

    @evankanderson
    Member

    /triage accepted

  16. added
    triage/accepted
    on Mar 18, 2021
  17. dprotaso commented on Jun 2, 2021

    @dprotaso
    Member

    @rafaeltello Are you continuing work on the queue proxy/activator issues?

  18. ZhiminXiang commented on Jun 2, 2021

    @ZhiminXiang

    I don't think @rafaeltello will continue working on it.

  19. modified the milestones: Needs Triage, Ice Box on Oct 6, 2021
  20. moved this from Next to Icebox in Networking WG Roadmapon Nov 20, 2021
  21. moved this from Icebox to Ready To Work in Networking WG Roadmapon Dec 9, 2021
  22. AyushChothe commented on Jun 20, 2024

    @AyushChothe

    Is anyone going to work on this? This is an important issue that needs to be resolved.

  23. dprotaso commented on Aug 1, 2024

    @dprotaso
    Member

    @AyushChothe just to confirm you're aware that you can set the containerPort.name to h2c and it will use http2 cleartext?

  24. AyushChothe commented on Aug 1, 2024

    @AyushChothe

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingkind/featuretriage/accepted

    Type

    No type

    Projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions