You are not logged in.

#1 2009-09-15 02:13:06

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Different HTTP servers...

I know that Apache is the most widely used http server on the web and has been for quite some time. I plan on setting up my web server with Apache, and using it for 3 out of my 4 websites, but for the 4th website I would like to try an alternative just to learn something else. At first the only other http server software I knew of was lighttp, but I noticed nginx on the recently updated RSS. I clicked over to their website and while they only have 1%-4% of the internet, they have sites like wordpress and hulu... It got me to thinking...

Theoretically the job of an http server is a fairly simple one. It delivers organized text files though the network to client side computer based readers called browsers. The size of a lightly organized text file is relatively minuscule compared to the speeds the internet currently operates, thus a lighter weight http server should be able to serve up more text files faster because they take up less CPU and memory per transaction than a heavier one, thus the attraction of lighttp and nginx.

I figure that while Apache has more functionality, that is not always needed, so it may start seeing it's user base shrink in the future as virtualized processes run the http servers. Virtualization inherently leaves less CPU and RAM than a dedicated 'bare metal' OS, and thus would see the most benefit from the lighter http servers. If this proves to be the case, then more major sites like hulu and wordpress will turn to more efficient solutions. This means that it would be beneficial to me to learn more than just Apache as a newcomer to the field.

What I really want to know is:

1) Do you guys/gals feel that my thoughts are logical and likely start happening?

2) What are the pros and cons of the non-Apache http servers?

3) What sorts of pitfalls am I really looking at when I sacrifice functionality for speed?

Truthfully I am only presuming that Apache is more functional than other solutions while being slightly slower... am I incorrect? I plan on pulling in a great deal more research as well, but I figured I would ask you guys for opinions as Archers tend to be very knowledgeable. (Most way more so than I to be honest.)


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

#2 2009-09-15 10:53:44

faelar
Member
From: Amiens (FR)
Registered: 2007-12-18
Posts: 232
Website

Re: Different HTTP servers...

If you need panels and things like that to manage your server, Apache is the way to go. I really like lighttpd, it is IMO easier to configure.
You can also run two servers on the same computer :
- a light one which simply handle static content
- another for... well... heavy stuff.
But I am far from being an expert on the subject...

Offline

#3 2009-09-15 11:21:55

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: Different HTTP servers...

I would say use apache unless you have a reason not to.

Like the previous poster I like lighttpd. I also find it easier to configure but the main reason I use it is because the machine running it is low on resources, mainly memory. It works like a charm.

Offline

#4 2009-09-15 17:39:25

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: Different HTTP servers...

Don't forget nginx.

Greets.

Offline

#5 2009-09-15 18:16:21

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Different HTTP servers...

you are indeed correct. apache includes everything and the kitchen sink.
I myself prefer to use nginx. It should be noted that nginx doesn't support cgi (it supports fastcgi, but not plain cgi).


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#6 2009-09-15 22:57:17

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: Different HTTP servers...

Thank ya! Are lighttp and nginx the only two alternatives to Apache? I may give them both a spin since I have the available addresses for it.

@cactus: what would you say is the main difference between cgi and fastcgi.... by the name one would think that fastcgi would be the "better" implementation.


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

#7 2009-09-16 01:11:20

canen
Member
From: Jamaica
Registered: 2008-11-28
Posts: 35

Re: Different HTTP servers...

Check Cherokee, http://www.cherokee-project.com/

Has a nice web based admin, no messing with config files (not saying that is necessarily a good thing). It claims to be just as fast or better than Lighty, etc.

Offline

#8 2009-09-16 05:40:39

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Different HTTP servers...

LeoSolaris wrote:

Thank ya! Are lighttp and nginx the only two alternatives to Apache? I may give them both a spin since I have the available addresses for it.

There are others. cherokee is one, lightspeed is another one (but i don't think it is 'free'). I have used neither of them.

@cactus: what would you say is the main difference between cgi and fastcgi.... by the name one would think that fastcgi would be the "better" implementation.

cgi is single execution and terminate. Think of it like the webserver running a shell script. It runs once, returning the output. Each invocation of a page is a new execution of that script, with all the overhead of loading the file, the virtual machine, standard library, etc, etc.

fastcgi is persistent small serving process. you run a fastcgi instance that takes requests on a socket or tcp port (fastcgi protocol). It then returns a result, and waits for the next request. You only have the virtual machine, script, standard library, etc, loaded up at startup of the fastcgi instance. This is generally much faster/more efficient.

http://www.fastcgi.com/devkit/doc/fastc … astcgi.htm  a likely superior description than i just attempted to give...

Last edited by cactus (2009-09-16 05:42:12)


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#9 2009-09-16 12:34:39

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: Different HTTP servers...

Thank you, canen, cactus!

I'll look into cherokee and lightspeed as well, and I am reading up on fastcgi, but your description was pretty spot on cactus.

Thank y'all for your input! I get the feeling that these are the best alternatives for apache, though I will keep an eye out.


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

#10 2009-09-16 15:18:58

atordo
Member
Registered: 2007-04-21
Posts: 147

Re: Different HTTP servers...

I found that lighttpd suited all my needs (PHP, virtual hosts, rewrites...) while having a smaller resource toll in the system. I also find it easier to configure than apache (I don't use web frontends, so just talking about configuration files).

For static content you may consider a really tiny server like webfsd, but I haven't really tried how it behaves under heavy load.

YMMV.

Offline

#11 2009-09-16 16:39:37

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: Different HTTP servers...

atordo wrote:

For static content you may consider a really tiny server like webfsd, but I haven't really tried how it behaves under heavy load.

Ohh one I have not heard about....   good for static content only huh?  That might be useful for how-tos and such to link from my blog. I will have to remember that one.


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

#12 2009-09-16 18:24:15

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Different HTTP servers...

As far as small http daemons go, there's plenty of them, just search AUR and the repos for httpd (or just http, but that requires more sorting through). They have various goals and various capabilities. They can usually do CGI and aim for being small and simple.

Offline

#13 2009-09-18 00:10:08

LeoSolaris
Member
From: South Carolina
Registered: 2008-03-30
Posts: 354

Re: Different HTTP servers...

That's the magic search for the AUR?

Thank ya!   I haven't had the time to sort though the results from http, but I am sure I will get to it sometime.


I keep getting distracted from my webserver project...

huh? oooh...  shiny!

Offline

Board footer

Powered by FluxBB