Forum Discussion

Luis_Carlos_101's avatar
Icon for Nimbostratus rankNimbostratus
Jun 03, 2011

iRule with Rate Shaping

Hi guys,



I'm new and I need the DevCentral iRule to implement a rate shaping for a specific group of ip's.


Can someone help me.








3 Replies

  • Hi Luis,



    You can add the addresses/ranges you want to act on to an address type datagroup and then use an iRule which uses the class command (v10) or the matchclass command (v9) to check the client IP against the datagroup. You can assign a rate class using the rateclass command:







  • Colin_Walker_12's avatar
    Historic F5 Account
    Also, you'll likely want to do this on a per connection basis, so I'd recommend looking into the CLIENT_ACCEPTED event as a starting place.



  • Hi,



    If I wanted to do rate shaping on http protocol and I wanted to update the rate class to be used at the fly depending on some conditions specified in a conditional “if” I'm tempted to believe that this can be done by:



    1) Specifying an initial Rate Class in the CLIENT_ACCEPTED event



    2) Have in the HTTP_REQUEST event a "conditional if" setting rate class to a value if a condition happens or setting it to a different value if a different condition happens.



    Is my assessment correct that one could dynamically change the rate class to be used in an http connection at the fly by implementing what I described above?



    Please advice