Forum Discussion

omid_pooya_1858's avatar
omid_pooya_1858
Icon for Nimbostratus rankNimbostratus
Feb 05, 2015

http health monitoring using iRules

i have a big ip f5. i have created a monitoring element on administration console of f5 for http health monitoring. i have some servers that display same web site. if a server fail, it respond to http get request by error code except of "200 OK", for example 503 or 404 and .... the time interval of monitoring is set to 5 second and every 5 sec, F5 send get request to every server and receive response from it. if a server down but listening on his ip and port, the "GET" request receive 404 or 503 error code. it work correctly but when a server fail, until health monitoring interval time reach, in client side, users view error code. after 5 sec, fail over occurs and only new connections( new http request ) from cients will redirect to another healthy server. I do not want users view any error code. note: i use coockie persistence and all connection of a user will be send two specific server by F5. I want an iRule that on "when_http_response" function of it i check header of each response of servers and if it has an http error code ( 404, 503 or ... any error but 200 ok ) f5 send http request of it again to another healthy server and mark that server as down. can any help me?