Can web applications running on IIS7 Windows Server 2008 R2 be forced to immediately detect changes to hosts file?

Posted by Brenda Bell on Pro Webmasters See other posts from Pro Webmasters or by Brenda Bell
Published on 2012-10-19T15:14:44Z Indexed on 2012/10/19 17:19 UTC
Read the original article Hit count: 258

Filed under:
|
|

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.

For example:

  • 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 192.51.100.3; 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.com to 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?

© Pro Webmasters or respective owner

Related posts about dns

Related posts about iis7