[dnsdist] dnsdist[29321]: Marking downstream IP:53 as 'down'
Willis, Michael
Michael.Willis at cinbell.com
Wed Mar 23 22:07:35 UTC 2022
Working configuration with small cache and threaded for 4 cores.. for reference (v6 is an afterthought)
-- DNSdist ns1
-- Mike Willis 2-17-2022
-- Basic rules
-- If client passes base ACL and dynamic blocks/rate limits
-- Deliver traffic to NS1 if it is up
-- If not deliver traffic to NS2
----Set encrypton key for console-----------------------
setKey("redacted")
controlSocket('127.0.0.1:5199')
----Webserver/API config-------------------------------
---ACL is NMS OAM Natted Egress
webserver("x.x.x.237:8083")
setWebserverConfig({password="redacted", apiKey="redacted", acl="x.x.x.x.x/32"})
----- Local binds for DNS and ACLs --------------------
--ns1 public vip
addLocal("x.x.x.x:53", {reusePort=true})
addLocal("x.x.x.x:53", {reusePort=true})
addLocal("x.x.x.x:53", {reusePort=true})
addLocal("x.x.x.x:53", {reusePort=true})
--ns1 public
addLocal("x.x.x.x:53")
--ns1 V6 vip
addLocal("x:x::x:10")
--ns1 V6 Local
addLocal("x:x:x:x::1101")
--dnsdist01 V4 DMZ
addLocal("10.50.50.41:53")
-------------------------------------------------------
--ACLs HERE
setACL({'0.0.0.0/0', '::/0'})
-----------------------------------------------------
---Performance Tuning -------------------------------
--setRingBuffersSize(num[, numberOfShards])
setRingBuffersSize(500000,10)
--packet cache
pc = newPacketCache(10000, {maxTTL=14400, minTTL=900, temporaryFailureTTL=60, staleTTL=60, dontAge=false})
getPool("ns1"):setCache(pc)
pc = newPacketCache(10000, {maxTTL=14400, minTTL=900, temporaryFailureTTL=60, staleTTL=60, dontAge=false})
getPool("ns2"):setCache(pc)
----Dynamic blocking rules to mitigate abuse -----
--Note: For testing purposes, argument 2/time interval usually needs to elapse before the rule is evaluated and applied
--From the console ("dnsdist -c 127.0.0.1:5199")
--Run "showDynBlocks()" to show the active blocks
--Run "clearDynBlocks()" to clear all blocks
local dbr = dynBlockRulesGroup()
dbr:setQueryRate(1000, 10, "Exceeded query rate", 60)
dbr:setRCodeRate(DNSRCode.NXDOMAIN, 400, 10, "Exceeded NXD rate", 60)
dbr:setRCodeRate(DNSRCode.SERVFAIL, 500, 10, "Exceeded ServFail rate", 120)
dbr:setQTypeRate(DNSQType.ANY, 100, 10, "Exceeded ANY rate", 120)
dbr:setResponseByteRate(500000, 10, "Exceeded resp BW rate", 60)
function maintenance()
dbr:apply()
end
--Enable this if you want to give a response
--setDynBlocksAction(DNSAction.Refused)
--NOTE: Rules are processed in order, and some rules stop processing of additional rules
--IE: Some rules should be the last to run for a given flow.
----------------- Logging ----------------------
---This should be turned off in prod ---
--LogAction([filename[, binary[, append[, buffered[, verboseOnly[, includeTimestamp]]]]]])
--Note will not work if buffering is true
--addAction(AllRule(), LogAction("/var/log/dnsdist.log", false, true, false, false, true))
-------------------------------------------------
----- Pool Availability rules and failover ------
--Send traffic to ns1 if it is up
addAction(PoolAvailableRule("ns1"), PoolAction("ns1"))
--Send traffic to ns2 if ns1 is down
addAction(AllRule(), PoolAction("ns2"))
------------------------------------------------
----------- Load balanced servers and pool definitions ---------------
--ns1 infoblox
newServer({address="10.50.50.36", source="ens192", pool="ns1", checkType="A", checkType=DNSClass.IN, checkName="www.x.net.", mustResolve=true})
--ns2 infoblox
newServer({address="10.50.51.52", source="ens192", pool="ns2", checkType="A", checkType=DNSClass.IN, checkName="www.x.net.", mustResolve=true})
---------------------------------------------------------------------
________________________________
From: Willis, Michael <Michael.Willis at cinbell.com>
Sent: Wednesday, March 23, 2022 5:56 PM
To: dnsdist at mailman.powerdns.com <dnsdist at mailman.powerdns.com>; Rais Ahmed <rais.ahmed at tes.com.pk>; Willis, Michael <Michael.Willis at cinbell.com>
Subject: Re: [dnsdist] dnsdist[29321]: Marking downstream IP:53 as 'down'
OP,
I'm not an expert here by any sense...
In my humble opinion, you should be using pools and dynamic rules for the pools..
Do you have the ability to do Anycast via BGP and "ExaBGP"?... It works really well.
-yngmike
________________________________
From: dnsdist <dnsdist-bounces at mailman.powerdns.com> on behalf of Willis, Michael via dnsdist <dnsdist at mailman.powerdns.com>
Sent: Wednesday, March 23, 2022 5:27 PM
To: dnsdist at mailman.powerdns.com <dnsdist at mailman.powerdns.com>; Rais Ahmed <rais.ahmed at tes.com.pk>
Subject: Re: [dnsdist] dnsdist[29321]: Marking downstream IP:53 as 'down'
Bump...
I am personally interested in this as well. I'm trying to something similar albeit on a smaller scale.
-Mike
________________________________
From: dnsdist <dnsdist-bounces at mailman.powerdns.com> on behalf of Rais Ahmed via dnsdist <dnsdist at mailman.powerdns.com>
Sent: Wednesday, March 23, 2022 5:01 PM
To: dnsdist at mailman.powerdns.com <dnsdist at mailman.powerdns.com>
Subject: [dnsdist] dnsdist[29321]: Marking downstream IP:53 as 'down'
Hi,
Thanks for reply...!
We have configured setMaxUDPOutstanding(65535) and still we are seeing backend down, logs are showing frequently as below.
Timeout while waiting for the health check response from backend 192.168.1.1:53
Timeout while waiting for the health check response from backend 192.168.1.2:53
Please have a look at below dnsdist configuration and help us to find misconfiguration (16 Listeners & 8+8 backends added as per vCPUs available (2 Socket x 8 Cores):
controlSocket('127.0.0.1:5199')
setKey("")
---- Listen addresses
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
addLocal('192.168.0.1:53', { reusePort=true })
---- Back-end server
newServer({address='192.168.1.1', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=1})
newServer({address='192.168.1.1', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=2})
newServer({address='192.168.1.1', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=3})
newServer({address='192.168.1.1', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=4})
newServer({address='192.168.1.1', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=5})
newServer({address='192.168.1.1', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=6})
newServer({address='192.168.1.1', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=7})
newServer({address='192.168.1.1', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=8})
newServer({address='192.168.1.2', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=9})
newServer({address='192.168.1.2', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=10})
newServer({address='192.168.1.2', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=11})
newServer({address='192.168.1.2', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=12})
newServer({address='192.168.1.2', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=13})
newServer({address='192.168.1.2', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=14})
newServer({address='192.168.1.2', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=15})
newServer({address='192.168.1.2', maxCheckFailures=3, checkInterval=5, weight=4, qps=40000, order=16})
setMaxUDPOutstanding(65535)
---- Server Load Balancing Policy
setServerPolicy(leastOutstanding)
---- Web-server
webserver('192.168.0.1:8083')
setWebserverConfig({acl='192.168.0.0/24', password='Secret'})
---- Customers Policy
customerACLs={'192.168.1.0/24'}
setACL(customerACLs)
pc = newPacketCache(300000, {maxTTL=86400, minTTL=0,
temporaryFailureTTL=60, staleTTL=60, dontAge=false})
getPool(""):setCache(pc)
setVerboseHealthChecks(true)
Servers Specs are as below:
Dnsdist LB Server Specs: 16 vCPUs, 16 GB RAM, Virtio NIC (10G) with 16 Multiqueues.
Backend bind9 servers Specs: 16 vCPUs, 16GM RAM, Virtio NIC (10G) with 16 Multiqueues.
We are trying to handle 500K qps (will increase hardware specs, If required) or with above specs atleast 100K qps.
Regards,
Rais
-----Original Message-----
From: dnsdist <dnsdist-bounces at mailman.powerdns.com> On Behalf Of dnsdist-request at mailman.powerdns.com
Sent: Wednesday, March 23, 2022 5:00 PM
To: dnsdist at mailman.powerdns.com
Subject: dnsdist Digest, Vol 79, Issue 3
Send dnsdist mailing list submissions to
dnsdist at mailman.powerdns.com
To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.powerdns.com/mailman/listinfo/dnsdist
or, via email, send a message with subject or body 'help' to
dnsdist-request at mailman.powerdns.com
You can reach the person managing the list at
dnsdist-owner at mailman.powerdns.com
When replying, please edit your Subject line so it is more specific than "Re: Contents of dnsdist digest..."
Today's Topics:
1. dnsdist[29321]: Marking downstream IP:53 as 'down' (Rais Ahmed)
2. Re: dnsdist[29321]: Marking downstream IP:53 as 'down'
(Remi Gacogne)
----------------------------------------------------------------------
Message: 1
Date: Tue, 22 Mar 2022 23:00:25 +0000
From: Rais Ahmed <rais.ahmed at tes.com.pk>
To: "dnsdist at mailman.powerdns.com" <dnsdist at mailman.powerdns.com>
Subject: [dnsdist] dnsdist[29321]: Marking downstream IP:53 as 'down'
Message-ID:
<PAXPR08MB70737E4E1CCEFC4A7F61E1E6A0179 at PAXPR08MB7073.eurprd08.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
Hi,
We have configured dnsdist instance to handle around 500k QPS, but we are seeing downstream down frequently once QPS reached above 25k. below are the logs which we found to relative issue.
dnsdist[29321]: Marking downstream server1 IP:53 as 'down'
dnsdist[29321]: Marking downstream server2 IP:53 as 'down'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20220322/2befd6e2/attachment-0001.htm>
------------------------------
Message: 2
Date: Wed, 23 Mar 2022 10:32:22 +0100
From: Remi Gacogne <remi.gacogne at powerdns.com>
To: Rais Ahmed <rais.ahmed at tes.com.pk>, "dnsdist at mailman.powerdns.com"
<dnsdist at mailman.powerdns.com>
Subject: Re: [dnsdist] dnsdist[29321]: Marking downstream IP:53 as
'down'
Message-ID: <5a95cbeb-7c82-9bc1-0b4c-8726f814432e at powerdns.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Hi,
> We have configured dnsdist instance to handle around 500k QPS, but we > are seeing downstream down frequently once QPS reached above 25k. below > are the logs which we found to relative issue.
>
> dnsdist[29321]: Marking downstream server1 IP:53 as 'down'
>
> dnsdist[29321]: Marking downstream server2 IP:53 as 'down'
You might be able to get more information about why the health-checks are failing by adding setVerboseHealthChecks(true) to your configuration.
It usually happens because the backend is overwhelmed and needs to be tuned to handle the load, but it might also be caused by a network issue, like a link reaching its maximum capacity, or by dnsdist itself being overwhelmed and needing tuning (like increasing the number of
newServer() directives, see [1]).
[1]:
https://dnsdist.org/advanced/tuning.html#udp-and-incoming-dns-over-https
Best regards,
--
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/
------------------------------
Subject: Digest Footer
_______________________________________________
dnsdist mailing list
dnsdist at mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/dnsdist
------------------------------
End of dnsdist Digest, Vol 79, Issue 3
**************************************
_______________________________________________
dnsdist mailing list
dnsdist at mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/dnsdist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/dnsdist/attachments/20220323/0e9ef95b/attachment-0001.htm>
More information about the dnsdist
mailing list