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

Conversation

@tamird
Copy link
Collaborator

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Collaborator Author

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

@tamird tamird force-pushed the tamird:grpc-http2-broken branch from 86fdb9d to 7ba4004 Mar 9, 2016

@bdarnell

This comment has been minimized.

Copy link
Member

commented Mar 10, 2016

LGTM


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


Comments from the review on Reviewable.io

@tbg

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Collaborator Author

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

This comment has been minimized.

Copy link
Member

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

@tamird tamird force-pushed the tamird:grpc-http2-broken branch from 7ba4004 to cae3a51 Mar 10, 2016

tamird added 4 commits Mar 9, 2016
Revert "clarify diagram"
This reverts commit 70df752.
server: introduce a new port for HTTP requests
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 tamird force-pushed the tamird:grpc-http2-broken branch from 92fa528 to 7017b82 Mar 10, 2016

tamird added a commit that referenced this pull request Mar 10, 2016
Merge pull request #5039 from tamird/grpc-http2-broken
server: introduce a new port for HTTP requests

@tamird tamird merged commit ad0d46f into cockroachdb:master Mar 10, 2016

1 of 3 checks passed

ci/circleci CircleCI is running your tests
Details
code-review/reviewable Review in progress: 0 of 1 LGTMs obtained
Details
licence/cla Contributor License Agreement is signed.
Details

@tamird tamird deleted the tamird:grpc-http2-broken branch Mar 10, 2016

@mrtracy

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.