Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14440 )
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. Since I was knee deep in refactoring, I took the opportunity to fix the "SPNEGO header not returned with 200 response" issue. Change-Id: Ic08ef5a268fdf6dea6a8c428b4ab8dac27418dd6 Reviewed-on: http://gerrit.cloudera.org:8080/14440 Tested-by: Adar Dembo <[email protected]> Reviewed-by: Thomas Tauber-Marshall <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- M src/kudu/master/master_path_handlers.cc M src/kudu/server/default_path_handlers.cc M src/kudu/server/pprof_path_handlers.cc M src/kudu/server/rpcz-path-handler.cc M src/kudu/server/tracing_path_handlers.cc M src/kudu/server/webserver-test.cc M src/kudu/server/webserver.cc M src/kudu/server/webserver.h M src/kudu/tserver/tserver_path_handlers.cc M src/kudu/util/curl_util.cc M src/kudu/util/curl_util.h M src/kudu/util/thread.cc M src/kudu/util/web_callback_registry.h 13 files changed, 203 insertions(+), 177 deletions(-) Approvals: Adar Dembo: Verified Thomas Tauber-Marshall: Looks good to me, but someone else must approve Alexey Serbin: Looks good to me, approved -- 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: merged Gerrit-Change-Id: Ic08ef5a268fdf6dea6a8c428b4ab8dac27418dd6 Gerrit-Change-Number: 14440 Gerrit-PatchSet: 7 Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]> Gerrit-Reviewer: Tidy Bot (241)
