Forum Discussion

adam_miller_143's avatar
adam_miller_143
Icon for Nimbostratus rankNimbostratus
Oct 28, 2009

Simple Redirect?

Hello All,

I have an iRule that will hopefully redirect anyone with out a URI to a specific URI (/login/login.asp)

 
  
 when HTTP_REQUEST { 
 if {([HTTP::uri] equals "/")} 
 { 
    HTTP::redirect "/login/login.asp"       
   }     
 } 
  
 

This works perfect, however, in watching the statistics it seems this iRule is ran with every request.

This means every time i hit this VIP, it executes the iRule multiple times each request (assuming its pictures, css downloads...etc)

Is there a way to prevent this? I am afraid with a high volume of traffic it will induce performance issues.

Any help will be appreciated.

1 Reply

  • If you add the iRule to a VIP, the code in the HTTP_REQUEST event will be executed on each HTTP request. This is expected. There isn't a way around this and it shouldn't add noticeable load.

     

     

    If you want to do performance testing to get an idea of how much load the iRule will add, you can use the timing command:

     

     

    http://devcentral.f5.com/wiki/default.aspx/iRules/timing

     

     

    Aaron