We have several web applications running on several load-balanced servers. We want to have our web applications communicate with each other without first traversing outside the load balancer.
- http://appA.example.com is running on 192.0.2.1 and 192.0.2.2
- http://appB.example.com is also running on 192.0.2.1 and 192.0.2.2
- The load balancer's public IP address is 198.51.100.3
- By default, when appA on 192.0.2.1 makes a call to a WCF service hosted in appB, the HTTP request is routed to 18.104.22.168; this establishes a new session and the load balancer will direct the call to either of the two servers
- We want the call to be routed to the instance of appB running on the same server so we add
192.0.2.1 appB.example.comto the hosts file on 192.0.2.1.
This eventually works, but we either have to wait for the app pool to naturally recycle or do a manual reset before appA sees the new address.
Is there any way to have the change automatically detected without having to recycle the app pool?