Skip to content

Commit

Permalink
Reduce default dns cache ttl to ten seconds (from twenty) (#1636)
Browse files Browse the repository at this point in the history
Reduce default dns cache ttl to ten seconds (from twenty) to follow address changes more quickly
  • Loading branch information
carterkozak authored Apr 30, 2024
1 parent 7106e12 commit 93eb3d9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
6 changes: 6 additions & 0 deletions changelog/@unreleased/pr-1636.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: improvement
improvement:
description: Reduce default dns cache ttl to ten seconds (from twenty) to follow
address changes more quickly
links:
- https://github.com/palantir/sls-packaging/pull/1636
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ public final class LaunchConfig {
"-Djava.io.tmpdir=var/data/tmp",
"-XX:ErrorFile=var/log/hs_err_pid%p.log",
"-XX:HeapDumpPath=var/log",
// Set DNS cache TTL to 20s to account for systems such as RDS and other
// Set DNS cache TTL to 10s to account for systems such as RDS and other
// AWS-managed systems that modify DNS records on failover.
"-Dsun.net.inetaddr.ttl=20",
// We use a 10 second value matching the default negative cache ttl.
"-Dsun.net.inetaddr.ttl=10",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+IgnoreUnrecognizedVMOptions",
"-XX:NativeMemoryTracking=summary",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ class JavaServiceDistributionPluginTests extends GradleIntegrationSpec {
'-Djava.io.tmpdir=var/data/tmp',
'-XX:ErrorFile=var/log/hs_err_pid%p.log',
'-XX:HeapDumpPath=var/log',
'-Dsun.net.inetaddr.ttl=20',
'-Dsun.net.inetaddr.ttl=10',
'-XX:+UnlockDiagnosticVMOptions',
'-XX:+IgnoreUnrecognizedVMOptions',
'-XX:NativeMemoryTracking=summary',
Expand Down Expand Up @@ -487,7 +487,7 @@ class JavaServiceDistributionPluginTests extends GradleIntegrationSpec {
'-Djava.io.tmpdir=var/data/tmp',
'-XX:ErrorFile=var/log/hs_err_pid%p.log',
'-XX:HeapDumpPath=var/log',
'-Dsun.net.inetaddr.ttl=20',
'-Dsun.net.inetaddr.ttl=10',
'-XX:+UnlockDiagnosticVMOptions',
'-XX:+IgnoreUnrecognizedVMOptions',
'-XX:NativeMemoryTracking=summary',
Expand Down Expand Up @@ -539,7 +539,7 @@ class JavaServiceDistributionPluginTests extends GradleIntegrationSpec {
'-Djava.io.tmpdir=var/data/tmp',
'-XX:ErrorFile=var/log/hs_err_pid%p.log',
'-XX:HeapDumpPath=var/log',
'-Dsun.net.inetaddr.ttl=20',
'-Dsun.net.inetaddr.ttl=10',
'-XX:+UnlockDiagnosticVMOptions',
'-XX:+IgnoreUnrecognizedVMOptions',
'-XX:NativeMemoryTracking=summary',
Expand Down Expand Up @@ -569,7 +569,7 @@ class JavaServiceDistributionPluginTests extends GradleIntegrationSpec {
'-Djava.io.tmpdir=var/data/tmp',
'-XX:ErrorFile=var/log/hs_err_pid%p.log',
'-XX:HeapDumpPath=var/log',
'-Dsun.net.inetaddr.ttl=20',
'-Dsun.net.inetaddr.ttl=10',
'-XX:+UnlockDiagnosticVMOptions',
'-XX:+IgnoreUnrecognizedVMOptions',
'-XX:NativeMemoryTracking=summary',
Expand Down Expand Up @@ -612,7 +612,7 @@ class JavaServiceDistributionPluginTests extends GradleIntegrationSpec {
'-Djava.io.tmpdir=var/data/tmp',
'-XX:ErrorFile=var/log/hs_err_pid%p.log',
'-XX:HeapDumpPath=var/log',
'-Dsun.net.inetaddr.ttl=20',
'-Dsun.net.inetaddr.ttl=10',
'-XX:+UnlockDiagnosticVMOptions',
'-XX:+IgnoreUnrecognizedVMOptions',
'-XX:NativeMemoryTracking=summary',
Expand Down

0 comments on commit 93eb3d9

Please sign in to comment.