Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.