Skip to content

Commit

Permalink
perf(proxy): use more reasonable keepalive default value for Nginx tu…
Browse files Browse the repository at this point in the history
…ning

Bumped default values of `nginx_http_keepalive_requests` and
`upstream_keepalive_max_requests` to `10000`.

KAG-3360
  • Loading branch information
chobits authored and dndx committed Dec 21, 2023
1 parent 329e0ef commit 6574d87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/optimize_keepalive_parameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: Bumped default values of `nginx_http_keepalive_requests` and `upstream_keepalive_max_requests` to 10000.
type: performance
scope: Configuration
2 changes: 1 addition & 1 deletion kong.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@
# not make use of the PCRE library and their behavior
# is unaffected by this setting.

#nginx_http_keepalive_requests = 1000 # Sets the maximum number of client requests that can be served through one
#nginx_http_keepalive_requests = 10000 # 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
Expand Down
4 changes: 2 additions & 2 deletions kong/templates/kong_defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ headers_upstream = x-kong-request-id
trusted_ips = NONE
error_default_type = text/plain
upstream_keepalive_pool_size = 512
upstream_keepalive_max_requests = 1000
upstream_keepalive_max_requests = 10000
upstream_keepalive_idle_timeout = 60
allow_debug_header = off
Expand All @@ -93,7 +93,7 @@ nginx_http_ssl_session_tickets = NONE
nginx_http_ssl_session_timeout = NONE
nginx_http_lua_regex_match_limit = 100000
nginx_http_lua_regex_cache_max_entries = 8192
nginx_http_keepalive_requests = 1000
nginx_http_keepalive_requests = 10000
nginx_stream_ssl_protocols = NONE
nginx_stream_ssl_prefer_server_ciphers = NONE
nginx_stream_ssl_dhparam = NONE
Expand Down

0 comments on commit 6574d87

Please sign in to comment.