Forum Discussion

Petchirajan_714's avatar
Petchirajan_714
Icon for Nimbostratus rankNimbostratus
Oct 21, 2013

URL Redirection for Maintenance Window

Hi , We need to do a URL redirection based on source IP Pool to another maintenance page for our weekly maintenance page. LAN Pool needs to access original pool and WAN pool needs to be redirected to maintenance pool. Please confirm whether the following irule works: When LB_FAILED { if {[class match [IP::client_addr] equals GDC_POOL]} { LB::reselect pool } else { LB::reselect pool } }

 

  • So if I'm understanding you correctly, during a maintenance period you'd like WAN users to get sent to a maintenance pool, while LAN users get sent to the original pool. Correct? If so, what would cause the LB_FAILED event to fire if the original pool still had accessible members?

    You would necessarily need another pool that wasn't affected by the same monitoring/intervention that you had for the VIP's configured pool, and then something like the following iRule:

    when LB_FAILED {
        if { [class match [IP::client_addr] equals GDC_POOL] } {
            pool original_pool
            LB::reselect
        } else {
            pool maintenance_pool
            LB::reselect
        }
    }
    
  • During the maintenance window, the original pool members , we've got 2 members and both would be made down so as per my understanding should trigger a LB_FAILED event and then the if conditional loop would come into picture.