I'm looking to use nginx as a reverse proxy cache with ssl support. So far everything is awesome. The last piece of the puzzle is that I need to address a somewhat simple problem - least connection based load balancing with session persistence.
Pretty basic, and I've done my research - but have one final question.
The upstream module seems to support both pieces, but possibly not together. What I would like is a way to load balance based on least connections, and then guarantee that once a session is begun they are sent to the same backend server for the remainder of their visit.
It looks like the upstream module supports this with ip_hash and least_conn, but it doesn't say that it supports them TOGETHER.
The other alternative is to utilize technology from third party add-ons:
Upstream Fair Balancer will do the least connection load balancing - http://wiki.nginx.org/HttpUpstreamFairModule
Sticky Upstream will set a cookie and do the routing - http://code.google.com/p/nginx-sticky-module/
If I can get this same functionality with ip_hash and least_conn I am happy to use it, but it doesn't seem that they can be used together. Am I incorrect in that assumption? Can they be used together? Or would it be better to use the third party add-ons? I'm looking for a simple answer here, but more than happy to discuss the benefits of both scenarios and appreciate your response.