Forum Discussion

Ariel_Moreno_10's avatar
Ariel_Moreno_10
Icon for Nimbostratus rankNimbostratus
Dec 29, 2010

iRule Switch default action

Folks.

 

I have a big iRule to distribute the connection between multiples pooles using URI regex, what I have realized that I did not added a "default:" statement trying to cause a connection dropping when the URI did not match my pool options.

 

What it is happening now is that these connections instead of being dropped they are forwarded to my pools, I could not determine that it is following the RR method configured in my Virtual Server, but it seems to be in this way.

 

Which is the defaulf action in an irule when neither it is a "default" statement in my "switch" command nor there is a default pool in my virtual server configuration?

 

 

 

Thanks

 

 

1 Reply

  • Hi Ariel,

     

     

    If you want to make per-HTTP request decisions, it's best to add a OneConnect profile. See this wiki page for details:

     

     

    http://devcentral.f5.com/wiki/default.aspx/AdvDesignConfig/oneconnect.html

     

     

    It's also a good practice to explicitly handle all cases within the iRule. So adding a default case to the switch statement would make sense.

     

     

    Aaron