Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th March 2011, 13:57
talkingnews talkingnews is offline
Member
 
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
  #2  
Old 11th March 2011, 16:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Quote:
Originally Posted by talkingnews View Post
when I read about lighthttpd and nginx being good for having "tiny" footprints
That is true.

Quote:
Originally Posted by talkingnews View Post
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?
We use lighttpd for static content only, and it is very fast. In addition to that, if you serve your pages from two hosts (e.g. PHP/HTML from Apache and images, CSS, JAvascript from Lighttpd), it will make your pages load faster because browsers are configured to download only two files from one host in parallel. So if you use two hosts, browsers can download four files in parallel instead of just two if you just used one host (in fact, you can trick browsers by creating CNAME records that in fact point all to the same host, but that's another story).

But I can't say if it makes sense to use Lighttpd or nginx in your case because you don't serve static files (if I understood you right, your files are generated dynamically). You'd have to try it and see if it makes a difference.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
talkingnews (11th March 2011)
  #3  
Old 20th May 2011, 23:02
erosbk erosbk is offline
Senior Member
 
Join Date: Mar 2011
Posts: 337
Thanks: 49
Thanked 36 Times in 30 Posts
Default

Falko, is there any problem to use lighthttpd + apache while using ispconfig 3? is there a how to or tutorial? I want to use lighthttpd for static content, and if not, just bypass them to apache2... but I want it for every vhost, and transparent for ispconfig! is it posible?

Thanks for your help! (does it really worth? my web/deb only server es xeon 3440, 4gb mem, 900gb hdd)
Reply With Quote
  #4  
Old 22nd May 2011, 21:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
 
Default

ISPConfig 3 does not support lighttpd, so it is at your own risk if you want to use it. I can't say if/how this works.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
erosbk (23rd May 2011)
Reply

Bookmarks

Tags
apache2, lighttpd, nginx, ubuntu 10.10, webserver

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3.0.1.4 causes Apache to have too many open files gkovacs Installation/Configuration 29 27th February 2013 09:59
Whole server went down wxman General 25 28th September 2012 19:32
yet another apache2 tuning thread Ovidiu Server Operation 65 5th July 2011 16:07
apache2 + nginx + memcached for a fast server payaa Server Operation 0 12th October 2010 20:09
ISPConfig 3 Security mnzava Installation/Configuration 8 8th March 2010 12:00


All times are GMT +2. The time now is 03:16.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.