I have a single blade server to work with (8 CPUs, decent bandwidth, running apache). Users will be connecting to the server to download a single file (either the 5mb or the 70mb version). What can I do to make the server not melt under the load?
The users will first access a PHP file which will determine if they can access the file or not, and if the script passes then they will download the file. I'm just wondering what I can do to make sure that not all the slots fill up and people end up getting timeouts.
I'm anticipating max 10,000 downloads a day. Would a decent blade server be able to handle this?
Firstly it's irrelevant whether it's a blade server or a regular 'pizza-box' server, especially with such a straightforward use-case.
In this particular case having 8 cores is enormous overkill as this application will be 98%+ IO-bound.
Basically there's only two things you can do to make this faster; increase your IO speed (by say moving from 1Gb NICs to 10Gb ones) and ensuring the file is always in cache, unless your PHP code is particularly badly-written it'll barely register on more than a single core.
The way to "best" handle a single static file would be to serve that file from RAM.
I would recommend keeping the "real" copy on disk and during boot create a RAM disk and copy the files to it. Any time the "real" copy is updated, copy it to the RAM disk too.