Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have set up several servers with IIS and connected them to the load balancer - server with installed IIS Application Request Routing. I have created a server farm and added two servers. Then I stopped IIS on the first server and tried to open my web site. It returned me an error:

502 - Web server received an invalid response while acting as a gateway or proxy server. [There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.]

But if instead of stopping IIS I shut down the first server, I'm getting a response from the next server which is online. The question is, what the expected behaviour should be for failover with ARR, should it switch me to the next server if IIS is stopped and server is online?

Additional info: I've tried to shut down each server and I was able to open web site in both cases, so there is no problem with connections or configuration. I'm using even distribution and round-robin load balance algorithm. The problem appears only if I stop IIS and leave server online.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

In order to let the ARR server know when not to route requests to a server, you need to set up a Health Test.

  • Select your server farm in the IIS Manager
  • Select the Health Test Feature.
  • Here you can fill in an URL to run the health check against, (ie. a text file containing a good word, or the index page on the web site your trying to load balance).

Once you have configured a health test, you should be able to stop IIS on one of the servers, and see that requests to the ARR server is getting answered from the other.

For maintenance scenarios, you can gracefully shut pull out a web server from load balancing, using the Monitoring and Management feature. Select the server you need to drain, and select Disallow new connections from the Actions pane

share|improve this answer
1  
Thanks, after enabling health test, ARR redirects me to the next server is IIS server is not running on the first one. –  username Dec 6 '12 at 17:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.