mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
OSDOCS-3860: add dns cache tuning
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
f2a6355b37
commit
595f63ea94
40
modules/nw-dns-cache-tuning.adoc
Normal file
40
modules/nw-dns-cache-tuning.adoc
Normal file
@@ -0,0 +1,40 @@
|
||||
// Module included in the following assemblies:
|
||||
// * networking/dns-operator.adoc
|
||||
|
||||
:_content-type: PROCEDURE
|
||||
[id="nw-dns-cache-tuning_{context}"]
|
||||
= Tuning the CoreDNS cache
|
||||
|
||||
You can configure the maximum duration of both successful or unsuccessful caching, also known as positive or negative caching respectively, done by CoreDNS. Tuning the duration of caching of DNS query responses can reduce the load for any upstream DNS resolvers.
|
||||
|
||||
.Procedure
|
||||
|
||||
. Edit the DNS Operator object named `default` by running the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc edit dns.operator.openshift.io/default
|
||||
----
|
||||
|
||||
. Modify the time-to-live (TTL) caching values:
|
||||
+
|
||||
.Configuring DNS caching
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: operator.openshift.io/v1
|
||||
kind: DNS
|
||||
metadata:
|
||||
name: default
|
||||
spec:
|
||||
cache:
|
||||
successTTL: 1h <1>
|
||||
denialTTL: 0.5h10m <2>
|
||||
----
|
||||
+
|
||||
<1> The string value `1h` is converted to its respective number of seconds by CoreDNS. If this field is omitted, the value is assumed to be `0s` and the cluster uses the internal default value of `900s` as a fallback.
|
||||
<2> The string value can be a combination of units such as `0.5h10m` and is converted to its respective number of seconds by CoreDNS. If this field is omitted, the value is assumed to be `0s` and the cluster uses the internal default value of `30s` as a fallback.
|
||||
+
|
||||
[WARNING]
|
||||
====
|
||||
Setting TTL fields to low values could lead to an increased load on the cluster, any upstream resolvers, or both.
|
||||
====
|
||||
@@ -27,3 +27,5 @@ include::modules/nw-dns-operator-logs.adoc[leveloffset=+1]
|
||||
include::modules/nw-dns-loglevel.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/nw-dns-operatorloglevel.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/nw-dns-cache-tuning.adoc[leveloffset=+1]
|
||||
|
||||
Reference in New Issue
Block a user