Shivesh_Rege
May 20, 2009Nimbostratus
Irule Prefernce
Hi All:
I guess irules take prefernce from top to bottom.So if I have 2 irules .It will pass on 1st with one in top list and next 2nd .Please correct me if I am wrong?
Regards,
Shivesh
I guess irules take prefernce from top to bottom.So if I have 2 irules .It will pass on 1st with one in top list and next 2nd .Please correct me if I am wrong?
Regards,
Shivesh
That's correct. Though you can alter this using the priority statement (Click here).
Aaron
Is there any option to enable /disable an Irule on demand rather than going on GUI by removing the same from virtual server...
Thanks for prompt response..
Thanks in Advance..
If you mean that when a certain pattern of traffic flow is detected you want to stop processing the iRule, you can use the event disable command (Click here) or the return command (Click here) to manage this on a per-connection basis.
If you mean administratively removing the iRule, the GUI is probably the easiest way, unless you want to develop a custom iControl application that would be able to toggle the use of iRules on a particular virtual server.
Denny
Thanks for reply.However I was more inclined to wards more faster mode of option in switching over irules as tere are many virtual servers which need maintance page depending on requirement.I.e like.
when LB_FAILED {
if{[active_members [LB::server]]<1}
HTTP::redirect "http://[HTTP::host]/error/404.html"}
This I guess will cover if pool memebers are not available i.e servers are down/port not listening on maintaince.
However we also have requirement that when the servers are up but want to place maintanance page for internal team to verify and make available after testing .I am placing a differnt irule which will re-direct based on content of [HTTP::host] which will replace this one.So found some stuff on command line.Could you tell me if it will work ?
Option to switchover in time of adhoc maintainance page required
login to Bigip console.
bp> virtual rule none
bp> virtual rule
and once the request is to place back normal irule
bp> virtual rule none
bp> virtual rule < normal_redirection_irule>
Or
bp> virtual rule
!!!!once the request is to place back normal irule!!!
bp> virtual rule < normal_redirection_irule>
1) Take advantage of priority grouping. For example, you could have a simple page that you monitor on the web servers, and when the dev team needs to test a new release on a particular set of servers they can simply toggle that page's content - for example, from "Pass" to "Fail" or similar. This will cause the health check to fail and your 'fallback' servers will come online and serve your maintenance page. The drawback to this approach is that you'll have to be very careful to disable the right set of servers (i.e. the systems with the higher priority in the pool). There's also more setup involved with this.
2) Use iControl to manually disable the systems in question. This is something that your dev team can automate relatively easily and it'll work great. You can manually disable the higher priority systems and let the fallback systems in the priority group serve up the maintenance page. The drawback here is that it may not be granular enough for you to deal with per-host maintenance windows.
3) Take advantage of the 'fallback host' setting in the HTTP profile, so when you disable the servers you can automatically fall back. The drawback here is that it's a fairly 'global' thing to do, so if you're doing lots of name-based virtual hosts it may not fit every situation.
4) Use an iRule with a data group that contains a set of hostnames to selectively disable. This will probably get you closest to your 'dynamic' setup, as you can automatically update this list via (you guessed it!) iControl. So for example you could use something like this: http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&postid=3005&view=topic. While their goals are different in this thread, the technique still applies.
This last option would be my guess as the most useful one for you.
I hope this helps,
Matt
Denny
-Matt