]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] Add rdp_cookie pattern fetch function
authorSimon Horman <horms@verge.net.au>
Fri, 24 Jun 2011 05:50:20 +0000 (14:50 +0900)
committerWilly Tarreau <w@1wt.eu>
Sat, 25 Jun 2011 19:07:02 +0000 (21:07 +0200)
commitab814e0a6b729ad2d08c329e159f0e743633bb11
treeeb098c7f414e3312206961ddd473df7449a568ec
parente869176486091c681fe8c6a33f3c2182f9a91189
[MINOR] Add rdp_cookie pattern fetch function

This pattern fetch function extracts the value of the rdp cookie <name> as
a string and uses this value to match. This enables implementation of
persistence based on the mstshash cookie. This is typically done if there
is no msts cookie present.

This differs from "balance rdp-cookie" in that any balancing algorithm may
be used and thus the distribution of clients to backend servers is not
linked to a hash of the RDP cookie. It is envisaged that using a balancing
algorithm such as "balance roundrobin" or "balance leastconnect" will lead
to a more even distribution of clients to backend servers than the hash
used by "balance rdp-cookie".

Example :
listen tse-farm
    bind 0.0.0.0:3389
    # wait up to 5s for an RDP cookie in the request
    tcp-request inspect-delay 5s
    tcp-request content accept if RDP_COOKIE
    # apply RDP cookie persistence
    persist rdp-cookie
    # Persist based on the mstshash cookie
    # This is only useful makes sense if
    # balance rdp-cookie is not used
    stick-table type string size 204800
    stick on rdp_cookie(mstshash)
    server srv1 1.1.1.1:3389
    server srv1 1.1.1.2:3389
doc/configuration.txt
src/proto_tcp.c