Skip to content

server: introduce a new port for HTTP requests#5039

Merged
tamird merged 5 commits into
cockroachdb:masterfrom
tamird:grpc-http2-broken
Mar 10, 2016
Merged

server: introduce a new port for HTTP requests#5039
tamird merged 5 commits into
cockroachdb:masterfrom
tamird:grpc-http2-broken

Conversation

@tamird

@tamird tamird commented Mar 9, 2016

Copy link
Copy Markdown
Contributor

It turns out that accurately using cmux to sniff grpc connections is
hard. Most h2 clients behave as follows after connecting:

  • S(Settings) -> S(WindowUpdate) -> R(SettingsAck) -> S(Headers)

Where S indicates sending and R indicates receiving.

grpc-go's h2 client behaves differently - it does not wait for the
SettingsAck. This allowed the old implementation to detect it based on
the headers it supplied, but broke all other h2 clients as connection
negotiation deadlocked.

This commit can be reverted wholesale when grpc.(*Server).ServeHTTP's
performance problems are addressed upstream.
See grpc/grpc-go#586.

Fixes #5020.
Fixes #5023.


This change is Review on Reviewable

@bdarnell

bdarnell commented Mar 9, 2016

Copy link
Copy Markdown
Contributor

LGTM

8080 is a common default port for many things; I'm worried about the risk of conflict there. I don't have any better ideas for a default, though, unless we default to a kernel-assigned port (and print it out at startup) or make the HTTP interface opt-in until we can get it working on 26257 again.

@tamird

tamird commented Mar 9, 2016

Copy link
Copy Markdown
Contributor Author

Yeah, the idea of opting in to the HTTP interface came up in discussion
with @mberhault - he felt strongly that it should be there by default (and
for demos, I agree). I think this is sufficiently non-critical that we can
tweak it down the road (at least compared to the current broken state of
affairs).

On Wed, Mar 9, 2016 at 6:26 PM, Ben Darnell notifications@github.com
wrote:

LGTM

8080 is a common default port for many things; I'm worried about the risk
of conflict there. I don't have any better ideas for a default, though,
unless we default to a kernel-assigned port (and print it out at startup)
or make the HTTP interface opt-in until we can get it working on 26257
again.


Reply to this email directly or view it on GitHub
#5039 (comment)
.

@bdarnell

Copy link
Copy Markdown
Contributor

LGTM


Review status: 0 of 22 files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

@tbg

tbg commented Mar 10, 2016

Copy link
Copy Markdown
Member

LGTM.


Reviewed 3 of 3 files at r1.
Review status: 1 of 22 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


acceptance/terrafarm/farmer.go, line 171 [r1] (raw file):
the changes in this file completely break acceptance tests against AWS, for example the nightly. This can't just be fixed?


Comments from the review on Reviewable.io

@tamird

tamird commented Mar 10, 2016

Copy link
Copy Markdown
Contributor Author

Review status: 1 of 22 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


acceptance/terrafarm/farmer.go, line 171 [r1] (raw file):
Can't possibly be used right now - this method used to callAddr which is panic("unimplemented")


Comments from the review on Reviewable.io

@tbg

tbg commented Mar 10, 2016

Copy link
Copy Markdown
Member

Reviewed 1 of 1 files at r2, 4 of 4 files at r3, 16 of 16 files at r4, 4 of 4 files at r5.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from the review on Reviewable.io

tamird added 5 commits March 9, 2016 21:07
This reverts commit 70df752.
It turns out that accurately using cmux to sniff grpc connections is
hard. Most h2 clients behave as follows after connecting:

* S(Settings) -> S(WindowUpdate) -> R(SettingsAck) -> S(Headers)

Where S indicates sending and R indicates receiving.

grpc-go's h2 client behaves differently - it does not wait for the
SettingsAck. This allowed the old implementation to detect it based on
the headers it supplied, but broke all other h2 clients as connection
negotiation deadlocked.

This commit can be reverted wholesale when grpc.(*Server).ServeHTTP's
performance problems are addressed upstream.
See grpc/grpc-go#586.

Fixes #5020.
Fixes #5023.
tamird added a commit that referenced this pull request Mar 10, 2016
server: introduce a new port for HTTP requests
@tamird tamird merged commit ad0d46f into cockroachdb:master Mar 10, 2016
@tamird tamird deleted the grpc-http2-broken branch March 10, 2016 03:24
@mrtracy

mrtracy commented Mar 10, 2016

Copy link
Copy Markdown
Contributor

This does not appear to raise an error if "--port" is set to 8081, but "httpport" is not set to anything else. It still prints out:

admin:     http://localhost:8081

But trying to connect to it just spits out garbage, because that is not the http endpoint.

@tamird

tamird commented Mar 10, 2016

Copy link
Copy Markdown
Contributor Author

#5047

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.

4 participants