Recently began migration of Apache vhosting environment behind hardware load balancers to nginx/php-fpm.
One of our applications is being load balanced between two CakePHP backends and depends on sessionid persistence. I have not moved forward with compiling the sticky module as of yet because it seemed that ip_hash would be enough to accomplish the same end results (I understand there are fairness limitations resultant from using ip_hash but that's acceptable at this time). We also had least_conn defined for most of our upstreams for no better reason necessarily than that's how our hardware LBs have always been configured:
upstream cakeapp {
ip_hash;
keepalive 16;
least_conn;
server 192.168.1.6:8705;
server 192.168.1.7:8705;
}
With this configuration, however, we found we were bouncing between backends on nearly every page load, obviously breaking the application looking for a sessionid that didn't' exist on one or the other. Removing least_conn resolves the issue but I'm just curious as to if these are supposed to be supported together (nothing in docs claims otherwise) and how fairness will be further impacted?
Or should I just use sticky?
One of our applications is being load balanced between two CakePHP backends and depends on sessionid persistence. I have not moved forward with compiling the sticky module as of yet because it seemed that ip_hash would be enough to accomplish the same end results (I understand there are fairness limitations resultant from using ip_hash but that's acceptable at this time). We also had least_conn defined for most of our upstreams for no better reason necessarily than that's how our hardware LBs have always been configured:
upstream cakeapp {
ip_hash;
keepalive 16;
least_conn;
server 192.168.1.6:8705;
server 192.168.1.7:8705;
}
With this configuration, however, we found we were bouncing between backends on nearly every page load, obviously breaking the application looking for a sessionid that didn't' exist on one or the other. Removing least_conn resolves the issue but I'm just curious as to if these are supposed to be supported together (nothing in docs claims otherwise) and how fairness will be further impacted?
Or should I just use sticky?