Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Is load balancing breaking sessions?

    Scheduled Pinned Locked Moved Cache/Proxy
    11 Posts 4 Posters 839 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lewis
      last edited by lewis

      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.

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • L
          lewis
          last edited by lewis

          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?

          DerelictD 1 Reply Last reply Reply Quote 0
          • NogBadTheBadN
            NogBadTheBad
            last edited by

            Also look at stickiness with haproxy.

            http://cbonte.github.io/haproxy-dconv/2.3/intro.html#3.3.6

            Andy

            1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

            1 Reply Last reply Reply Quote 0
            • L
              lewis
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • DerelictD
                Derelict LAYER 8 Netgate @lewis
                last edited by

                @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.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                1 Reply Last reply Reply Quote 0
                • L
                  lewis
                  last edited by

                  Yes, I know that and I'm doing it. The question is, is 'load balancer' what might have been causing the browser problems?

                  1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate
                    last edited by

                    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.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    1 Reply Last reply Reply Quote 0
                    • L
                      lewis
                      last edited by lewis

                      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/wiki

                      This 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.

                      stephenw10S 1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator @lewis
                        last edited by

                        We did a hangout on it:
                        https://youtu.be/FJSHMyrd29E

                        There is some relayd stuff there too but it's mostly about setting up HAProxy.

                        Steve

                        1 Reply Last reply Reply Quote 0
                        • L
                          lewis
                          last edited by lewis

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.