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 to hyper 0.12.7 to fix a keep-alive bug #26

Merged
merged 2 commits into from
Jul 24, 2018

Conversation

seanmonstar
Copy link
Contributor

Specifically proxied bodies would make use of an optimization in hyper
that resulted in the connection not knowing (but it did know! just
didn't tell itself...) that the body was finished, and so the connection
was closed. 0.12.7 includes the fix in hyper.

As part of this upgrade, the keep-alive tests have been adjusted to send
a small body, since the empty body was not triggering this case.

I believe this fully fixes linkerd/linkerd2#1353

Specifically proxied bodies would make use of an optimization in hyper
that resulted in the connection not knowing (but it did know! just
didn't tell itself...) that the body was finished, and so the connection
was closed. 0.12.7 includes the fix in hyper.

As part of this upgrade, the keep-alive tests have been adjusted to send
a small body, since the empty body was not triggering this case.

Signed-off-by: Sean McArthur <[email protected]>
@hawkw
Copy link
Contributor

hawkw commented Jul 23, 2018

As part of this upgrade, the keep-alive tests have been adjusted to send
a small body, since the empty body was not triggering this case

Should we have tests with an empty body as well, in case of future regressions that only occur when the body is empty, or does this seem too unlikely to be worth worrying about?

@seanmonstar
Copy link
Contributor Author

Should we have tests with an empty body as well?

🤷 We could. In the hyper PR, the test suite was updated to run those tests with the matrix of (no body, with body, no proxy, proxy).

@briansmith
Copy link
Contributor

Should we have tests with an empty body as well, in case of future regressions that only occur when the body is empty, or does this seem too unlikely to be worth worrying about?

I agree that it seems very useful to test this with an empty body too. Pretty much any HTTP-level thing we do should be tested with an empty body.

It's great that there's a hyper-level test but, especially since we have previously discussed refactoring things significantly to unify the hyper and tower-h2 logic, having linkerd2-level tests seems prudent, esp. since the "extra" test was already written.

@seanmonstar
Copy link
Contributor Author

I've updated that test to run each request against two routes, one returning a small body, and one returning no body.

@olix0r
Copy link
Member

olix0r commented Jul 23, 2018

thanks for hunting this down, @seanmonstar ! I'm 👍 when @briansmith is.

@seanmonstar seanmonstar merged commit 04a8ae3 into master Jul 24, 2018
@olix0r olix0r deleted the hyper-keep-alive-harder branch August 10, 2018 21:30
sprt pushed a commit to sprt/linkerd2-proxy that referenced this pull request Aug 30, 2019
Previously `Process` did its own environment variable parsing and did
not benefit from the improved error handling that `config` now has.
Additionally, future changes will need access to these same environment
variables in other parts of the proxy.

Move `Process`'s environment variable parsing to `config` to address
both of these issues. Now there are no uses of `env::var` outside of
`config` except for logging, which is the final desired state.

I validated this manually.
olix0r pushed a commit to olix0r/linkerd2-proxy that referenced this pull request Mar 18, 2024
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.

Success rate, throughput, and latency issues with HTTP/1
4 participants