Forum Discussion

Cindy_Berry_103's avatar
Cindy_Berry_103
Icon for Nimbostratus rankNimbostratus
Oct 03, 2013

Rule within a Rule on Version 10.2 of BigIP

We have a need to have a rule that can reference other rules based on the hostname header. Is that possible in version 10.2? If it is, do you have any examples.

 

4 Replies

  • That isn't possible until v11.4 and the introduction of stored procedures I'm afraid. Can you not merge all the rules?

     

  • Okay...thank you for the quick response. I thought that might be the case. Unfortunately, it would be very challenging for me to group the rules together as there are quite a few of them and some are relatively complex. It will be easier for me to just create additional virtual servers in this case.

     

  • Understand that multiple iRules assigned to a VIP will essentially "compile together", meaning that the contents of the HTTP_REQUEST event in one iRule will merge with the contents of the HTTP_REQUEST in the other event. This can of course cause problems, so the event priority command can be used to force the event logic to different positions in the merged content. If you simply need to call different iRules based on some condition, you could do VIP targeting and point the traffic flow in the direction of an internal VIP (and its iRule) that then load balances to your application. It isn't a function call in the strictest sense that it returns to where it was called and allows the original rule to continue processing. For that you need sideband calls, procs, or potentially an HTTP::retry mechanism. This method will divert all traffic flow to the internal VIP, which would then process all events south of the event that sent it there.