For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

janardhan123_20's avatar
janardhan123_20
Icon for Nimbostratus rankNimbostratus
Aug 27, 2015

Dynamic pool selection if pool member reports 503 response

Hello,

 

we have site abc.com , we have VS abc.com_VS_HTTP(S) and we have 2 pools ( pool_A1.com_http & pool_B1.com_http) We have server busy iRule tied to VS abc.com_VS_HTTP(S).

 

current Server busy iRule : reselect the available new pool member for every time 503 response from pool_A1.com_http pool member , and redirected to www.qaz.com after 15 times reselecting new pool member from pool pool_A1.com_http.

 

The current Server Busy iRule does not have the Dynamic pool selection logic in place , it has the static pool selection (LB::reselect pool pool_A1.com_http), Means if pool member send 503 response reselection happens from shop pool pool_A1.com_http.

 

We will need to add Dynamic pool selection logic to the current iRule.

 

1)If pool_A1.com_http pool member sends 503 response reselection should happen from pool_A1.com_http pool. 2)If pool_B1.com_http pool member sends 503 response reselection should happen from pool_B1.com_http pool.

 

Current IRule:

when CLIENT_ACCEPTED { set count 0 }

 

when HTTP_REQUEST priority 800 { set request [HTTP::request] }

 

when LB_SELECTED { if { $count >= 1 } { log local0. "Deleting cookie 73686f706123fg with value \"[HTTP::cookie value 73686f706123fg]\"" HTTP::cookie remove "73686f706123fg" LB::reselect pool pool_A1.com_http log local0. "Reselection: member [LB::server addr]:[LB::server port] from pool [LB::server pool]" } }

 

when HTTP_RESPONSE priority 800 { if { [HTTP::status] eq 503 && $count < 15 && [LB::server pool] == "pool_A1.com_http"} { incr count HTTP::retry $request log local0. "[HTTP::status] from [LB::server addr]:[LB::server port], trying another [LB::server pool] member (retry $count)" } elseif { [HTTP::status] == 503 && $count >= 15 } { HTTP::redirect "www.qaz.com" set count 0 log local0. "Redirect to due to panic mode (retried pool [LB::server pool] $count times)" } elseif { ! ( [HTTP::status] eq 503 ) && $count >= 1 && [LB::server pool] == "pool_A1.com_http" } { set count 0 } elseif { $count >= 1 && ! ( [LB::server pool] == "pool_A1.com_http" ) } { log local0. "Retry count = $count for pool [LB::server pool] -- this connection is being reused" } }

 

===

 

Thanks, Janardhan.

 

No RepliesBe the first to reply