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

Intent to support HTTP/2 #200

Closed
Gerg opened this issue Mar 31, 2021 · 11 comments
Closed

Intent to support HTTP/2 #200

Gerg opened this issue Mar 31, 2021 · 11 comments

Comments

@Gerg
Copy link
Member

Gerg commented Mar 31, 2021

Continuing the legacy of cloudfoundry/gorouter#276

As a follow up to issue #195, we have generated this proposal to enable http2 in cloud foundry.

We will be using this issue as our central coordination point and linking any associated PRs. Please let us know if you have requests or concerns.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

Gerg added a commit to cloudfoundry/gorouter that referenced this issue Apr 2, 2021
- Basic integration test for HTTP/2 traffic
- Still need to backfill unit tests
- Running into some difficulties sending HTTP/1.0 requests via
http.Client :sweatsmile:

[cloudfoundry/routing-release#200]

Co-authored-by: Carson Long <lcarson@vmware.com>
Co-authored-by: Greg Cobb <gcobb@vmware.com>
Gerg added a commit to cloudfoundry/gorouter that referenced this issue Apr 5, 2021
- Add integration test.
- We were not able to get a router/router test working because making
HTTP/2 requests to the test Server resulted in broken pipes. We believe
this is due to differences in the test Server setup and the main.go
setup used in the integration tests. This will require additional
investigation.
- Add router/router test to confirm that Gorouter can still server
HTTP/1.1 traffic
- Update protocol checking middleware to accept HTTP/2

[#177586561]
[cloudfoundry/routing-release#200]

Co-authored-by: Weyman Fung <weymanf@vmware.com>
Gerg added a commit to cloudfoundry/gorouter that referenced this issue Apr 6, 2021
- Add integration test.
- We were not able to get a router/router test working because making
HTTP/2 requests to the test Server resulted in broken pipes. We believe
this is due to differences in the test Server setup and the main.go
setup used in the integration tests. This will require additional
investigation.
- Add router/router test to confirm that Gorouter can still server
HTTP/1.1 traffic
- Update protocol checking middleware to accept HTTP/2

[#177586561]
[cloudfoundry/routing-release#200]

Co-authored-by: Weyman Fung <weymanf@vmware.com>
Co-authored-by: Greg Cobb <gcobb@vmware.com>
Co-authored-by: Weyman Fung <weymanf@vmware.com>
Gerg added a commit to pet-forks/executor that referenced this issue Apr 8, 2021
- This configuration works for apps that speak h2c, but does not work
for HTTP/1.1-only apps

[#177586568]
[cloudfoundry/routing-release#200]

Co-authored-by: Greg Cobb <gcobb@vmware.com>
Gerg added a commit to pet-forks/inigo that referenced this issue Apr 8, 2021
- Validate that Envoy proxy can handle HTTP/2 requests
- Currently does not pass, we believe because test app does not serve
HTTP/2 traffic. This reflects an issue with using ALPN: Envoy will
negotiate h2 and forward HTTP/2 traffic to an app that might not be able
to speak HTTP/2.

[#177667830]
[cloudfoundry/routing-release#200]

Co-authored-by: Greg Cobb <gcobb@vmware.com>
@Gerg
Copy link
Member Author

Gerg commented Apr 26, 2021

Golang issue for h2c upgrade headers: golang/go#45785

mkocher pushed a commit to ctlong/routing-perf-release that referenced this issue May 11, 2021
- took the blob from the diego release by being in the diego-release
directory and running bosh sync-blobs, and copied over the tarball in
the blobs folder

[#177674381](https://www.pivotaltracker.com/story/show/177674381)
[cloudfoundry/routing-release#200](cloudfoundry/routing-release#200)

Co-authored-by: Carson Long <lcarson@vmware.com>
Co-authored-by: Weyman Fung <weymanf@vmware.com>
@ctlong
Copy link
Member

ctlong commented May 11, 2021

hey fork + branch that includes TLS: https://github.com/ctlong/hey/tree/feat/tls. For performance testing.

Gerg added a commit to Gerg/net that referenced this issue May 14, 2021
- The h2c upgrade happens separate from the ALPN negotiation/TLS
handshake, so having it be part of TLSNextProto doesn't make sense
- Additionally, we need the returned transport to have a method that
isn't on the RoundTripper interface, expected to be returned from the
ALPN upgrade function
- Introduce a new interface, `UpgradableRoundTripper`, and a new map of
upgrade functions, `UpgradeNextProto`, to address both of these issues
- Collapse `upgradeHttp1Conn` into a boolean argument on `addConnIfNeeded`

[cloudfoundry/routing-release#200]

Co-authored-by: Carson Long <lcarson@vmware.com>
Gerg added a commit to Gerg/net that referenced this issue May 14, 2021
- http2ClientConn's roundTrip method is responsible for sending a
request and receiving the response. In the h2c upgrade case, we already
sent the request via HTTP/1, so we only need the logic for recovering
the response
- This way `cc.roundTrip` and `cc.completeUpgrade` can share the common
response-handling logic
- Remove the retry logic from CompleteUpgrade (which we copied from
RoundTripOpt), since we are not issuing a request (as described above)

[cloudfoundry/routing-release#200]

Co-authored-by: Greg Cobb <gcobb@vmware.com>
Gerg added a commit to Gerg/net that referenced this issue May 17, 2021
- Move body written state into bodyWriterState struct
- Reduce some code duplication between roundTrip and completeUpgrade

[cloudfoundry/routing-release#200]
Gerg added a commit to Gerg/net that referenced this issue May 17, 2021
- completeUpgrade and newClientConnWithStream are now private. We may
need to make this public again if/when we move the upgrade logic out of
the http[2] package

[cloudfoundry/routing-release#200]
Gerg added a commit to Gerg/net that referenced this issue May 17, 2021
- Switch `upgradableRoundTripper` and `upgradeNextProto` to be private. We
can always change these to be public if/when we move logic into another
package.

[cloudfoundry/routing-release#200]
Gerg added a commit to Gerg/net that referenced this issue May 18, 2021
- This way we can support adding connections to the pool if the
connection is not a TLS connection (for example a h2c connection)
- NewClientConn takes a net.Conn anyway, so there is no need to pass
down a *tls.Conn if it is just going to be cast down anyway

[cloudfoundry/routing-release#200]
@Gerg
Copy link
Member Author

Gerg commented May 18, 2021

Golang issue for h2c client upgrade support: golang/go#46249

MerricdeLauney added a commit to ctlong/routing-release that referenced this issue May 19, 2021
* `enable_http2`, defaults to false
* Set to true to enable communicating with apps via HTTP/2

[#177687027](https://www.pivotaltracker.com/story/show/177687027)
[cloudfoundry#200]

Co-authored-by: Merric de Launey <mdelauney@vmware.com>
Co-authored-by: Carson Long <lcarson@vmware.com>
ctlong added a commit to ctlong/gorouter that referenced this issue May 20, 2021
[cloudfoundry/routing-release#200]

Co-authored-by: Weyman Fung <weymanf@vmware.com>
ctlong added a commit to ctlong/routing-release that referenced this issue May 20, 2021
* `enable_http2`, defaults to false
* Set to true to enable communicating with apps via HTTP/2

[cloudfoundry#200]

Co-authored-by: Merric de Launey <mdelauney@vmware.com>
Co-authored-by: Carson Long <lcarson@vmware.com>
Gerg added a commit to cloudfoundry/gorouter that referenced this issue May 20, 2021
- Add integration test.
- We were not able to get a router/router test working because making
HTTP/2 requests to the test Server resulted in broken pipes. We believe
this is due to differences in the test Server setup and the main.go
setup used in the integration tests. This will require additional
investigation.
- Add router/router test to confirm that Gorouter can still server
HTTP/1.1 traffic
- Update protocol checking middleware to accept HTTP/2

[#177586561]
[cloudfoundry/routing-release#200]

Co-authored-by: Weyman Fung <weymanf@vmware.com>
Co-authored-by: Greg Cobb <gcobb@vmware.com>
Co-authored-by: Weyman Fung <weymanf@vmware.com>
ctlong pushed a commit to ctlong/gorouter that referenced this issue May 20, 2021
- Add integration test.
- We were not able to get a router/router test working because making
HTTP/2 requests to the test Server resulted in broken pipes. We believe
this is due to differences in the test Server setup and the main.go
setup used in the integration tests. This will require additional
investigation.
- Add router/router test to confirm that Gorouter can still server
HTTP/1.1 traffic
- Update protocol checking middleware to accept HTTP/2

[#177586561]
[cloudfoundry/routing-release#200]

Co-authored-by: Weyman Fung <weymanf@vmware.com>
Co-authored-by: Greg Cobb <gcobb@vmware.com>
Co-authored-by: Weyman Fung <weymanf@vmware.com>
ctlong added a commit to ctlong/gorouter that referenced this issue May 20, 2021
- added enableHTTP2 to config
- defaults to false
- passes to protocolcheck handler

[cloudfoundry/routing-release#200]

Co-authored-by: Weyman Fung <weymanf@vmware.com>
ctlong added a commit to ctlong/routing-release that referenced this issue May 20, 2021
* `enable_http2`, defaults to false
* Set to true to enable communicating with apps via HTTP/2

[cloudfoundry#200]

Co-authored-by: Merric de Launey <mdelauney@vmware.com>
Co-authored-by: Carson Long <lcarson@vmware.com>
ctlong added a commit to ctlong/gorouter that referenced this issue May 21, 2021
- added enableHTTP2 to config
- defaults to false
- passes to protocolcheck handler

[cloudfoundry/routing-release#200]

Co-authored-by: Weyman Fung <weymanf@vmware.com>
MarcPaquette pushed a commit to cloudfoundry/cloud_controller_ng that referenced this issue Sep 15, 2021
- For route destination endpoints and the manifest schema

[cloudfoundry/routing-release#200]

Co-authored-by: Greg Cobb <gcobb@pivotal.io>
Co-authored-by: Michael Oleske <moleske@pivotal.io>
Gerg added a commit to pet-forks/docs-partials that referenced this issue Sep 17, 2021
[cloudfoundry/routing-release#200]

Authored-by: Greg Cobb <gcobb@pivotal.io>
Gerg added a commit to pet-forks/docs-pas that referenced this issue Sep 20, 2021
ctlong added a commit to pet-forks/docs-dev-guide that referenced this issue Sep 24, 2021
* `cf map-route` has a new `--destination-protocol` flag to set a route
to use HTTP/2.
* New cf CLI v8 command, `cf route`, to view route details and get
destination info (specifically, whether a route uses HTTP/2 or not).

cloudfoundry/routing-release#200

Co-authored-by: Michael Oleske <moleske@vmware.com>
geofffranks pushed a commit to cloudfoundry/gorouter that referenced this issue Sep 30, 2021
- When routes are registered and HTTP/2 is disabled, persist the
protocol for endpoints as 'http1', even if the message has protocol
'http2'.
- It was confusing that the route registry and gorouter logs would
show protocol 'http2', even if it would really use HTTP/1.1 when
communicating with backends.
- Enabling HTTP/2 will require restarting the gorouter, so the route
registry will be regenerated with 'http2'.

[cloudfoundry/routing-release#217]
[cloudfoundry/routing-release#200]
Gerg added a commit to pet-forks/staticfile-buildpack that referenced this issue Oct 1, 2021
- nginx can not serve both HTTP/1 and HTTP/2 on the same port, if the
port does not use TLS. See https://trac.nginx.org/nginx/ticket/816.
- Implementation mirrors force_https to make it user-configurable
- new staticfile option of `enable_http2` and use of environment
variable `ENABLE_HTTP2` to configure nginx
- Route HTTP/2 configuration is available via manifest when using cf cli
v7 or with the map-route command when using cf cli v8
- since cutlass only supports cf cli v6, testing bypasses cutlass with
"cf curl" commands. These can be replaced with proper cf cli commands
when upgrading the cf cli version
- integration tests only runs on api 2.172.0 or higher

[cloudfoundry/routing-release#200]

Co-authored-by: Michael Oleske <moleske@vmware.com>
Gerg added a commit to pet-forks/docs-partials that referenced this issue Oct 4, 2021
Gerg added a commit to pet-forks/docs-pas that referenced this issue Oct 4, 2021
Gerg added a commit to pet-forks/docs-buildpacks that referenced this issue Oct 8, 2021
Gerg added a commit to pet-forks/docs-cf-admin that referenced this issue Oct 8, 2021
@ameowlia ameowlia moved this from Old PRs and Issues (pre-project creation) to In progress in DEPRECATED - WG-Application-Runtime-Platform DEPRECATED Oct 13, 2021
@ameowlia ameowlia removed this from Issue Inbox in DEPRECATED App Platform - Diego Oct 28, 2021
@ameowlia ameowlia moved this from For Review to In Progress in DEPRECATED App Platform Proposals Oct 28, 2021
@ameowlia ameowlia moved this from In Progress to Done in DEPRECATED App Platform Proposals Jan 12, 2022
@plowin
Copy link
Contributor

plowin commented Feb 4, 2022

Hi @Gerg , is there a reason why this is still open?

@Gerg
Copy link
Member Author

Gerg commented Feb 7, 2022

Not that I'm aware of. I'll go ahead and close it.

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

No branches or pull requests

5 participants