Kamalpreet_1068
Aug 29, 2012Nimbostratus
Node health checkup
Hi ,
I have developed a IRULe which is forwarding a request between 2 nodes and also changing the host header values. Request is toggling between 2 nodes irespective of the health of nodes.
I want to add a additional condition here something like if a node is up only then it should forward a traffic.
because now what happening is even if my one server is down it is forwarding the request to that server and connection breaks.
when RULE_INIT {
set ::whichone 0
}
when HTTP_REQUEST {
switch $::whichone {
0 {
HTTP::header replace "Host" "xsp.pac.com:8100"
use node 10.206.134.23
}
1 {
HTTP::header replace "Host" "abc.pac.com:8100"
use node 10.206.134.24
}
}
set ::whichone [expr ! $::whichone]
}