]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: Explanation of be_name and be_id fetches
authorSébastien Gross <sgross@haproxy.com>
Wed, 23 Aug 2023 09:49:11 +0000 (05:49 -0400)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Aug 2023 13:54:30 +0000 (15:54 +0200)
The be_name and be_id fetches contain data related to the current
backend and can be used in frontend responses. Yet, in cases where
no backend is used due to a local response or backend selection
failure, these fetches retain details of the current frontend.

This patch enhances the clarity of the values provided by these
fetches.

Signed-off-by: Sébastien Gross <sgross@haproxy.com>
doc/configuration.txt

index 73204b084c1fc2b643cfbf8cc7b9e0f9f2b73f51..31ff1b9850fea6b296f779bbe838d4f379e15ffc 100644 (file)
@@ -19959,13 +19959,16 @@ bc_src_port : integer
 
 be_id : integer
   Returns an integer containing the current backend's id. It can be used in
-  frontends with responses to check which backend processed the request. It can
-  also be used in a tcp-check or an http-check ruleset.
+  frontends with responses to check which backend processed the request. If
+  used in a frontend and no backend was used, it returns the current
+  frontend's id. It can also be used in a tcp-check or an http-check ruleset.
 
 be_name : string
   Returns a string containing the current backend's name. It can be used in
-  frontends with responses to check which backend processed the request. It can
-  also be used in a tcp-check or an http-check ruleset.
+  frontends with responses to check which backend processed the request. If
+  used in a frontend and no backend was used, it returns the current
+  frontend's name. It can also be used in a tcp-check or an http-check
+  ruleset.
 
 bc_rtt(<unit>) : integer
   Returns the Round Trip Time (RTT) measured by the kernel for the backend
@@ -23663,7 +23666,8 @@ Please refer to the table below for currently defined variables :
   |   | %ac  | actconn                                              |         |
   |   |      | %[act_conn]                                          | numeric |
   +---+------+------------------------------------------------------+---------+
-  |   | %b   | backend_name                                         | string  |
+  |   | %b   | backend_name                                         |         |
+  |   |      | %[be_name]                                           | string  |
   +---+------+------------------------------------------------------+---------+
   |   | %bc  | beconn      (backend concurrent connections)         | numeric |
   +---+------+------------------------------------------------------+---------+