From 06424dcce3600d403f5e9f7d168afc7e9d7eb1e1 Mon Sep 17 00:00:00 2001 From: Andy Zhang Date: Thu, 18 Jul 2024 21:08:59 +0800 Subject: [PATCH] Revert "perf(proxy): use higher default keepalive request value for Nginx tuning (#12223)" This reverts commit 609874f103b67633ce515cda1c98cb4c00043a50. --- CHANGELOG/unreleased/kong/optimize_keepalive_parameters.yml | 3 --- kong.conf.default | 2 +- kong/templates/kong_defaults.lua | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 CHANGELOG/unreleased/kong/optimize_keepalive_parameters.yml diff --git a/CHANGELOG/unreleased/kong/optimize_keepalive_parameters.yml b/CHANGELOG/unreleased/kong/optimize_keepalive_parameters.yml deleted file mode 100644 index 49ec8baf6d4f..000000000000 --- a/CHANGELOG/unreleased/kong/optimize_keepalive_parameters.yml +++ /dev/null @@ -1,3 +0,0 @@ -message: Bumped default values of `nginx_http_keepalive_requests` and `upstream_keepalive_max_requests` to `10000`. -type: performance -scope: Configuration diff --git a/kong.conf.default b/kong.conf.default index c555bc71259a..0d6f1e7123a3 100644 --- a/kong.conf.default +++ b/kong.conf.default @@ -939,7 +939,7 @@ # at worst any regex Kong executes could finish within # roughly 2 seconds. -#nginx_http_keepalive_requests = 10000 # Sets the maximum number of client requests that can be served through one +#nginx_http_keepalive_requests = 1000 # Sets the maximum number of client requests that can be served through one # keep-alive connection. After the maximum number of requests are made, # the connection is closed. # Closing connections periodically is necessary to free per-connection diff --git a/kong/templates/kong_defaults.lua b/kong/templates/kong_defaults.lua index 7dba9776c3e5..8046bd80bcde 100644 --- a/kong/templates/kong_defaults.lua +++ b/kong/templates/kong_defaults.lua @@ -55,7 +55,7 @@ trusted_ips = NONE error_default_type = text/plain upstream_keepalive = NONE upstream_keepalive_pool_size = 512 -upstream_keepalive_max_requests = 10000 +upstream_keepalive_max_requests = 1000 upstream_keepalive_idle_timeout = 60 nginx_user = kong kong @@ -76,7 +76,7 @@ nginx_http_ssl_dhparam = NONE nginx_http_ssl_session_tickets = NONE nginx_http_ssl_session_timeout = NONE nginx_http_lua_regex_match_limit = 100000 -nginx_http_keepalive_requests = 10000 +nginx_http_keepalive_requests = 1000 nginx_stream_ssl_protocols = NONE nginx_stream_ssl_prefer_server_ciphers = NONE nginx_stream_ssl_dhparam = NONE