]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc: add price-factor to views
authorLukáš Ondráček <lukas.ondracek@nic.cz>
Wed, 15 Jan 2025 16:26:12 +0000 (17:26 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Sun, 19 Jan 2025 18:40:58 +0000 (19:40 +0100)
doc/user/config-defer.rst
doc/user/config-rate-limiting.rst
doc/user/config-views.rst

index 0b948a166d211d32cf6125be32213dbda9e0a731..4d26ee403c21f2637bde85de7c76cd545789d6d7 100644 (file)
@@ -17,6 +17,8 @@ if there are enough requests of both types.
 
 Detailed configuration is printed by ``defer`` group on ``info`` level on startup (unless disabled).
 
+The limits can be adjusted for different packet origins using :option:`price-factor <price-factor: <float>` in :ref:`views <config-views>`.
+
 .. note::
 
    The data of all deferred queries may occupy 64 MiB of memory per :ref:`worker <config-multiple-workers>`.
index 35342bf9eeac517755a5e2a501ad34941bfb1a85..41984e40a020ac2da3a3b4477e97b43a8a55bb9d 100644 (file)
@@ -19,6 +19,7 @@ for more in depth introduction to this section,
 but beware that the *soft limit* was dropped in favor of the *slip* mechanism
 that's common in other DNS servers.
 
+The limits can be adjusted for different packet origins using :option:`price-factor <price-factor: <float>` in :ref:`views <config-views>`.
 
 .. option:: rate-limiting/rate-limit: <int>
 
index ed73de02f0cab812e1b1ddbe53d74ffdbc9c6b5a..f8de1fe2a40a4a1d4d240b0b1b515065161c4dbb 100644 (file)
@@ -97,3 +97,20 @@ Actions
 
          Enable/disable DNS64.
 
+      .. option:: price-factor: <float>
+
+          :default: 1.0
+
+          Multiplies prices of operations in :ref:`rate limiting <config-rate-limiting>` and :ref:`defer <config-defer>`;
+          i.e. the number of queries is multiplied by the value for rate limiting and the measured time for defer.
+          In other words, we can say that
+          both :option:`instant-limit <rate-limiting/instant-limit: <int>` and :option:`rate-limit <rate-limiting/rate-limit: <int>`
+          are divided by the value and similarly all limits are divided for defer.
+
+          Use ``0.0`` to never use rate limiting and always assign the highest priority level in defer.
+
+          .. warning::
+
+            The effect on defer may be currently limited,
+            because some of the measured operations on incoming data occur before processing views
+            and the default :option:`price-factor <price-factor: <float>` value is thus used for them.