From 2b457561b14b945c449915014ccc1584763fff4e Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Fri, 1 Dec 2023 16:29:22 +0100 Subject: [PATCH] fix formatting --- docs/lua-records/functions.rst | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/lua-records/functions.rst b/docs/lua-records/functions.rst index 4fbab90bcc..87fac2054a 100644 --- a/docs/lua-records/functions.rst +++ b/docs/lua-records/functions.rst @@ -230,27 +230,25 @@ Record creation functions .. function:: picknamehashed(values) - Based on the hash of the DNS record name, returns a string from the list - supplied, as weighted by the various ``weight`` parameters. + Based on the hash of the DNS record name, returns a string from the list supplied, as weighted by the various ``weight`` parameters. Performs no uptime checking. :param values: table of weight, string (such as IPv4 or IPv6 address). - This allows basic persistent load balancing across a number of backends. It means that - test.mydomain.example.com will always resolve to the same IP, but test2.mydomain.example.com - may go elsewhere. This function is only useful for wildcard records. + This allows basic persistent load balancing across a number of backends. + It means that ``test.mydomain.example.com`` will always resolve to the same IP, but ``test2.mydomain.example.com`` may go elsewhere. + This function is only useful for wildcard records. - This works similar to round-robin load balancing, but has the advantage of making traffic - for the same domain always end up on the same server which can help cache hit rates. + This works similar to round-robin load balancing, but has the advantage of making traffic for the same domain always end up on the same server which can help cache hit rates. This function also works for CNAME or TXT records. An example:: *.mydomain.example.com IN LUA A ("picknamehashed({ " - " {15, "192.0.2.1"}, " - " {100, "198.51.100.5"} " - "}) ") + " {15, "192.0.2.1"}, " + " {100, "198.51.100.5"} " + "}) ") .. function:: pickwrandom(values) -- 2.47.2