Forum Discussion

Paul_73795's avatar
Paul_73795
Icon for Nimbostratus rankNimbostratus
Jan 06, 2011

HTTP forward to Pool not working as expected

Hi, I am attempting to set up an iRule that forwards requests to our pool of sorry servers when there are no active members in the load balanced server pool.

 

 

As you can see by the logs if no active members are in the load balanced pool it redirects to the sorry server pool we get SERVER CONNECTED and displays the outage page. If I then turn bring the servers back online and refresh the browser the iRule looks to be doing the correct thing by directing the traffic to the load balanced server pool but in actual fact it is still being directed to the sorry servers and there is no SERVER CONNECTED response.

 

 

Have I done something incorrectly?

 

 

iRule

 

when HTTP_REQUEST {

 

set DEBUG 1

 

if { [active_members [LB::server pool]] < 1 } {

 

if { $DEBUG } { log local0. "[IP::client_addr]:[TCP::client_port]: using sorry server Pool: [LB::server]" }

 

pool pool_http_sorry_server

 

} else {

 

if { $DEBUG } { log local0. "[IP::client_addr]:[TCP::client_port]: using server Pool: [LB::server]" }

 

pool [LB::server pool]

 

}

 

}

 

when SERVER_CONNECTED {

 

Debug logging only. Remove this event once done testing

 

log local0. "[IP::client_addr]:[TCP::client_port]: server: [LB::server], [IP::server_addr]:[TCP::server_port]"

 

}

 

 

/var/log/ltm

 

Jan 6 18:28:58 local/tmm3 info tmm3[21819]: Rule irule_forward_outage_pool : 10.133.27.10:50651: using sorry server Pool: pool_http_bbdev 0

 

Jan 6 18:28:58 local/tmm3 info tmm3[21819]: Rule irule_forward_outage_pool : 10.133.27.10:50651: server: pool_http_sorry_server 203.2.32.66 80, 203.2.32.66:80

 

Jan 6 18:29:26 local/tmm3 info tmm3[21819]: Rule irule_forward_outage_pool : 10.133.27.10:50651: using server Pool: pool_http_bbdev 0

 

Jan 6 18:29:26 local/tmm3 info tmm3[21819]: Rule irule_forward_outage_pool : 10.133.27.10:50651: using server Pool: pool_http_bbdev 0