|
Lighttpd is absolutely neccessary if you intend to have more than 100 users who may download at the same time, especially if your files are large enough.
Readfile() will try to read the whole file into memory and will not release it until the transfer is complete, so e.g. if 100 users will request a 10Mb file at the same time you will quickly lose 1G of memory which will quite definitely lead to swapping and probably to server stop responding at all.
You may replace readfile() with reading by blocks, but in this case you will have to support Range header (required for resuming downloads and parallel downloads) while lighttpd will handle it by design.
|