Forum Discussion
Irule to Make a Member-server down based on error: 503
Hi Cory,
Got you, but basically application is designed in such a manner that it will send response back in some version of 500.* only,( basically if we monitor 500 that will be the best as it will cover 503 too )
so that's the reason we are looking more into the receive string which will monitor that and make the member-server down. Alongwith that, we are planning to add a fallback host which will consist the apology member-server. And alongwith all these, we are using the Below irule:
And also we are having the below Irule in place:
Don't send 503 or 500 errors out, try next server. After 10 consecutive failed attempts, send redirectwhen HTTP_REQUEST priority 700 { set my_url [HTTP::host][HTTP::uri] }
when HTTP_RESPONSE priority 700 { if { ( ( [HTTP::status] == 500 ) or ( [HTTP::status] == 503 ) ) && ( $count < 15 ) } { incr count HTTP::respond 302 Location "http://$my_url" event disable } elseif { ( ( [HTTP::status] == 500 ) or ( [HTTP::status] == 503 ) ) && ( $count == 15 ) } { set count 0
log local0. "Sending to Main Page" HTTP::respond 302 Location "http://www.xyz.com"
event disable
}
}
Thanks and Regards
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