diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index a9cd71521c4..7ab3992d610 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -1574,13 +1574,6 @@ Origin Server Connect Attempts Specifies how long (in seconds) |TS| remembers that an origin server was unreachable. -.. ts:cv:: CONFIG proxy.config.http.down_server.abort_threshold INT 10 - :reloadable: - :overridable: - - The number of seconds before |TS| marks an origin server as unavailable after a client abandons a request - because the origin server was too slow in sending the response header. - .. ts:cv:: CONFIG proxy.config.http.uncacheable_requests_bypass_parent INT 1 :reloadable: :overridable: diff --git a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst index 2e70c110157..b034d7937ee 100644 --- a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst +++ b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst @@ -116,7 +116,6 @@ TSOverridableConfigKey Value Configuratio :c:macro:`TS_CONFIG_HTTP_DEFAULT_BUFFER_SIZE` :ts:cv:`proxy.config.http.default_buffer_size` :c:macro:`TS_CONFIG_HTTP_DEFAULT_BUFFER_WATER_MARK` :ts:cv:`proxy.config.http.default_buffer_water_mark` :c:macro:`TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS` :ts:cv:`proxy.config.http.doc_in_cache_skip_dns` -:c:macro:`TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD` :ts:cv:`proxy.config.http.down_server.abort_threshold` :c:macro:`TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME` :ts:cv:`proxy.config.http.down_server.cache_time` :c:macro:`TS_CONFIG_HTTP_FLOW_CONTROL_ENABLED` :ts:cv:`proxy.config.http.flow_control.enabled` :c:macro:`TS_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARK` :ts:cv:`proxy.config.http.flow_control.high_water` diff --git a/doc/release-notes/upgrading.en.rst b/doc/release-notes/upgrading.en.rst index 3a61ff23bf6..5692087f4b0 100644 --- a/doc/release-notes/upgrading.en.rst +++ b/doc/release-notes/upgrading.en.rst @@ -46,6 +46,8 @@ Configuration changes --------------------- The following incompatible changes to the configurations have been made in this version of ATS. +The records.config entry proxy.config.http.down_server.abort_threshold has been removed. + Plugins ------- diff --git a/include/ts/apidefs.h.in b/include/ts/apidefs.h.in index 6af3ceafa23..5de3277021d 100644 --- a/include/ts/apidefs.h.in +++ b/include/ts/apidefs.h.in @@ -727,6 +727,7 @@ typedef enum { TS_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIES, TS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUT, TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME, + // Should be removed for 10.0 TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD, TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS, TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT, diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index a6041a98688..a91379b93ec 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -489,8 +489,6 @@ static const RecordElement RecordsConfig[] = , {RECT_CONFIG, "proxy.config.http.down_server.cache_time", RECD_INT, "60", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL} , - {RECT_CONFIG, "proxy.config.http.down_server.abort_threshold", RECD_INT, "10", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL} - , {RECT_CONFIG, "proxy.config.http.negative_revalidating_enabled", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL} , {RECT_CONFIG, "proxy.config.http.negative_revalidating_lifetime", RECD_INT, "1800", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL} diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc index cb8c3b72ae8..1319f903c48 100644 --- a/proxy/http/HttpConfig.cc +++ b/proxy/http/HttpConfig.cc @@ -1323,7 +1323,6 @@ HttpConfig::startup() HttpEstablishStaticConfigByte(c.referer_format_redirect, "proxy.config.http.referer_format_redirect"); HttpEstablishStaticConfigLongLong(c.oride.down_server_timeout, "proxy.config.http.down_server.cache_time"); - HttpEstablishStaticConfigLongLong(c.oride.client_abort_threshold, "proxy.config.http.down_server.abort_threshold"); // Negative caching and revalidation HttpEstablishStaticConfigByte(c.oride.negative_caching_enabled, "proxy.config.http.negative_caching_enabled"); @@ -1616,8 +1615,7 @@ HttpConfig::reconfigure() params->strict_uri_parsing = INT_TO_BOOL(m_master.strict_uri_parsing); - params->oride.down_server_timeout = m_master.oride.down_server_timeout; - params->oride.client_abort_threshold = m_master.oride.client_abort_threshold; + params->oride.down_server_timeout = m_master.oride.down_server_timeout; params->oride.negative_caching_enabled = INT_TO_BOOL(m_master.oride.negative_caching_enabled); params->oride.negative_caching_lifetime = m_master.oride.negative_caching_lifetime; diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h index 55a8509dda5..db56cd19fa7 100644 --- a/proxy/http/HttpConfig.h +++ b/proxy/http/HttpConfig.h @@ -660,7 +660,7 @@ struct OverridableHttpConfigParams { MgmtInt per_parent_connect_attempts = 2; MgmtInt down_server_timeout = 300; - MgmtInt client_abort_threshold = 10; + MgmtInt client_abort_threshold = 1000; // open read failure retries. MgmtInt max_cache_open_read_retries = -1; diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index dece9faccdc..ffab3d5a1e0 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -1021,7 +1021,6 @@ HttpSM::state_watch_for_client_abort(int event, void *data) if (ua_entry->read_vio) { ua_entry->read_vio->nbytes = ua_entry->read_vio->ndone; } - mark_server_down_on_client_abort(); milestones[TS_MILESTONE_UA_CLOSE] = Thread::get_hrtime(); set_ua_abort(HttpTransact::ABORTED, event); @@ -5440,38 +5439,6 @@ HttpSM::set_ua_abort(HttpTransact::AbortState_t ua_abort, int event) } } -void -HttpSM::mark_server_down_on_client_abort() -{ - ///////////////////////////////////////////////////// - // Check see if the client aborted because the // - // origin server was too slow in sending the // - // response header. If so, mark that // - // server as down so other clients won't try to // - // for revalidation or select it from a round // - // robin set // - // // - // Note: we do not want to mark parent // - // proxies as down with this metric because // - // that upstream proxy may be working but // - // the actual origin server is one that is hung // - ///////////////////////////////////////////////////// - if (t_state.current.request_to == HttpTransact::ORIGIN_SERVER && t_state.hdr_info.request_content_length <= 0) { - if (milestones[TS_MILESTONE_SERVER_FIRST_CONNECT] != 0 && milestones[TS_MILESTONE_SERVER_FIRST_READ] == 0) { - // Check to see if client waited for the threshold - // to declare the origin server as down - ink_hrtime wait = Thread::get_hrtime() - milestones[TS_MILESTONE_SERVER_FIRST_CONNECT]; - if (wait < 0) { - wait = 0; - } - if (ink_hrtime_to_sec(wait) > t_state.txn_conf->client_abort_threshold) { - t_state.set_connect_fail(ETIMEDOUT); - do_hostdb_update_if_necessary(); - } - } - } -} - // void HttpSM::release_server_session() // // Called when we are not tunneling a response from the diff --git a/proxy/http/HttpSM.h b/proxy/http/HttpSM.h index 219b6d9921c..7513951b1df 100644 --- a/proxy/http/HttpSM.h +++ b/proxy/http/HttpSM.h @@ -517,7 +517,6 @@ class HttpSM : public Continuation, public PluginUserArgs void handle_http_server_open(); void handle_post_failure(); void mark_host_failure(HostDBInfo *info, time_t time_down); - void mark_server_down_on_client_abort(); void release_server_session(bool serve_from_cache = false); void set_ua_abort(HttpTransact::AbortState_t ua_abort, int event); int write_header_into_buffer(HTTPHdr *h, MIOBuffer *b); diff --git a/src/shared/overridable_txn_vars.cc b/src/shared/overridable_txn_vars.cc index 9a903a08d68..4b340298ae4 100644 --- a/src/shared/overridable_txn_vars.cc +++ b/src/shared/overridable_txn_vars.cc @@ -88,6 +88,7 @@ const std::unordered_map