response-rate-limiting - "window" explained?

Tom tomtux007 at gmail.com
Wed Jan 10 06:08:42 UTC 2018



On 01/09/2018 05:11 PM, Tony Finch wrote:
> 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.
> 

Many thanks for this hint/script. The rate-limit works as explained. My 
misunderstanding was, that I didn't set the query-process(es) in the 
background.
Kind regards,
Tom

> ################################################################
> 
> #!/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.
> 


More information about the bind-users mailing list