Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport -> release/3.2.x] feat(templates): bump dns_stale_ttl default to 1 hour #12169

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/bump_dns_stale_ttl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: Bump `dns_stale_ttl` default to 1 hour so stale DNS record can be used for longer time in case of resolver downtime.
type: performance
scope: Configuration
4 changes: 3 additions & 1 deletion kong.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -1507,14 +1507,16 @@ G# -----------------------
# property receives a value (in seconds), it
# will override the TTL for all records.

#dns_stale_ttl = 4 # Defines, in seconds, how long a record will
#dns_stale_ttl = 3600 # Defines, in seconds, how long a record will
# remain in cache past its TTL. This value
# will be used while the new DNS record is
# fetched in the background.
# Stale data will be used from expiry of a
# record until either the refresh query
# completes, or the `dns_stale_ttl` number of
# seconds have passed.
# This configuration enables Kong to be more
# resilient during resolver downtime.

#dns_cache_size = 10000 # Defines the maximum allowed number of
# DNS records stored in memory cache.
Expand Down
2 changes: 1 addition & 1 deletion kong/templates/kong_defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ dns_resolver = NONE
dns_hostsfile = /etc/hosts
dns_order = LAST,SRV,A,CNAME
dns_valid_ttl = NONE
dns_stale_ttl = 4
dns_stale_ttl = 3600
dns_cache_size = 10000
dns_not_found_ttl = 30
dns_error_ttl = 1
Expand Down