irules

Problem this snippet solves:

when LB_FAILED { switch $test { 1 { HTTP::fallback "http://maintenance1.example.com/" return } 2 { HTTP::fallback "http://maintenance2.example.com/" return } }

}

How to use this snippet:

Can explain above given Irule?

Code :

when LB_FAILED { 
    switch $test {
        1 {
            HTTP::fallback "http://maintenance1.example.com/"
            return
        }
        2 {
            HTTP::fallback "http://maintenance2.example.com/"
            return
        }
    }
 
}

Tested this on version:

11.6
Published Jul 25, 2016
Version 1.0

Was this article helpful?