]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: peers: Update for dictionary cache entries for peers protocol.
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 6 Jun 2019 13:53:20 +0000 (15:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Jun 2019 13:47:54 +0000 (15:47 +0200)
Add information about how the peers protocol send/receive entries of
LRU caches for literal dictionaries (e.g. server names in replacement
for server IDs).

doc/peers.txt

index 58df236bb7e3428ddc9c792c91af8dc25a2dd555..d9e9dcd9e8ba59d716d3366c73036238ca7d1150 100644 (file)
        +xxxxxxxxxxxxxxxxxxxx+xxxxxxxxxxxxxxxxxxxx+      +xxxxxxxxxxxxxxxxxxxx+
 
 
+     Most of these fields are internally stored as uint32_t (see STD_T_SINT,
+     STD_T_UINT, STD_T_ULL C enumerations) or structures made of several uint32_t
+     (see STD_T_FRQP C enumeration). The remaining one STD_T_DICT is internally
+     used to store entries of LRU caches for others literal dictionary entries
+     (couples of IDs associated to strings). It is used to transmit these cache
+     entries as follows:
+
+                    +xxxxxxxxxxx+xxxx+xxxxxxxxxxxxxxx+========+
+                    |   length  | ID | string length | string |
+                    +xxxxxxxxxxx+xxxx+xxxxxxxxxxxxxxx+========+
+
+     "length" is the length in bytes of the remaining data after this "length" field.
+     "string length" is the length of "string" field which follows.
+
+     Here the cache is used so that not to have to send again and again an already
+     sent string. Indeed, the second time we have to send the same dictionary entry,
+     if still cached, a peer sends only its ID:
+
+                              +xxxxxxxxxxx+xxxx+
+                              |   length  | ID |
+                              +xxxxxxxxxxx+xxxx+
 
      - Update message acknowledgement format: