Forum Discussion

Rajesh_A_142089's avatar
Rajesh_A_142089
Icon for Nimbostratus rankNimbostratus
Jun 06, 2014

Response when Web Server is stopped

I have typical f5 and IIS server based sites configuration: I have two IIS Servers. I have VIPs assigned for the web sites hosted on these servers. I have iRules assigned under these Virtual Server. My iRules have Request and Response events and all works well and logs well.

 

When I stop any IIS Site, my iRules work and under the Response event I am able to detect [HTTP::status] == 404 and take further action and all that works well.

 

Now, when I stop the IIS Server (not a site) itself on both Web Servers, the iRule attached on the Virtual Server logs only from the Request Event. The Response event does not hit.

 

What would be the appropriate event to to handle in this case so that I can further process and redirect users to an alternative location?

 

Thanks

 

Rajesh

 

3 Replies

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    The response code you're getting (404) is not the proper code for a site that's down - it looks like there's a default IIS-instance that handles the requests when the other instances are stopped. That would also explain why you're not getting a 404 when you stop IIS, since there's nothing left to handle the request.

     

    I assume you're using host headers in IIS?

     

    To handle it properly on the LTM you may want to see if you can disable the default IIS-instance. That way when the specific instance goes down even the standard http-monitor will pick up on it.

     

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    LB_FAILED might work, but it would be a bit of a workaround since the problem is caused by the way IIS is configured. IIS is diverting requests to the default instance when the specific (per the bindings) instance is not available. That's not the best way to configure it.