Forum Discussion

Esteban_Ribicic's avatar
Esteban_Ribicic
Icon for Nimbostratus rankNimbostratus
Jun 29, 2006

Rate limit to n connections / each ip

Hi,

 

 

Im very new to Tcl/iRules, so maybe my question is very basic. I would need (original begining eh?) limiting the number of connections from each client to n.

 

 

So...

 

 

src ip x max concurrent http connections 200

 

src ip y max concurrent http connections 200

 

src ip z max concurrent http connections 200

 

 

i tought making a hash $table{$src_ip}=$number_of_connections (sorry, the most similar language to Tcl i know is perl...)

 

 

is there any better way of doing this? memory and cpu usage might be an issue as i have no less than 200 clients...(i have a ltm 6400 series)...

 

 

one more! ... if the client goes beyond n (number of connections) redirects to a pool...well, thats not that hard i guess..

 

 

comments are very welcome : )

 

Esteban

 

 

2 Replies

  • Posted By eribicic on 6/29/2006 1:38 PM

     

     

    Hi,

     

     

    Im very new to Tcl/iRules, so maybe my question is very basic. I would need (original begining eh?) limiting the number of connections from each client to n.

     

     

    So...

     

     

    src ip x max concurrent http connections 200

     

    src ip y max concurrent http connections 200

     

    src ip z max concurrent http connections 200

     

     

    i tought making a hash $table{$src_ip}=$number_of_connections (sorry, the most similar language to Tcl i know is perl...)

     

     

    is there any better way of doing this? memory and cpu usage might be an issue as i have no less than 200 clients...(i have a ltm 6400 series)...

     

     

    one more! ... if the client goes beyond n (number of connections) redirects to a pool...well, thats not that hard i guess..

     

     

    comments are very welcome : )

     

    Esteban

     

     

     

     

    forgot to mention, based on delta time...so its n connections / t seconds...

     

     

    so , no more than 200 connections on a 20 seconds gap...