Forum Discussion

Kannan_Thalaia1's avatar
May 21, 2019

iRule Redirection issue

Hello,

 

We have the below irule for for redirecting users to other datacenter if all pool members are down..

 

When all servers are in "Disabled" mode, the redirection is not happening. But if all servers are in either "force offline" or probe get fail the redirection work.

 

Any idea about this behaviour? Our intention is, even the pool members are in disable mode the redirection should work.

 

Thanks in advance.

 

if { [ active_members $static::default_PREPpoolS ] < 1 } {

set site [HTTP::host]

set new_dc [lindex $static::other_prep_regions [expr { int(rand() * [llength $static::other_prep_regions]) }]]

set uri "$method[string map [list $static::region $new_dc] $site[HTTP::uri]]" 

HTTP::redirect $uri