Forum Discussion
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
Altostratus
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.
- nitass
Employee
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.
have you tried LB_FAILED?
LB_FAILED
https://devcentral.f5.com/wiki/iRules.LB_FAILED.ashx - Arie
Altostratus
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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com