airbnb/synapse — pull request #50 by patrickviet (2014-03-19 16:18:10+00:00)
Title: Support cookie-based sticky sessions

Hey guys,

To have sticky sessions, we need to have a unique per server cookie content, per backend, ie.

```
backend somebackend
cookie BALANCEID insert indirect
server srv1 ipaddr:port cookie uniquename1 otheroptions
server srv2 ipaddr:port cookie uniquename2 otheroptions
```

Currently there is no way to do this with synapse.
This patch allows to put a unique name as {md5cookie} in the configuration and generate the actual content.

practical usage:
- in listen options, add a line ```cookie NAMEOFCOOKIE insert indirect``` - or whatever other option you want
- in server_options, add ```cookie {md5cookie}``` before the other options (ie. before ```check inter 5s fastinter 2s downinter 3s rise 3 fall 2```) or something like that.

That's all