0

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.

1 Answer 1

3

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.

2
  • how might one go about doing it at the OS level?
    – Shabbyrobe
    Aug 10, 2009 at 7:18
  • I edited my answer to reflect your question Aug 10, 2009 at 8:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .