Forum Discussion

Mike_Pones_6391's avatar
Mike_Pones_6391
Icon for Nimbostratus rankNimbostratus
Sep 02, 2005

Performance Using a Rule

Here is the rule I have setup:

 

 

if (http_uri contains "testing") {

 

redirect to "https://%h/%u"

 

}

 

else if (http_uri contains "test2") {

 

use pool Test-Pool1

 

}

 

else if (http_uri contains "test3") {

 

use pool Test-Pool1

 

}

 

else {

 

use pool Prod-Pool

 

}

 

 

If I hit a URL that will fall all the way through the rule and get forwarded to the "Prod-Pool" I am seeing about 10 second difference in response time than if I hit another Virtual Server pointing directly to the "Prod-Pool". So I am confident it is not the server, is it possable that it takes that long to get through the rule? Is there a way to optimize this rule since the 2nd and 3rd if statement go to the same pool (Test-Pool1). Or can only one session use the rule at a time.

 

 

I am totally stumped on this one.

 

 

Thanks

 

 

Mike

 

 

  • Martin_Machacek's avatar
    Martin_Machacek
    Historic F5 Account
    Mike,

    a Rule by itself would never cause a delay in order of seconds. Application of a rule however makes your virtual server use so called "late binding", i.e. do TCP handshake on behalf of the server, accept enough data (in your case the request line) in order to make loadbalancing decision and only then establish connection to the server. So, the BIG-IP surely does more work, but the observer difference is in the order of 100 microseconds or miliseconds, not 10 seconds. I believe the root cause for the delay must be elsewhere. You need to collect packet captures both on client- and server-side and look what's going on. You should contact F5 support, if you cannot resolve the problem yourself.

    Although the rule is almost certainly not causing your performance problems, it can be optimized (slightly) by using a class, like this:

    
    class test {
       "test2"
       "test3"
    }
    rule test_redir {
       if(http_uri contains "testing") {
           redirect to "https://%h/%u"
       }
       else if(http_uri contains one of test) {
           use pool Test-Pool1   
       }
       else {
           use pool Prod-Pool
       }
    }

  • mmac,

     

     

    I completly agree with you that this is not causing my performance issues. I do have a ticket with F5, but I figured I would ask here just to see if anyone else has run into this issue.

     

     

    I like the optimization of the rule, that is kinda what I was thinking.

     

     

    Thanks for the reply, if I find anthing out from F5 I will post it for future referance.

     

     

    Mike
  • Colin, I relized that after I posted my reply. LOL I really did not think the rule was causing the slowness, but I had to ask.

     

     

    Thanks again for all your guys help.

     

     

    Mike