Skip to content

Commit

Permalink
Merge pull request #13964 from rgacogne/ddist-document-cache-hits-rin…
Browse files Browse the repository at this point in the history
…g-buffer

dnsdist: Document that cache hits go into the ring buffer since 1.8.0
  • Loading branch information
rgacogne committed Mar 22, 2024
2 parents 3753769 + 0c0b683 commit cd54c95
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pdns/dnsdistdist/docs/guides/dynblocks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Please see the documentation for :func:`setDynBlocksAction` to confirm which act
DynBlockRulesGroup
------------------

Starting with dnsdist 1.3.0, a new :ref:`dynBlockRulesGroup` function can be used to return a `DynBlockRulesGroup` instance,
Starting with dnsdist 1.3.0, a new :func:`dynBlockRulesGroup` function can be used to return a :class:`DynBlockRulesGroup` instance,
designed to make the processing of multiple rate-limiting rules faster by walking the query and response buffers only once
for each invocation, instead of once per existing `exceed*()` invocation.

Expand Down
9 changes: 9 additions & 0 deletions pdns/dnsdistdist/docs/reference/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,9 @@ faster than the existing rules.

.. method:: DynBlockRulesGroup:setRCodeRate(rcode, rate, seconds, reason, blockingTime [, action [, warningRate]])

.. note::
Cache hits are inserted into the in-memory ring buffers since 1.8.0, so they are now considered when computing the rcode rate.

Adds a rate-limiting rule for responses of code ``rcode``, equivalent to:
```
addDynBlocks(exceedServfails(rcode, rate, seconds), reason, blockingTime, action)
Expand All @@ -1744,6 +1747,9 @@ faster than the existing rules.

.. versionadded:: 1.5.0

.. note::
Cache hits are inserted into the in-memory ring buffers since 1.8.0, so they are now considered when computing the rcode ratio.

Adds a rate-limiting rule for the ratio of responses of code ``rcode`` over the total number of responses for a given client.

:param int rcode: The response code
Expand Down Expand Up @@ -1772,6 +1778,9 @@ faster than the existing rules.

.. method:: DynBlockRulesGroup:setResponseByteRate(rate, seconds, reason, blockingTime [, action [, warningRate]])

.. note::
Cache hits are inserted into the in-memory ring buffers since 1.8.0, so they are now considered when computing the bandwidth rate.

Adds a bandwidth rate-limiting rule for responses, equivalent to:
```
addDynBlocks(exceedRespByterate(rate, seconds), reason, blockingTime, action)
Expand Down
2 changes: 2 additions & 0 deletions pdns/dnsdistdist/docs/upgrade_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Responses to AXFR and IXFR queries are no longer cached.

Cache-hits are now counted as responses in our metrics.

Cache hits are now inserted into the in-memory ring buffers, while before 1.8.0 only cache misses were inserted. This has a very noticeable impact on :doc:`guides/dynblocks` since cache hits now considered when computing the rcode rates and ratios, as well as the response bandwidth rate.

The :func:`setMaxTCPConnectionsPerClient` limit is now properly applied to DNS over HTTPS connections, in addition to DNS over TCP and DNS over TLS ones.

The configuration check will now fail if the configuration file does not exist. For this reason we now create a default configuration file, based on the file previously called ``dnsdistconf.lua``, which contains commented-out examples of how to set up dnsdist.
Expand Down

0 comments on commit cd54c95

Please sign in to comment.