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

server: introduce a new port for HTTP requests #5039

Merged
merged 5 commits into from
Mar 10, 2016
Merged

server: introduce a new port for HTTP requests #5039

merged 5 commits into from
Mar 10, 2016

Conversation

tamird
Copy link
Contributor

@tamird tamird commented Mar 9, 2016

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
Copy link
Contributor

bdarnell commented Mar 9, 2016

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
Copy link
Contributor Author

tamird commented Mar 9, 2016

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 [email protected]
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
Contributor

LGTM


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


Comments from the review on Reviewable.io

@tbg
Copy link
Member

tbg commented Mar 10, 2016

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
Copy link
Contributor Author

tamird commented Mar 10, 2016

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
Copy link
Member

tbg commented Mar 10, 2016

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

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
Copy link
Contributor

mrtracy commented Mar 10, 2016

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
Copy link
Contributor Author

tamird commented Mar 10, 2016

#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