View Single Post
Old 10th March 2011, 13:57
talkingnews talkingnews is offline
Join Date: Jan 2011
Posts: 67
Thanks: 15
Thanked 6 Times in 6 Posts
Default Apache2 alongside lighthttpd or nginx?

Here's my situation:

At the moment, I'm quite happily running apache2, mysql, php 5 etc and some required apache mods (rewrite, headers, expire, deflate etc) plus mod-pagespeed which appears to be working well.

All this is quite happy within the confines of a 512Mb RAM Ubunutu 10.10 VPS with current and future expected traffic levels.

BUT... at some point soon, I'm going to be installing an image cache and serving 80Mb audio files. A pre-written php class takes a folder of images, resizes them to two smaller sizes, and dumps them in subfolders, and it's THESE images which get served up.

Have I understood correctly that each time apache is required to serve a file, it needs another micro "instance", complete with all the memory of loading all the mods, and when the connection is closed, that instance is freed?

So, where I have "keepalive" set to 2 seconds and my page always loads within 1 second with a few 25kb images, it's fine now.

BUT... let's say the page loads, then someone starts listening to the 80mb file of 1 hour (or downloads it, say 20 minutes) does that mean that apache instance and chunk of memory is "used" for all that time?

Therefore, when I read about lighthttpd and nginx being good for having "tiny" footprints, is it feasable to go down the road of excluding apache2 from serving certain subdirectorys, and force one or other of these "micro servers" (any preferences out there?) to serve the file, freeing up the big beast of apache to serve more "main" dynamic pages?

Does all that make sense? I'm at the stage where the more I read now, the more conflicting views there seem to be. (The option of "get more memory" is not viable at the moment).
Reply With Quote
Sponsored Links