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

    Private load-balancer on the LAN

    Scheduled Pinned Locked Moved Firewalling
    6 Posts 2 Posters 2.0k 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.
    • C Offline
      comrax
      last edited by

      Hello,

      I've setup a network that consists of 3 database servers and 3 Web servers, per the diagram that I've enclosed. I've also created a farm (with public Virtual IP address) to drive the 3 load-balanced Web servers easily.

      What I am not able to do is building a load-balanced database farm. It's like a LAN farm… Anyone have done this before, and how have they done it?

      In essense: Web servers will connect to a local, virtual IP address, which needs to be actually the IP address of load-balanced database farm.

      Thank you in advance.

      /Comrax

      ![pfSense LAN Load Balance.png](/public/imported_attachments/1/pfSense LAN Load Balance.png)
      ![pfSense LAN Load Balance.png_thumb](/public/imported_attachments/1/pfSense LAN Load Balance.png_thumb)

      1 Reply Last reply Reply Quote 0
      • E Offline
        Eugene
        last edited by

        It's not a firewall's job. You have to create a cluster out of your DB-servers.

        http://ru.doc.pfsense.org

        1 Reply Last reply Reply Quote 0
        • C Offline
          comrax
          last edited by

          I wonder: How does this classify under "not a firewall's job" when the same firewall can do load-balancing?  ;)
          In normal circumstances, I'd say that you're correct but we're dealing with pfSense firewall with LB capability.

          So, the obstacles would be:

          1. The LB itself is targeted only to serve the "outside world";
          2. We don't know how to do this for the "inside world" – yet;
          3. Some kind of software is missing from pfSense that would enable it to work.

          Meanwhile, I've installed "haproxy" as a package (pkg_add -r) on the pfSense box itself to enable this functionality. haproxy listens on LAN IP address, and is configured to relay incoming requests to the 3 database servers (round-robin style).

          I just don't know whether this is a good strategy, and whether the packages are retained after I do a firmware upgrade. Anyone can shed more light on this?

          /Comrax

          1 Reply Last reply Reply Quote 0
          • E Offline
            Eugene
            last edited by

            LB in pfSense: packet arrives at one interface and goes out of (two, three, …) interfaces according to specified rules.
            When it comes out of any outgoing interfaces it is forwarded to the single host - default gateway configured for this interface.
            To use firewall to loadbalance local traffic is kind of not very nice design/solution for me.

            Eugene.

            http://ru.doc.pfsense.org

            1 Reply Last reply Reply Quote 0
            • C Offline
              comrax
              last edited by

              And still, in real life situations, you need it. I've demonstrated just one scenario…

              /Comrax

              1 Reply Last reply Reply Quote 0
              • E Offline
                Eugene
                last edited by

                We are all people, that is why we have different opinions -)))

                http://ru.doc.pfsense.org

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