Hello Alexey Serbin, Andrew Wong,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/14440
to review the following change.
Change subject: webserver: enable HTTP keep-alive
......................................................................
webserver: enable HTTP keep-alive
This is a port of IMPALA-8869. The motivation is, to quote from IMPALA-8869:
"...we mishandle HTTP keep-alive semantics when returning a 401 because we
close the connection but don't return a 'Connection: close' header, even
though we're using HTTP/1.1 where keep-alive is assumed, which can cause
clients to incorrectly believe that the connection has remained open."
More tangibly, this leads to issues when proxying via Apache Knox.
Specifically, every other request fails because the browser expected its
connection to remain open, but Kudu closed it.
The main challenge is that now we need to buffer up all parts of the
response to avoid triggering a combination of Nagle's algorithm and TCP
delayed acks, which add ~40ms to the RTT. To be safe, I refactored all
response handling to go through a single function.
Change-Id: Ic08ef5a268fdf6dea6a8c428b4ab8dac27418dd6
---
M src/kudu/server/webserver-test.cc
M src/kudu/server/webserver.cc
M src/kudu/server/webserver.h
M src/kudu/util/curl_util.cc
M src/kudu/util/curl_util.h
M src/kudu/util/web_callback_registry.h
6 files changed, 123 insertions(+), 58 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/40/14440/1
--
To view, visit http://gerrit.cloudera.org:8080/14440
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic08ef5a268fdf6dea6a8c428b4ab8dac27418dd6
Gerrit-Change-Number: 14440
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>