Rejecting new HTTP requests when server reaches a certain throughput
Posted
by
Sam
on Server Fault
See other posts from Server Fault
or by Sam
Published on 2010-10-05T21:48:24Z
Indexed on
2010/12/29
23:56 UTC
Read the original article
Hit count: 251
I have a requirement to run an HTTP server that rejects new HTTP requests (with a 503, or similar) when the global transfer rate of current HTTP responses exceeds a certain level. For example, if the web server is transferring at 98Mbps, and a new HTTP request arrives, we would want to reject this (as we couldn't guarantee a good speed).
I've had a look at mod_cband for Apache, limit_req for nginx, and lighttpd's rate limiting features, but none of them seem to handle my (rather contrived, granted) use case.
I should add that I'm open to using pretty much any web server, and am open to implementing this in iptables rules if someone can craft such a rule! (Refusing the TCP connection is fine, it doesn't have to respond with an HTTP 503).
Any suggestions?
© Server Fault or respective owner