Load Balancing 3 webservers
-
Hi Guys,
I have a physical server setup at the datacenter I work at, and I have vmWare ESXi installed. I have pfSense installed a bridge firewall, simply to block traffic based on ports.
I have my own block of public Ip's with gateway, etc.
3 of the vm's are webservers, 1 is a db, one is an admin server.
Each webserver has a public facing IP address that I can hit directly. They are setup as wwwX hosts. Using the following as an example, you can see how they are configured.
www1.company.com - 65.201.103.201
www2.company.com - 65.201.103.202
www3.company.com - 65.201.103.203Each has the same website. I want to setup sticky session load balancing so that when someone hits www.company.com, they are directed to one of the servers and they stay there until the server goes down and they get bumped to another host.
So I think I want to create a VIP like
www.company.com - 65.201.103.200
Within pfSense, under the load balancing tab, I have created the following entry to create the virtual server for the main company.com site
Virtual Servers localhost/load_balancer_virtual_server.php
name - www.company.com
server address - 65.201.103.200
port - 80
pool - company.com
description - virtual server for webserver poolAnd then, under pools, I have added an entry for each webserver
name - company.com pool
type - server (balance)
servers/gateways - 65.201.103.201 / 65.201.103.202 / 65.201.103.203
port - 80
monitor - tcp
description - web server pool–------------------------------------------
So I set the domain to go to the 65.201.103.200 address, which is the virtual server, and I'd expect when I hit that domain to be redirected to 1 of the 3 webservers. but nothing ever resolved. All 3 hosts can serve the website if you hit them directly, so I know the firewall is open for them.Am I going about this the right way?