From 793ad9699cb622d14edf009397a81684c7330620 Mon Sep 17 00:00:00 2001 From: DasSkelett Date: Thu, 14 Mar 2024 20:51:06 +0100 Subject: [PATCH] dnsdist: set backend server selection policy to chashed to optimize cache usage --- dnsdist/dnsdist.conf.j2 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dnsdist/dnsdist.conf.j2 b/dnsdist/dnsdist.conf.j2 index 7ce171f..18e885d 100644 --- a/dnsdist/dnsdist.conf.j2 +++ b/dnsdist/dnsdist.conf.j2 @@ -77,21 +77,21 @@ end setRingBuffersSize(100000) {%- if 'muc01' in salt['pillar.get']('netbox:site:slug') %} -newServer({address="10.8.0.39:1653", name="web05", weight=3, retries=2, id="7cd4655e-071e-4a9a-9623-834ba49ea472", sockets=6}) -newServer({address="10.8.0.40:1653", name="web06", weight=3, retries=2, id="d5d0a3a9-6787-479f-ad0f-106d4618ccc2", sockets=6}) -newServer({address="10.8.0.38:1653", name="gw06", weight=3, retries=2, id="42c4bdfe-0ccc-4e9e-8816-7f88421b50f8", sockets=6}) -newServer({address="10.8.0.13:1653", name="gw07", weight=3, retries=2, id="1c961f33-3a09-4b40-ae9d-5b5a8dd71061", sockets=6}) +newServer({address="10.8.0.39:1653", name="web05", weight=500, retries=2, id="7cd4655e-071e-4a9a-9623-834ba49ea472", sockets=6}) +newServer({address="10.8.0.40:1653", name="web06", weight=500, retries=2, id="d5d0a3a9-6787-479f-ad0f-106d4618ccc2", sockets=6}) +newServer({address="10.8.0.38:1653", name="gw06", weight=500, retries=2, id="42c4bdfe-0ccc-4e9e-8816-7f88421b50f8", sockets=6}) +newServer({address="10.8.0.13:1653", name="gw07", weight=500, retries=2, id="1c961f33-3a09-4b40-ae9d-5b5a8dd71061", sockets=6}) {%- elif 'vie01' in salt['pillar.get']('netbox:site:slug') %} -newServer({address="10.8.0.29:1653", name="web03", weight=3, retries=2, id="23b0121d-91c5-4338-8c5a-cc8ba6f2ca8d", sockets=6}) -newServer({address="10.8.0.30:1653", name="web04", weight=3, retries=2, id="0ed35651-7766-492c-ab44-562e76d395b6", sockets=6}) -newServer({address="10.8.0.32:1653", name="gw04", weight=3, retries=2, id="fec91b13-6d71-4162-92a5-68c197ee99c4", sockets=6}) -newServer({address="10.8.0.33:1653", name="gw05", weight=3, retries=2, id="24d189ad-2070-458d-b34a-7c0c22ba7bcd", sockets=6}) +newServer({address="10.8.0.29:1653", name="web03", weight=500, retries=2, id="23b0121d-91c5-4338-8c5a-cc8ba6f2ca8d", sockets=6}) +newServer({address="10.8.0.30:1653", name="web04", weight=500, retries=2, id="0ed35651-7766-492c-ab44-562e76d395b6", sockets=6}) +newServer({address="10.8.0.32:1653", name="gw04", weight=500, retries=2, id="fec91b13-6d71-4162-92a5-68c197ee99c4", sockets=6}) +newServer({address="10.8.0.33:1653", name="gw05", weight=500, retries=2, id="24d189ad-2070-458d-b34a-7c0c22ba7bcd", sockets=6}) {%- else %} newServer({address="1.1.1.1", name="anycastCF"}) {%- endif %} setWHashedPertubation(3962345) -setServerPolicy(wrandom) +setServerPolicy(chashed) -- ask authorative servers for ffmuc.net directly {%- if 'authorative-dns' in salt['pillar.get']('netbox:tag_list', []) %}