http://www.apache.org/dist/httpd ... /mod_simultaneous.c
* mod_simultaneous.c
*
* Michael Davon 10/95 (davon@web-depot.com)
*
* Limit the number of simultaneous accesses to files in a
* particular directory. Allow servers to wait for access.
*
* Using this module will increase the load on the server, since
* it will do a fair amount of file access to manage the locks.
* However, this module is quite effective at limiting access.
*
* This is particularly useful if you only have so much bandwidth
* on your network connection, and don't want it all sucked up
* by people looking at pictures.
*
* Note that when servers are waiting for access, they wake up
* once per second, and try again for access. There is no queue, so
* whichever waiting process wakes up first (when access is available)
* gets the access. Queuing would be nice, but is hard to implement.
*
* An effective strategy to limit bandwidth consumption may be
* as follows:
*
* SimultaneousAccesses 1
* SimultaneousWait 4000
* SimultaneousValidate 10
*
* This will have the effect of allowing only 1 access to a directory at a
* time, however, it will keep the server waiting until it finally does
* get access (up to 4000 seconds), and it will validate the locks every
* 10 seconds, just to make sure the locking process is still around.
*
* Setting "SimultaneousAccesses 0" allows unchecked access.
*
* Setting "SimultaneousWait 0" will not wait, and will timeout
* immediately if there is no slot available.
*
* Setting "SimultaneousValidate 0" will never validate the slots.
*
* Setting "SimultaneousValidate 1" will validate the slots every second.
*/
http://www.apache.org/dist/httpd/contrib/modules/1.2/mod_limit.c * mod_limit.c: limits on daily usage by users
* A user can only xfer so many bytes/period.
*
* Sameer Parekh 作者: carls 時間: 2002-7-20 16:27 標題: Re:【討論】Apache 可否作資料夾限速? apache正點作者: 阿輝 時間: 2002-7-20 17:37 標題: Re:【討論】Apache 可否作資料夾限速? 其實我很想說..