MINOR: server: Add dynamic session cookies.
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 14 Mar 2017 19:01:29 +0000 (20:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 Mar 2017 10:37:30 +0000 (11:37 +0100)
commit4e694049fad08fc7afccac227d547c32bb537454
treeea0347020798bc01600a3d4dae5d32eb10e21312
parent7bf3fa3c23f6a1b7ed1212783507ac50f7e27544
MINOR: server: Add dynamic session cookies.

This adds a new "dynamic" keyword for the cookie option. If set, a cookie
will be generated for each server (assuming one isn't already provided on
the "server" line), from the IP of the server, the TCP port, and a secret
key provided. To provide the secret key, a new keyword as been added,
"dynamic-cookie-key", for backends.

Example :
backend bk_web
  balance roundrobin
  dynamic-cookie-key "bla"
  cookie WEBSRV insert dynamic
  server s1 127.0.0.1:80 check
  server s2 192.168.56.1:80 check

This is a first step to be able to dynamically add and remove servers,
without modifying the configuration file, and still have all the load
balancers redirect the traffic to the right server.

Provide a way to generate session cookies, based on the IP address of the
server, the TCP port, and a secret key provided.
doc/configuration.txt
include/proto/server.h
include/types/proxy.h
include/types/server.h
src/cfgparse.c
src/server.c