Note that there are two kinds of load balancing in Pfsense: One is to set up multiple WAN to do two-line load balancing, and the other is to do the Web server in LAN Inbound-loadbalancer.
This article shows how to use pfsense 2.0 to Configure load Balancing for your multiple Web servers (Load Balancer). This assumes that you already have a pfsense server and more than 2 Apache servers in your network environment , and have a certain knowledge of pfsense .
1. Prerequisites
an installed pfsense 2.0 Machine (if it is your perimeter firewall, it is recommended to install on a physical machine)
at least 2 Apache servers (which can be virtual machines)
ensure that the code files are synchronized between Apache servers (rsync, Cororsync, or others can keep the files updated between Web servers)
2. Configure Pfsense
Pfsense can use load balancing to allow specific request pressures to be shared by multiple servers, which is useful for servers with multiple applications because you can spread the load pressure across other nodes rather than a single node.
2.1 Monitor
we officially started. First click Services, Load balancers Monitor tags.
Click the + PLUS sign on the right to add a record, enter the monitor name name and description Description(in this example name and description I use Apacheclustermon), set the type to HTTP, the host address, set to an IP that is not yet in use ( the IP on the build virtual IP, this virtual IP will be assigned to the failover failover node, note: Also the article said to set it to WAN IP),HTTP Code to Save the default then click Save to save and make the changes effective Apply changes.
2.2 Pool
Next, set up the server pool . Click the + button on the Pools tab to add a pool.
I specify Apachesrvpool is the service pool name, set Mode to Load Balance, Port (. This port when your backend server listening port, you can certainly set other applications of other ports, not necessarily the Web. Set the Apacheclustermon created in the previous step for this pool , then add all of your Web server IPs to the pool , save and apply.
2.3 Virtual Server
The last step, select Virtual Servers tab, click + to add a record. Fill in the name Apacheclustervirtualserver, description and IP address, this IP address is the same as the unused IP mentioned in step 1 , the port All connections sent to this WAN Ip:port will be forwarded to the server pool. Virtual Server pool VM Poll Select the one you created in the previous step. Submit and apply.
It's done! Finally, do not forget to add firewall rules for the virtual server IP and pool.
free pick up brother Lian it education original Linux OPS engineer video / detail linux tutorial, For more information, please contact: http://www.lampbrother.net/linux /
learn PHP, Linux, HTML5, UI, Android and other video tutorials (Courseware + notes + video)! Contact Q2430675018
How to load balance your Web services with Pfsense