Reference Book Uploads Posting Guidelines
#21  dgatwood 01-31-2015, 03:28 AM
The core problem with downloads is that they behave differently than other resources.
  1. They take a long time to download, during which time one client slot on the server is occupied. When all the slots fill up, you end up waiting a painful amount of time for any new requests, because they end up queued up behind the downloads. Fixing that on older servers requires serious server reconfiguration.

    If mobileread is actually using nginx as a web server, it shouldn't be impacted too badly by this issue. If that's just a proxy around Apache, yeah, that's gonna suck unless you spawn a second Apache server instance to handle just the downloads. But really, if you're serving lots of downloads, it is probably best to just shoot Apache in the head and move to something that actually handles large numbers of clients sensibly.
  2. They need to be served as raw file resources, not served through PHP scripts or other CGI-like software, so that clients can properly negotiate a restart from where the last attempt left off in the case of a download failure. (I think there are ways to handle that using PHP, but it ain't pretty.) This makes record-keeping potentially problematic.
  3. In memory-starved servers, they can blow out your disk cache pretty badly, resulting in considerable performance degradation.

For these reasons, it is often better to host downloadable content on a separate server that hosts large file downloads exclusively, but YMMV.

 « First  « Prev   (3/3)
Today's Posts | Search this Thread | Login | Register