Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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.

share|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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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