Skip to content

Commit

Permalink
Merge pull request #158 from DasSkelett/dnsdist-chashed
Browse files Browse the repository at this point in the history
dnsdist: set backend server selection policy to chashed to optimize cache usage
  • Loading branch information
GoliathLabs authored Mar 20, 2024
2 parents 3f257b2 + 793ad96 commit e0f592f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions dnsdist/dnsdist.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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', []) %}
Expand Down

0 comments on commit e0f592f

Please sign in to comment.