Lighttpd vs Apache HTTP Server

When I was seeing netcraft site to know the web server which sourceforge.net is running on, I saw lighttpd. I was really surprised because I am expecting some popular Apache http server or enterprise webservers like sun webserver.

Then I just wanted to try it; so I have downloaded lighthttpd and built it manually on my solaris 10 box. Then I found that I did not have php in my machine. So, I have downloaded that from sun freeware site and installed it using pkgadd. Then I came to know that lighttpd only supports php built with fastcgi support. So, I have downloaded the source from the same sun freeware site and built it with fastcgi support. After that, I have edited 4-5 lines in lighttpd config file. Thats it.. wrote some helloworld php script and tested it. it is working fine!!
From my experience it is too fast. I did not benchmark the results, but it is faster than apache. One excellent feature in lighttpd is the ability to spawn fastcgi processes outside the server whenever necessary. If my server is getting heavy traffic, then I will spawn 2 or 3 fastcgi processes [these processes can be spawned on different machines also]. Server will automatically do the load balancing.

If my application is a 2 tier application and traffic is very high, then I will definitely go for lighttpd. There are also other modules like redirector, alias etc. The only drawback that I found in lighttpd is very less community support. Compared to apache which has many modules contributed by community, lighttpd has very less or no community base. I felt one more feature missing in lighttpd is connector to JavaEE application servers. In apache, mod_jk is there. If similar module is there for lighttpd, I will use this webserver for all my enterprise applications also.

Advertisements

5 Comments

  1. Dejan Lekic said,

    May 8, 2007 at 2:42 am

    Yeah, I switched to Lighty few years ago because i needed some free RAM on my server. After installation I got avg. 25MB more free RAM. Since than I never use apache, whenever I can (sometimes I must 😉 ).
    Speaking of mod_jk … There must be some bridge for JavaEE. Have you tried to download Java FastCGI implementation from http://www.fastcgi.com ? I think it should not be difficult to use JavaEE from your Java FastCGI application. If not, why You do not write one? 😉

    Kind regards

  2. DP said,

    May 9, 2007 at 11:44 am

    At the time, when I tried lighttpd, I could not find any webserver-j2ee appserver bridge. I agree with you on writing a new bridge if one is not available. But, I am not working on that webserver technology now. So, not so interested.

    Thanks
    DP

  3. iCalvyn said,

    September 14, 2008 at 11:46 am

    I am looking for lighttpd web server’s information and found ur website. Seen like every one is talking o lighttpd are better then apache… as u mention, no community base is hardly solve problem when we found 1

  4. Morten Slott Hansen said,

    August 7, 2009 at 2:58 pm

    Here is how to get lighttpd talking to tomcat:
    http://rackerhacker.com/2007/04/05/lighttpd-proxy-to-tomcat/

  5. February 21, 2010 at 8:51 pm

    Light httpd is there to stay


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: