Forum Discussion

mayur_m_150368's avatar
mayur_m_150368
Icon for Nimbostratus rankNimbostratus
Apr 22, 2014

what is advantage & disadvantage of creation of multiple & single irule?

I want to publish 500 applications through F5 for that I have created a virtual server & irules. I just want to understand the behavior & functionality of irule? How it works?

 

Question 1:- Weather we create a single irule for all 500 applications or should we create 500 irules for 500 applications? What would be the impact on box if we create multiple irules instead of single one?

 

Question 2:- If I create multiple irule instead of single how much memory & CPU the box utilize. Weather it impact on performance of box?

 

Question 3:- what is advantage & disadvantage of creation of multiple irule & single irule?

 

2 Replies

  • Question 1:- Weather we create a single irule for all 500 applications or should we create 500 irules for 500 applications? What would be the impact on box if we create multiple irules instead of single one?

     

    It really boils down to three things: configuration load time, management, and compatibility. Fewer iRules are always better as a rule of thumb. Easier to manage, smaller config, and less chance that any iRules may have conflicting properties. If you can find some commonality between the services, then a single iRule for all may make more sense. Just my opinion.

     

    Question 2:- If I create multiple irule instead of single how much memory & CPU the box utilize. Weather it impact on performance of box?

     

    Again, it's all about config load time and management. You could certainly write an iRule that causes a performance problem, but whether that logic exists in a single cumulative iRule or several shouldn't make a big difference.

     

    Question 3:- what is advantage & disadvantage of creation of multiple irule & single irule?

     

    I would simply argue that while a single simple iRule per VIP is easy to manage, there are going to be 500 of those. If there is some common ground, you should try to consolidate that. If there are significant variations in logic, then that should probably be separated. If you end up applying multiple iRules to a single VIP, keep in mind that the events in the separate iRules will merge when compiled. So for example, if you have two iRules with HTTP_REQUEST events, the logic from both events will merge. You want to make sure, if there's an order of operation, that you specify that order either through configuration (order in the GUI), or explicitly (using the priority command in the iRule event declaration).

     

  • What does the iRule(s) do? are they very specific to each application/virtual server?

     

    In my option, too, one iRule is better than many... but if the iRule is :

     

    if we are in application 1: cmd1 cmd2 ... if application 2: cmd3 cmd4 ...

     

    then maybe separate iRules is cleaner and easier to maintain.