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

Update Router to serve HTTP/2 traffic #278

Merged
merged 5 commits into from
Jul 19, 2021
Merged

Update Router to serve HTTP/2 traffic #278

merged 5 commits into from
Jul 19, 2021

Conversation

Gerg
Copy link
Member

@Gerg Gerg commented Apr 6, 2021

Adds a manifest property, enable_http2, to enable the Gorouter to accept HTTP/2 connections. The property changes the protocol checking middleware and the serveHTTPS function to allow HTTP/2. Note that connections made using HTTP/2 will still be proxied to backends over HTTP/1.1 because Envoy isn't currently configured to accept HTTP/2.

We added integration tests to check HTTP/2 (and updated the old ones to check that gorouter can still serve HTTP/1.1). However, we weren't 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.

[cloudfoundry/routing-release#200]

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

integration/main_test.go Show resolved Hide resolved
router/router_test.go Show resolved Hide resolved
router/router.go Show resolved Hide resolved
@Gerg Gerg marked this pull request as ready for review June 8, 2021 22:28
@mkocher
Copy link
Member

mkocher commented Jun 28, 2021

@ameowlia is this good to go?

Gerg and others added 5 commits July 6, 2021 17:52
- 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 <[email protected]>
Co-authored-by: Greg Cobb <[email protected]>
Co-authored-by: Weyman Fung <[email protected]>
- added enableHTTP2 to config
- defaults to false
- passes to protocolcheck handler

[cloudfoundry/routing-release#200]

Co-authored-by: Weyman Fung <[email protected]>
- added an integration test for http/1.1
- removed the alpn settings if h2 is disabled

Co-authored-by: Merric de Launey <[email protected]>
@ctlong
Copy link
Member

ctlong commented Jul 6, 2021

@ameowlia is this PR good to go?

@ameowlia
Copy link
Member

ameowlia commented Jul 19, 2021

Apologizes for the delay. Github comments are not the best way to ping me 😅

Acceptance Steps

  • Set enable_http2 to true
  • Deployed this code
  • Built this h2 go client with GOOS=linux
  • bosh scped it to the router VM
  • Sent h2 traffic directly to the gorouter for an app
  • Saw the response was h2
  • Set enable_http2 to false and redeploy
  • Sent h2 traffic directly to the gorouter for an app
  • Saw it fail to connect with h2

🎉 ✨ Merging now. Thanks for all your hard work on this!

@ameowlia ameowlia merged commit 47a672f into main Jul 19, 2021
@ameowlia ameowlia deleted the serve_http2 branch July 19, 2021 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants