Hello,
Fabio seems amazing but I was wonder if there was sticky session aka session affinity support, I haven't found anything in the documentation that mentions this.
Reason is that I have an application that requires the user to always be sent to the same physical machine, much like Amazon does with their sticky session option.
For example: http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-sticky-sessions.html
Thanks again and keep up the great work!
Hi @EvertMDC, I don't have plans to support this at the moment. Mostly because sticky sessions cause more problems than they solve. I suggest to fix the application.
The main problem with fabio is that is intended to be used in a highly dynamic environment where instances come and go regularly. A cluster of fabio instances does not share state so the sticky routing would have to be stateless and deterministic in such an environment. I could hash the source ip or a cookie, modulo it by number of instances and send it to the resulting instances. But during restarts of services users would be sent to the wrong server, basically invalidating their session.
So my suggestion is still to fix your app.
Ok thank you for the explanation.
I could hash the source ip or a cookie, modulo it by number of instances and send it to the resulting instances.
I was searching for source ip hashing in the documentation because I need this feature :)
This would be a good alternative for those clients which need to stick with one server.
Most helpful comment
Hi @EvertMDC, I don't have plans to support this at the moment. Mostly because sticky sessions cause more problems than they solve. I suggest to fix the application.
The main problem with fabio is that is intended to be used in a highly dynamic environment where instances come and go regularly. A cluster of fabio instances does not share state so the sticky routing would have to be stateless and deterministic in such an environment. I could hash the source ip or a cookie, modulo it by number of instances and send it to the resulting instances. But during restarts of services users would be sent to the wrong server, basically invalidating their session.
So my suggestion is still to fix your app.