Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Serve HTTP2 health check #1442

Merged
merged 3 commits into from
Jan 28, 2020
Merged

Serve HTTP2 health check #1442

merged 3 commits into from
Jan 28, 2020

Conversation

gdbelvin
Copy link
Contributor

@gdbelvin gdbelvin commented Jan 27, 2020

Prioritize HTTP2 over HTTP1

Revert #1435 and use http.ServeHTTP rather than cmux.

  • cmux prevents http.Serve from serving HTTP2
  • http.Serve will only serve HTTP2 over TLS
    • http.Serve uses a type assertion to validate this
    • cmux interrupts this because it wraps the connection.
    • even if the connection did come from a TLS listener

The GCE ingress load ballancer requires services to serve
an HTTP 200 OK at / on the same protocol that the server uses.
To support GRPC, this means using HTTP2 throuought.
HTTP2 also requires TLS, both by golang and GCE ingress.

@gdbelvin gdbelvin requested a review from a team as a code owner January 27, 2020 15:47
@codecov
Copy link

codecov bot commented Jan 27, 2020

Codecov Report

Merging #1442 into master will decrease coverage by 0.24%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1442      +/-   ##
==========================================
- Coverage   66.56%   66.31%   -0.25%     
==========================================
  Files          54       54              
  Lines        4026     4026              
==========================================
- Hits         2680     2670      -10     
- Misses        955      962       +7     
- Partials      391      394       +3
Impacted Files Coverage Δ
core/client/mutations.go 83.78% <0%> (-5.41%) ⬇️
core/keyserver/revisions.go 62.58% <0%> (-2.05%) ⬇️
impl/sql/directory/storage.go 67.66% <0%> (-1.51%) ⬇️
core/sequencer/server.go 72.96% <0%> (-0.98%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8831a2...23df57a. Read the comment docs.

This reverts commit ef79a0a.

cmux cannot serve HTTP2 with Golang's http server.
cmd/serverutil/serverutil.go Outdated Show resolved Hide resolved
cmd/serverutil/serverutil.go Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
@google google deleted a comment from RJPercival Jan 28, 2020
@gdbelvin gdbelvin merged commit 69dad1c into google:master Jan 28, 2020
@gdbelvin gdbelvin deleted the http2 branch January 28, 2020 16:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants