Greetings Hugo,
On 03/15/2016 09:25 AM, Hugo Maia wrote:
Hi, my name is Hugo.
I'm currently using Haproxy 1.5, I have a backend with 2 servers. My
app servers receive connection from two clients and I want both of
them to be attributed to the same server. All connections have a url
parameter X and sessions that should be attributed to the same server
have the same url parameter X value. I use a stick table to save the
server that a particular url parameter value uses so that future
connections can be attributed to the same server.
I want to be able to add app servers as load increases. In order to
instruct haproxy to move previous connections to the new app server I
need to expire stick table entries when no session (of either client)
is active in the server.
Table values can be changed by sending "set table <table> key <key>
data.<type> <value>" to the HAProxy socket ('socat stdio
/var/run/haproxy.sock'). "table" is the name of the section the table
is in, "key" is the key in the table, "type" is the datatype set in the
type argument to stick table (integer/ip/string/etc), and "value" is
what you want the value to be set to.
I don't think there is a good way to delete/expire stick table entires
via the socket, however (entirely possible there is and I just
overlooked it once I latched onto changing values).
So if I'm reading your problem correctly you should be able to have a
script change the value it wanted to expire to the new server instead of
removing it.
- Chad
Can you help me with this?
Thanks in advance for any kind of help.
Best Regards,
Hugo Maia