Navigation

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

    Load Balancing Active Active

    HA/CARP/VIPs
    3
    4
    8656
    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.
    • W
      wizard last edited by

      Hi,

      i have set up two load balancers with pf sense and two real servers with power dns behind it. Which works fine, but one of the load balancers is always passive (active passive scenario). Is it possible to set up an active active setup with pf sense. Where the master load balancer would control a pool of two real servers and the slave would control a pool of two real servers. When one of the load balancers is down the other one takes over the pool and controls 4 real servers during the down time.

      1 Reply Last reply Reply Quote 0
      • H
        hoba last edited by

        If I get you right this should be possible. You can't sync CARP/VIP settings but have to enter them manually for this to work as syncing VIPs will make one node Master for all IPs and the other Backup for all IPs:

        Loadbalancer1
        CARP-IP1 Advertisingfrequency 0 (this means highest Priority and Master if up)
        CARP-IP2 Advertisingfrequency 0
        CARP-IP3 Advertisingfrequency 100 (this means lower priority than 0 and if there is someone with 0 up this node will be Backup)
        CARP-IP4 Advertisingfrequency 100

        These settings should be reversed at the other machine:

        Loadbalancer2
        CARP-IP1 Advertisingfrequency 100
        CARP-IP2 Advertisingfrequency 100
        CARP-IP3 Advertisingfrequency 0
        CARP-IP4 Advertisingfrequency 0

        Now add your Loadbalancing pools just the way you did for the single setup but use the CARP IPs. This should do what you want. Each machine will have their main 2 IPs as Master and will deal with the other 2 IPs if the other node is down.

        1 Reply Last reply Reply Quote 0
        • W
          wizard last edited by

          That could be the answer to my problem i will give it a try soon. Thanks a lot for your help.

          1 Reply Last reply Reply Quote 0
          • B
            billm last edited by

            @wizard:

            That could be the answer to my problem i will give it a try soon. Thanks a lot for your help.

            Make sure you don't have asymmetric routing.  You'll need two carp addresses on the INSIDE also with each group of servers using it's respective carp IP as it's return gateway.  While pfSense will sync it's state table, it's not instantaneous and I can guarantee issues with out of state packets.

            –Bill

            pfSense core developer
            blog - http://www.ucsecurity.com/
            twitter - billmarquette

            1 Reply Last reply Reply Quote 0
            • First post
              Last post