Is load balancing breaking sessions?
-
We have a yii web application that is being load balanced by pfsense.
We get an awful lot of complaints of having to refresh browsers because the page went away. For example, the 'aw snap' screen that shows up on Chrome and what ever happens on other browsers. This happens on any and all pages which are heavily javascript based also.Countless hours have been spent trying to figure out if the problem is on the application side but it's not. All of the errors are browser based.
https://support.google.com/chrome/thread/40260297?hl=en
https://support.google.com/chrome/answer/95669
We cannot find any problems that we know of so starting to think the problem is pfsense.
-
What are you load-balancing with? How is it configured?
If you're using relayd you should think about switching to haproxy since relayd is deprecated in 2.5.
Steve
-
Hi, yes, standard 'load balancer' relayd setup with two sets of balanced servers on the lan. 2.4.5-RELEASE-p1
I'm just using what ever is built in and it does seem to be delayd.
It's just called load balancer. How do I switch to haproxy? Do you mean uninstall load balancer as a package and add haproxy? -
Also look at stickiness with haproxy.
http://cbonte.github.io/haproxy-dconv/2.3/intro.html#3.3.6
-
So, do you think the problem we are seeing is related to using the built in 'load balancer'?
I'll install the haproxy package and try to get it set up.
-
@lewis said in Is load balancing breaking sessions?:
Hi, yes, standard 'load balancer' relayd setup with two sets of balanced servers on the lan. 2.4.5-RELEASE-p1
I'm just using what ever is built in and it does seem to be delayd.
It's just called load balancer. How do I switch to haproxy? Do you mean uninstall load balancer as a package and add haproxy?Install HAproxy and remove/disable the load balancer configuration. There is nothing to uninstall because it is a module in pfSense base. As has been mentioned it is deprecated in pfSense 2.5 so moving to HAproxy is the path forward.
-
Yes, I know that and I'm doing it. The question is, is 'load balancer' what might have been causing the browser problems?
-
https://docs.netgate.com/pfsense/en/latest/multiwan/load-balance-and-failover.html#problems-with-load-balancing
All of that pretty much applies to inbound as well as outbound.
-
All I can find for installation instructions is
https://www.servethehome.com/how-to-haproxy-ha-load-balance-a-web-server-with-a-pfsense-sg-4860/Does anyone know of a more current one that is using the current version that I've just installed?
Maybe this is the one? Wish it had image examples :).
https://github.com/PiBa-NL/pfsense-haproxy-package-doc/wikiThis second version is way too complicated for the average person that just wants to get a basic setup working, then learn more about the advanced functions/features later.
-
We did a hangout on it:
https://youtu.be/FJSHMyrd29EThere is some relayd stuff there too but it's mostly about setting up HAProxy.
Steve
-
This post is deleted!