response-rate-limiting - "window" explained?

Tony Finch dot at dotat.at
Tue Jan 9 16:11:29 UTC 2018


Tom <tomtux007 at gmail.com> wrote:
>
> Slip is set to "0" (always drop). After stopping the flood, I'm immediately
> able to query the same record (www.example.com) with a positive answer. Does
> the "window 5;" or "window 30;" or "window 3600;" possibly has no effect?

The script below works for me. My server is configured with

	responses-per-second 2;
	slip 0;

The script "floods" at 10 qps for 15 seconds (enough to fill the window),
then drops to 1qps and times how long it takes to recover. At the end it
says the recovery time was 20 seconds. This is a bit more than the window
size because I wasn't completely quiet during the recovery time.

################################################################

#!/bin/sh

set -eu

dig='dig +ignore +tries=1 +timeout=1 +norec dotat.at @grey.dotat.at'

start=$(date +%s)

while [ $(date +%s) -lt $(($start + 15)) ]
do
	$dig | grep aa &
	sleep 0.1
done

end=$(date +%s)

while ! $dig | grep aa
do
	:;
done

echo $(( $(date +%s) - $end ))

################################################################

Tony.
-- 
f.anthony.n.finch  <dot at dotat.at>  http://dotat.at/  -  I xn--zr8h punycode
Irish Sea: Southeast 5 to 7, becoming cyclonic 4 or 5 later. Moderate or
rough, becoming slight or moderate. Occasional rain. Good, occasionally poor.


More information about the bind-users mailing list