Jump to content
Toggle menu
  • 51 articles
  • 24 files
  • 4 users
  • 750 edits
Tech-Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Maintenance Page in case of pools failed

From Tech-Wiki


Technical reference for Maintenance Page in case of pools failed.

Reference

when LB_FAILED {

   HTTP::redirect "http://domain.com/maintenance-mode/"
}

Or below

when HTTP_REQUEST {
   # Check if the VS default pool has any active members
   if {[active_members $default_pool]}{
       pool $default_pool
   } else {
       pool sorry_pool
   }
}

For Priority group use below instead

when CLIENT_ACCEPTED {
     if { [active_members -list http_pool] >= 2 } {
       pool http_pool
     }
}

Or below

when HTTP_REQUEST {
 if { [active_members [LB::server pool]] < 2 } {
  if { not ([HTTP::uri] starts_with "/SecureServer") } { 
    HTTP::uri /SecureServer[HTTP::uri] 
  } 
 } 
}

See also