Forum Discussion

mbyerly_59620's avatar
Icon for Nimbostratus rankNimbostratus
Jan 20, 2012

User Repinning





Does anyone have a good example on how to accomplish what is outlined here?







The solution is to repurpose stateless user pinning as used by HAProxy to let the web tier rebalance requests as it pleases. We plan on hijacking the cookie mechanisms in haproxy and setting the cookies from the webservers themselves instead of injecting it from the proxy.








I was thinking of taking the easy route (or what I think is the easy route) and attempting to use the 'cookie' persistence profile and setting the method to 'HTTP Cookie Passive', and letting the developers go hog wild.




Basic flow for a new connection described to me by the developers:


I apologize if there are gaps, but this is the general outline that follows what is going on with HAproxy in the URL example above.




1) Initial connection to the VS.


2) If no cookie is set, then the web server will determine a pool member to use and generate a cookie with SERVERID.


3) Cookie is set for return traffic, user will now go to the pool member set in the SERVERID cookie.


4) If concurrent connections > '32' for the particular pool member then revert to selecting a server in a round-robin fashion.





So I guess my question is, is there a cleaner way to do this through a iRule instead of what I proposed with the using a 'cookie' persistence profile and the 'HTTP Cookie Passive' method.




Any thoughts would be appreciated.







1 Reply

  • If passive cookie persistence works and provides the functionality you need, I'd say go with that versus writing an iRule.