Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Why nginx instead of lighttpd?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Why nginx instead of lighttpd?

OneTwoOneTwo Member
edited April 2012 in General

Why choosing nginx over lighttpd when lighttpd it's easier to configure and have more plugins?

«13

Comments

  • RophRoph Member
    edited April 2012

    No ridiculous memory leaks, active development, it's the future.

    And its name is cooler.

    I'm not sure what you mean about the plugins. It's relatively easy setting up Nginx/PHP-FPM.

    Your configuration point is a matter of opinion. Nginx's config is pretty easy once you understand how it works.

    Thanked by 2TheHackBox yomero
  • since when lighttpd have ridiculous memory leaks?

  • It's been years since I've payed attention to it, but it was something about php and fastcgi not returning memory to the OS. So as you use up cgi script memory, it accumulates until you run OOM

  • InfinityInfinity Member, Host Rep
    edited April 2012

    @OneTwo said: since when lighttpd have ridiculous memory leaks?

    A few years ago afaik, last time I used it.

    Thanked by 2yomero lbft
  • NateN34NateN34 Member
    edited April 2012

    Lighttpd is dead.

    Every big site that used to use Lighttpd like Wikimedia, SourceForge, etc all switched to Nginx.

    As far as the memory leak, I knew a few people that used it about 6 months ago and they had major memory leak issues. I do not see anything in the changes that they fixed it either, so it most likely still exists.

  • When I use nginx as caching proxy it tries to cache space from the memory (leak). Am I doing something wrong?

  • @NateN34 said: Lighttpd is dead.

    Does it has any bugs to be fixed?

  • Does it have new features... ?

  • OneTwoOneTwo Member
    edited April 2012

    @yomero said: Does it have new features... ?

    I'm not missing anything from lighttpd. What's missing? Nginx on the other hand need more sh*t IMO.

  • InfinityInfinity Member, Host Rep

    @OneTwo said: Nginx on the other hand need more sh*t

    @OneTwo said: What's missing?

    Thanked by 2TheHackBox yomero
  • raindog308raindog308 Administrator, Veteran

    @OneTwo said: I'm not missing anything from lighttpd. What's missing? Nginx on the other hand need more sh*t IMO.

    Care to elaborate?

    My mindset is:

    • if I want lean/mean/low-memory, or if it's all-static: nginx
    • if I need lots of features or doing shared hosting: apache
    • if I suddenly was transformed into the Star Trek mirror universe: IIS
    • if it was 1998: Netscape web server. Like my bank.
    Thanked by 1djvdorp
  • @raindog308 where is lighttpd?

  • tuxtux Member

    @OneTwo said: @raindog308 where is lighttpd?

    nowhere

    Thanked by 1Infinity
  • raindog308raindog308 Administrator, Veteran

    I have nothing against lighttpd - that list is just what I use.

    I should add something like microhttpd or boa will be on that list once I get around to firing something up on my 32/64 SecDgn LEB :-)

  • boa's latest version was on 23 Feb 2005.

    could you make a small tutorial about installing mirohttpd and how much memory it takes to run? ;)

  • yomeroyomero Member
    edited April 2012

    Ahm...

    wget http://www.acme.com/software/micro_httpd/micro_httpd_12dec2005.tar.gz
    tar xf micro_httpd_12dec2005.tar.gz
    cd micro_httpd
    make
    

    That's all

    Put this in /etc/xinet.d/microhttpd

    service microhttp
    {
        disable     = no
        socket_type = stream
        protocol    = tcp
        wait        = no
        type        = unlisted
        user        = root
        port            = 800
        cps             = 100 5
        # Location of Binary
        server          = /path/to/micro_httpd/micro_httpd
        # Location of Web Pages
        server_args     = /var/www
    }
    

    Stop xinetd, start xinetd

    Serving a 200MB file at Ethernet 100mbps

    # ps aux | grep micro
    root     10459 57.0  0.0   1808   568 ?        Rs   12:05   0:01 micro_httpd /var/www
    

    1.8MB Virt / 568KB Res

    Oh, and every connection will use that amount, since each process is started with inetd

    Five minutes
    Is that hard to search in Google?

    Thanked by 1djvdorp
  • RophRoph Member

    Have any of you used thttpd?

    Doug maybe? Or maybe I'm getting confused.

  • yomeroyomero Member
    edited April 2012

    @Roph said: Have any of you used thttpd?
    Doug maybe? Or maybe I'm getting confused.

    AFAIK he was for Kukkaisvoima. Now in blite he is using nginx+php

    Is pretty similar to this thttpd, but it supports cgi and other stuff.

    BTW, I use this one

    http://goo.gl/HQ9A0 nweb

    For a couple of files in one of my boxes :P

  • joepie91joepie91 Member, Patron Provider

    I have not experienced any issues with lighttpd, and I've hosted some high-traffic/high-peak sites. nginx, on the other hand, caused some ridiculous memory usage together with php-fpm (technically speaking php-fpm was eating the RAM, but as there does not seem to be another option for php + nginx...)

    lighttpd has handled 400k PHP pageloads in a day with about 512MB of RAM for me. Worked fine.

    I always find the 'active development' point to be somewhat of a weak point. If everything works and all required functionality exists, what do you need development for? Requiring development for the sake of development doesn't make any sense.

  • @yomero said: Is that hard to search in Google?

    For someone who has a looooot of things to do in a day, yes it is.

  • dmmcintyre3dmmcintyre3 Member
    edited April 2012

    @joepie91

    I have nginx with php-fpm and mysql running a largeish MyBB forum on a 128mb VPS.

    pool:                 www
    process manager:      ondemand
    start time:           28/Mar/2012:14:25:39 -0400
    start since:          778424
    accepted conn:        1211444
    listen queue:         0
    max listen queue:     62
    listen queue len:     128
    idle processes:       4
    active processes:     1
    total processes:      5
    max active processes: 5
    max children reached: 341

    It averaged 134,462.403 php requests a day since March 28. The max children reached value is so high because of mysql backups locking mysql for ~5 seconds every 30 minutes.

    RAM use is low as well.

                 total       used       free     shared    buffers     cached
    Mem:           115         81         33          0          0         13
    -/+ buffers/cache:         68         47
    Swap:          127          0        127
    
    Nginx up 5.7 days
    
    Active connections: 46 
    Reading: 1 Writing: 1 Waiting: 44 
    
    Connections Accepted:  349782
     Connections Handled:  349782
          Total Requests: 1292248
    
     Requests/Connection: 3.7
         Requests/Second: 2.6
    
  • raindog308raindog308 Administrator, Veteran

    You backup FreeVPS.us every 30 minutes?

  • ITT: People who don't know anything about Lighttpd, spitting myths about Lighttpd from four years ago.

    It's not dead. Development is very active. There is no memory leak. There's a reason so many developers use it as a backend instead of Nginx.

  • I have a 512MB Linode VPS running Apache, OpenVPN, PiePanel, XFCE4, VNC, A Game Server.

    I don't think I've done that bad..

    root@xebec:~# free -m

    total used free shared buffers cached
    Mem: 497 474 22 0 22 247
    -/+ buffers/cache: 205 292
    Swap: 511 124 387

  • @Daniel

    Wait until you start getting hits on that website and watch your VPS drop.

  • @NateN34 said: Wait until you start getting hits on that website and watch your VPS drop.

    PiePanel is the most recourse intensive thing, it manages 50+ MC Servers, constantly checking them, pushing updates etc etc.

  • raindog308raindog308 Administrator, Veteran

    @OneTwo said: For someone who has a looooot of things to do in a day, yes it is.

    Then why are you reading LET? :-)

    Thanked by 2yomero TheHackBox
  • raindog308raindog308 Administrator, Veteran

    Here's a pretty current look at marketshare...doesn't say anything about quality but anyway:

    http://news.netcraft.com/archives/2012/04/04/april-2012-web-server-survey.html

    Significant thing is that nginx has now passed IIS and is second to Apache.

  • RophRoph Member
    edited April 2012

    Stable release 1.4.30 / December 18, 2011; 3 months ago
    Preview release 1.5.0 / February 3, 2007; 5 years ago

    And So many? 2010 / April 2012. Lighttpd barely registered on 2010, it's now irrelevant in 2012.

    [edit] Raindog308 jinxed me :P

  • @subigo said: ITT: People who don't know anything about Lighttpd, spitting myths about Lighttpd from four years ago.

    It's not dead. Development is very active. There is no memory leak. There's a reason so many developers use it as a backend instead of Nginx.

    exactly. lighttpd is perfect and very stable.

Sign In or Register to comment.