Hi Chris

I would suggest you check out the special purpose Apache modules that exist for 
doing this. Using mod_wsgi wouldn't be a good way of doing that.

See this SO question with various suggestions for modules:

http://stackoverflow.com/questions/131681/how-can-i-implement-rate-limiting-with-apache-requests-per-second

There is also:

http://www.cohprog.com/mod_bandwidth.html

which I don't think is listed there.

Graham


On 11/07/2013, at 10:23 AM, Chris Chen <[email protected]> wrote:

> Hey Jason,
> 
> We would like to add custom logic to rate limiting certain types of request 
> by IP.  Basically,  if an IP had made certain requests too many times within 
> last x mins or seconds, we will return an error, Otherwise, we will let the 
> cgi handles the request.
> 
> Thanks.
> 
> 
> On Thursday, July 11, 2013 9:37:07 AM UTC-7, Jason Garber wrote:
> Hi Chris,
> 
> Can you expand on what type of "custom logic" you are referring to?  I assume 
> said CGI script returns HTML?  Is that what you wish to manipulate via 
> mod_wsgi+python?
> 
> J
> 
> 
> 
> On Thu, Jul 11, 2013 at 12:24 PM, Chris Chen <[email protected]> wrote:
> Hi there.
> 
> We use a CGI script that is written in C (not written by us), compiled and 
> directly called from apache.  We would like to add some custom logic on top 
> of it, and we are hoping we can wrap it with mod_wsgi.  
> 
> Is this a good idea? Does anyone have an example?
> 
> Thanks!
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to