TS-2077 Remove proxy.config.http.origin_server_pipeline
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/081848cc Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/081848cc Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/081848cc Branch: refs/heads/5.0.x Commit: 081848cc800ddc7e730f5f7d69db12fc1b0cbe49 Parents: 1247f0d Author: Leif Hedstrom <zw...@apache.org> Authored: Tue Jul 30 14:10:28 2013 +0200 Committer: Leif Hedstrom <zw...@apache.org> Committed: Tue Dec 10 07:56:06 2013 -0700 ---------------------------------------------------------------------- ci/jenkins/records.config | 1 - lib/perl/lib/Apache/TS/AdminClient.pm | 1 - mgmt/RecordsConfig.cc | 8 ---- proxy/config/records.config.default.in | 1 - proxy/hdrs/HTTP.h | 3 +- proxy/http/HttpConfig.cc | 2 - proxy/http/HttpConfig.h | 2 - proxy/http/HttpSM.cc | 2 +- proxy/http/HttpTransact.cc | 64 ++++++++++++++--------------- 9 files changed, 32 insertions(+), 52 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/081848cc/ci/jenkins/records.config ---------------------------------------------------------------------- diff --git a/ci/jenkins/records.config b/ci/jenkins/records.config index 11057d6..2cc3493 100644 --- a/ci/jenkins/records.config +++ b/ci/jenkins/records.config @@ -139,7 +139,6 @@ CONFIG proxy.config.http.send_http11_requests INT 1 # 1 - Share, with a single global connection pool # 2 - Share, with a connection pool per worker thread CONFIG proxy.config.http.share_server_sessions INT 2 -CONFIG proxy.config.http.origin_server_pipeline INT 1 ########################## # HTTP referer filtering # ########################## http://git-wip-us.apache.org/repos/asf/trafficserver/blob/081848cc/lib/perl/lib/Apache/TS/AdminClient.pm ---------------------------------------------------------------------- diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm index 6f6ea73..37281ae 100644 --- a/lib/perl/lib/Apache/TS/AdminClient.pm +++ b/lib/perl/lib/Apache/TS/AdminClient.pm @@ -483,7 +483,6 @@ The Apache Traffic Server Administration Manual will explain what these strings proxy.config.http.number_of_redirections proxy.config.http.origin_max_connections proxy.config.http.origin_min_keep_alive_connections - proxy.config.http.origin_server_pipeline proxy.config.http.parent_proxies proxy.config.http.parent_proxy.connect_attempts_timeout proxy.config.http.parent_proxy.fail_threshold http://git-wip-us.apache.org/repos/asf/trafficserver/blob/081848cc/mgmt/RecordsConfig.cc ---------------------------------------------------------------------- diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index 1b45bfb..4b69724 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -426,14 +426,6 @@ RecordElement RecordsConfig[] = { // # {RECT_CONFIG, "proxy.config.http.send_http11_requests", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} , - // # origin_server_pipeline - // # - // # 0 - no keepalive - // # n >= 1 - max pipeline window - // # (1 is the same HTTP/1.0 keepalive) - // # - {RECT_CONFIG, "proxy.config.http.origin_server_pipeline", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} - , {RECT_CONFIG, "proxy.config.http.share_server_sessions", RECD_INT, "2", RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL} , {RECT_CONFIG, "proxy.config.http.record_heartbeat", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} http://git-wip-us.apache.org/repos/asf/trafficserver/blob/081848cc/proxy/config/records.config.default.in ---------------------------------------------------------------------- diff --git a/proxy/config/records.config.default.in b/proxy/config/records.config.default.in index bc3c9ce..91b0969 100644 --- a/proxy/config/records.config.default.in +++ b/proxy/config/records.config.default.in @@ -145,7 +145,6 @@ CONFIG proxy.config.http.send_http11_requests INT 1 # 1 - Share, with a single global connection pool # 2 - Share, with a connection pool per worker thread CONFIG proxy.config.http.share_server_sessions INT 2 -CONFIG proxy.config.http.origin_server_pipeline INT 1 ########################## # HTTP referer filtering # ########################## http://git-wip-us.apache.org/repos/asf/trafficserver/blob/081848cc/proxy/hdrs/HTTP.h ---------------------------------------------------------------------- diff --git a/proxy/hdrs/HTTP.h b/proxy/hdrs/HTTP.h index 45a59bf..e6eabac 100644 --- a/proxy/hdrs/HTTP.h +++ b/proxy/hdrs/HTTP.h @@ -91,8 +91,7 @@ enum HTTPKeepAlive { HTTP_KEEPALIVE_UNDEFINED = 0, HTTP_NO_KEEPALIVE, - HTTP_KEEPALIVE, - HTTP_PIPELINE + HTTP_KEEPALIVE }; enum HTTPWarningCode http://git-wip-us.apache.org/repos/asf/trafficserver/blob/081848cc/proxy/http/HttpConfig.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc index 0ec4d61..26fa002 100644 --- a/proxy/http/HttpConfig.cc +++ b/proxy/http/HttpConfig.cc @@ -1178,7 +1178,6 @@ HttpConfig::startup() HttpEstablishStaticConfigByte(c.oride.flow_control_enabled, "proxy.config.http.flow_control.enabled"); HttpEstablishStaticConfigLongLong(c.oride.flow_high_water_mark, "proxy.config.http.flow_control.high_water"); HttpEstablishStaticConfigLongLong(c.oride.flow_low_water_mark, "proxy.config.http.flow_control.low_water"); - HttpEstablishStaticConfigLongLong(c.origin_server_pipeline, "proxy.config.http.origin_server_pipeline"); HttpEstablishStaticConfigByte(c.oride.share_server_sessions, "proxy.config.http.share_server_sessions"); HttpEstablishStaticConfigByte(c.oride.keep_alive_post_out, "proxy.config.http.keep_alive_post_out"); @@ -1431,7 +1430,6 @@ HttpConfig::reconfigure() params->oride.flow_high_water_mark = params->oride.flow_low_water_mark = 0; } - params->origin_server_pipeline = m_master.origin_server_pipeline; params->oride.share_server_sessions = m_master.oride.share_server_sessions; params->oride.keep_alive_post_out = INT_TO_BOOL(m_master.oride.keep_alive_post_out); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/081848cc/proxy/http/HttpConfig.h ---------------------------------------------------------------------- diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h index 91470fd..b3b9e40 100644 --- a/proxy/http/HttpConfig.h +++ b/proxy/http/HttpConfig.h @@ -668,7 +668,6 @@ public: // connection variables. timeouts are in seconds // /////////////////////////////////////////////////// MgmtByte session_auth_cache_keep_alive_enabled; - MgmtInt origin_server_pipeline; MgmtInt transaction_active_timeout_in; MgmtInt accept_no_activity_timeout; @@ -892,7 +891,6 @@ HttpConfigParams::HttpConfigParams() url_expansions(NULL), num_url_expansions(0), session_auth_cache_keep_alive_enabled(1), - origin_server_pipeline(1), transaction_active_timeout_in(900), accept_no_activity_timeout(120), parent_connect_attempts(4), http://git-wip-us.apache.org/repos/asf/trafficserver/blob/081848cc/proxy/http/HttpSM.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index cc79002..590aff1 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -3080,7 +3080,7 @@ HttpSM::tunnel_handler_ua(int event, HttpTunnelConsumer * c) case VC_EVENT_WRITE_COMPLETE: c->write_success = true; t_state.client_info.abort = HttpTransact::DIDNOT_ABORT; - if (t_state.client_info.keep_alive == HTTP_KEEPALIVE || t_state.client_info.keep_alive == HTTP_PIPELINE) { + if (t_state.client_info.keep_alive == HTTP_KEEPALIVE) { if (t_state.www_auth_content != HttpTransact::CACHE_AUTH_SERVE || ua_session->get_bound_ss()) { // successful keep-alive close_connection = false; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/081848cc/proxy/http/HttpTransact.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index a7a14a2..59391e3 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -2545,7 +2545,7 @@ HttpTransact::HandleCacheOpenReadHit(State* s) // we haven't done the ICP lookup yet. The following is to // fake an icp_info to cater for build_request's needs s->icp_info.http_version.set(1, 0); - if (!s->txn_conf->keep_alive_enabled_out || s->http_config_param->origin_server_pipeline == 0) { + if (!s->txn_conf->keep_alive_enabled_out) { s->icp_info.keep_alive = HTTP_NO_KEEPALIVE; } else { s->icp_info.keep_alive = HTTP_KEEPALIVE; @@ -3025,7 +3025,7 @@ HttpTransact::HandleICPLookup(State* s) // values are not initialized. // Force them to be initialized s->icp_info.http_version.set(1, 0); - if (!s->txn_conf->keep_alive_enabled_out || s->http_config_param->origin_server_pipeline == 0) { + if (!s->txn_conf->keep_alive_enabled_out) { s->icp_info.keep_alive = HTTP_NO_KEEPALIVE; } else { s->icp_info.keep_alive = HTTP_KEEPALIVE; @@ -4063,26 +4063,26 @@ HttpTransact::handle_cache_operation_on_forward_server_response(State* s) break; case HTTP_STATUS_HTTPVER_NOT_SUPPORTED: // 505 + { + bool keep_alive = (s->current.server->keep_alive == HTTP_KEEPALIVE); - bool keep_alive; - keep_alive = ((s->current.server->keep_alive == HTTP_KEEPALIVE) || - (s->current.server->keep_alive == HTTP_PIPELINE)); - - s->next_action = how_to_open_connection(s); + s->next_action = how_to_open_connection(s); - /* Downgrade the request level and retry */ - if (!HttpTransactHeaders::downgrade_request(&keep_alive, &s->hdr_info.server_request)) { - build_error_response(s, HTTP_STATUS_HTTPVER_NOT_SUPPORTED, "HTTP Version Not Supported", "response#bad_version", ""); - s->next_action = PROXY_SEND_ERROR_CACHE_NOOP; - s->already_downgraded = true; - } else { - if (!keep_alive) { - /* START Hack */ - (s->hdr_info.server_request).field_delete(MIME_FIELD_PROXY_CONNECTION, MIME_LEN_PROXY_CONNECTION); - /* END Hack */ + /* Downgrade the request level and retry */ + if (!HttpTransactHeaders::downgrade_request(&keep_alive, &s->hdr_info.server_request)) { + build_error_response(s, HTTP_STATUS_HTTPVER_NOT_SUPPORTED, "HTTP Version Not Supported", + "response#bad_version", ""); + s->next_action = PROXY_SEND_ERROR_CACHE_NOOP; + s->already_downgraded = true; + } else { + if (!keep_alive) { + /* START Hack */ + (s->hdr_info.server_request).field_delete(MIME_FIELD_PROXY_CONNECTION, MIME_LEN_PROXY_CONNECTION); + /* END Hack */ + } + s->already_downgraded = true; + s->next_action = how_to_open_connection(s); } - s->already_downgraded = true; - s->next_action = how_to_open_connection(s); } return; @@ -4391,8 +4391,7 @@ HttpTransact::handle_no_cache_operation_on_forward_server_response(State* s) DebugTxn("http_trans", "[handle_no_cache_operation_on_forward_server_response] (hncoofsr)"); DebugTxn("http_seq", "[handle_no_cache_operation_on_forward_server_response]"); - bool keep_alive = true; - keep_alive = ((s->current.server->keep_alive == HTTP_KEEPALIVE) || (s->current.server->keep_alive == HTTP_PIPELINE)); + bool keep_alive = s->current.server->keep_alive == HTTP_KEEPALIVE; const char *warn_text = NULL; switch (s->hdr_info.server_response.status_get()) { @@ -4902,7 +4901,7 @@ HttpTransact::get_ka_info_from_host_db(State *s, ConnectionAttributes *server_in (http11_if_hostdb == true && host_db_info->app.http_data.http_version == HostDBApplicationInfo::HTTP_VERSION_11)) { server_info->http_version.set(1, 1); - server_info->keep_alive = HTTP_PIPELINE; + server_info->keep_alive = HTTP_KEEPALIVE; } else if (host_db_info->app.http_data.http_version == HostDBApplicationInfo::HTTP_VERSION_10) { server_info->http_version.set(1, 0); server_info->keep_alive = HTTP_KEEPALIVE; @@ -4921,15 +4920,9 @@ HttpTransact::get_ka_info_from_host_db(State *s, ConnectionAttributes *server_in ///////////////////////////// // origin server keep_alive // ///////////////////////////// - if ((!s->txn_conf->keep_alive_enabled_out) || (s->http_config_param->origin_server_pipeline == 0)) { + if (!s->txn_conf->keep_alive_enabled_out) { server_info->keep_alive = HTTP_NO_KEEPALIVE; } - /////////////////////////////// - // keep_alive w/o pipelining // - /////////////////////////////// - if ((server_info->keep_alive == HTTP_PIPELINE) && (s->http_config_param->origin_server_pipeline <= 1)) { - server_info->keep_alive = HTTP_KEEPALIVE; - } return; } @@ -6634,12 +6627,15 @@ void HttpTransact::handle_request_keep_alive_headers(State* s, HTTPVersion ver, HTTPHdr* heads) { enum KA_Action_t - { KA_UNKNOWN, KA_DISABLED, KA_CLOSE, KA_CONNECTION }; + { + KA_UNKNOWN, + KA_DISABLED, + KA_CLOSE, + KA_CONNECTION + }; KA_Action_t ka_action = KA_UNKNOWN; - - bool upstream_ka = ((s->current.server->keep_alive == HTTP_KEEPALIVE) || - (s->current.server->keep_alive == HTTP_PIPELINE)); + bool upstream_ka = (s->current.server->keep_alive == HTTP_KEEPALIVE); ink_assert(heads->type_get() == HTTP_TYPE_REQUEST); @@ -6751,7 +6747,7 @@ HttpTransact::handle_response_keep_alive_headers(State* s, HTTPVersion ver, HTTP } // Check pre-conditions for keep-alive - if (s->client_info.keep_alive != HTTP_KEEPALIVE && s->client_info.keep_alive != HTTP_PIPELINE) { + if (s->client_info.keep_alive != HTTP_KEEPALIVE) { ka_action = KA_DISABLED; } else if (HTTP_MAJOR(ver.m_version) == 0) { /* No K-A for 0.9 apps */ ka_action = KA_DISABLED;