<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi<br>
</p>
<div class="moz-cite-prefix">On 22/07/2019 09.25, Jacob Bunk Nielsen
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:07522338-a739-c942-07f2-20fcab973612@one.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
I've been reading up on the documentation for MaxQPSIPRule() which
you can use to implement rate limits on DNS queries. A very nice
feature.
<p>It has a burst option which will allow clients to have bursts
of queries, but it's not very clear to me exactly what it means.
The documentation says:</p>
<p>"<strong>burst</strong><span> </span>(<em>int</em>) – The
number of burstable queries per second allowed. Default is same
as qps"</p>
</blockquote>
<p>I tried to have a quick view of the code and now understand this
wording better, I think.</p>
<blockquote type="cite"
cite="mid:07522338-a739-c942-07f2-20fcab973612@one.com">
<p>So let's say I create a rule like:</p>
<p>addAction(MaxQPSIPRule(5, 32, 64, 10), DelayAction(100))</p>
<p>This should delay any queries that exceed 5 per second with a
burst of 10 allowed.</p>
</blockquote>
<p>As I read the code, this would allow 10 queries as fast as you
could send them for every second. So that would effectively mean a
rate limit of 10 QPS and not 5, so it never makes sense to set
burst higher than the allowed rate. That rule would make much more
sense like:</p>
<p>addAction(MaxQPSIPRule(5, 32, 64, 3), DelayAction(100))</p>
<p>Which would mean rate limiting to 5 QPS, but allow the first 3 as
fast as you want.</p>
<p>Did I get this right?<br>
</p>
<p>Best regards,</p>
<p>Jacob<br>
</p>
</body>
</html>