Is there a way to throttle only file uploads (not downloads) using Apache 2 on a per-directory basis?

I've tried using mod_bw and looked at mod_throttle, but neither seem to support upload throttling, only downloads.

link|improve this question

57% accept rate
feedback

1 Answer

up vote 3 down vote accepted

It's quite difficult to throttle uploads, since you are not at the source of the sending.

The only thing you can do is to temper TCP ACKs (by delaying them).

I don't know a reliable way to do it at the application level, except of not reading the socket anymore. A quite general way would be to do it at the OS level.

A solution at apache's level would be something like bwshare. If you want to avoid DOS, you can just send 503 as quoted in media wiki's Request Throttling page.

link|improve this answer
how might one go about doing it at the OS level? – Shabbyrobe Aug 10 '09 at 7:18
I edited my answer to reflect your question – Steve Schnepp Aug 10 '09 at 8:28
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.