Forum Discussion
Irule for redirect when all pool members down, need one for each pool? and what is the standard practice for sorry server?
This is what I have for an iRule to implement when all members of a pool are not available due to maintenance or unplanned outage
when HTTP_REQUEST { if { [active_members EXAMPLETEST_POOL] == 0 } { HTTP::redirect "http://209.196.27.42/" } }
Now this is for one pool, we have over 10 pools. Is there a way to re-write this so the same iRule can be applied to each virtual server? Or do I need to create a separate iRule for each pool?
Lastly, the re-direct is going to one server serving the web page. This has to be mapped to a public IP at the firewall with the non-nat'd IP as the virtual server for that web server. Then a DNS record created for that public IP address.
Is this the typical practice for a sorry server? Are there any steps I can take to mitigate any risks if any in my present setup?
Thanks,
- hooleylistCirrostratusYou can use [LB::server pool] to get the currently selected pool instead of hardcoding it in the iRule. Your network config for the sorry VS seems standard.
- dmenardSABA_235NimbostratusAaron,
- Michael_YatesNimbostratusHi dmenardSABA,
when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { HTTP::redirect "http://209.196.27.42/" } }
- dmenardSABA_235NimbostratusThanks to you both. I'll give that a try with that change. Regarding the standard practice for a sorry server I am still open to knowing what other are doing?
- Michael_YatesNimbostratusI would say that there is no best practice. There is only "what best fits your situation".
when HTTP_RESPONSE { HTTP::respond 200 content "Site unavailable System Maintenance NOTICE: This site is down for maintenance. " }
- TechgeeegNimbostratusHi Everyone,
System Maintenance NOTICE: This site is down for maintenance.
" - nitassEmployeehow can I merge the irule... what action do you want to take when pool is down? is it redirection to http://209.196.27.42/ or responding maintenance page??
- TechgeeegNimbostratusHi Nitas,
- TechgeeegNimbostratusHi Nitas,
- Kevin_Davies_40Nacreous
when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { HTTP::respond 200 content " " } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com