Forum Discussion

techguru_90881's avatar
techguru_90881
Icon for Nimbostratus rankNimbostratus
Nov 05, 2013

irule required for conditional rate limit on virtual server

We are trying to setup connection limit on one of our virtual server but the condition is if the connection limit exceeded it should only allow certain traffic having certain value in the header rest it should drop .can any one suggent any irule to achieve this requirement .

 

the running code in F5 LTM is 11.3

 

1 Reply

  • https://devcentral.f5.com/wiki/iRules.Limit-the-number-of-HTTP-requests-by-a-client-within-a-specified-time.ashx

     

    Check out this iRule.

     

    The throttling begins at after 100 HTTP Requests are made within 5 minutes. You can modify these values in the iRule based on your requirement.

     

    Only change you have to make is on Line 19 - Remove the HTTP::respond section and put an if condition to check for the necessary headers. If the expected headers are present allow the traffic, or else drop it.