DNS / Load Balancing
-
So on my network, I have two servers:
10.1.1.3
10.1.1.4Both of these are running nginx, for local and remote web applications.
These servers are basically identical (master and hot standby). All of my web applications are served via sub.company.com, now currently I just map sub.company.com in DNS Resolver to 10.1.1.3 and if 10.1.1.3 went down, I would just change the static mappings in pfsense to 10.1.1.4, this is far from ideal. So what I have done so far, is create two pools 'Master' and 'Slave'. Each pool consists of one server.
So now, when I go to create a virtual server, do I still specify the listen address as the WAN IP? or do I assign some un-used IP on the 10.1.1.0/24 subnet, lets say 10.1.1.5, then change all DNS Resolver entries for sub.company.com to point to 10.1.1.5?
From an external DNS point of view we are using Route53 with healthchecking, but this isn't really a big deal, as 99% of all of our traffic is internal (locally or from behind a VPN).
The obvious goal of this is to have a seamless experience for the user if one host goes down, with traffic being forced to 10.1.1.3 if its up, and 10.1.1.4 would only ever get hit when this happens, I don't want 'true load balancing' e.g. requests ending up at either server.
Thanks.