Best web server when resources are not limited?

Discussion in 'Hosting Talk & Reviews' started by vpsnewb, May 20, 2013.

  1. vpsnewb

    vpsnewb New Member

    33
    0
    Mar 25, 2013
    Let's say you're not limited by resources and you purely want the best performance and security from your web server. On a small VPS you may be restricted to utilizing Nginx, for example, as it's more lightweight than Apache out of the box. But, can Apache perform just as well when given proper time and resources? What about lighttpd and litespeed? Hell, does anyone use Cherokee anymore? (It's actually kind of neat)

    So, imagine you aren't constrained on resources and you're setting up a server to host a busy site. Which web server do you choose, and why?
     
  2. SeriesN

    SeriesN New Member Verified Provider

    753
    152
    Mar 29, 2013
    Resource not limited? Why not apache and then move everything to RAM ;)
     
  3. Ruchirablog

    Ruchirablog New Member

    190
    25
    May 18, 2013
    Well Nginx will still be better. 
     
  4. Mun

    Mun Never Forget

    892
    237
    May 9, 2013
    Depends on your application and what you are doing.

    Youtubes front end is lighttpd, and its backend for PHP is apache. In many cases still today apache can handle php faster and quicker then any other application as it is built into the process.

    I for one couldn't beat my friends load times on his apache setup even though I had a heavily tuned php-fpm/nginx and he had apache. (We were doing php files)
     
  5. TruvisT

    TruvisT Server Management Specialist Verified Provider

    398
    144
    May 16, 2013
    Was the hardware specs the same?
     
  6. sv01

    sv01 Slow but sure

    426
    87
    May 17, 2013
    OMG that really cool, I might testing this when I'm not busy. compare to nginx
     
  7. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,717
    May 13, 2013
    Cherokee is awesome, but the head developer went to work for a big corporation and the project has idled. Unsure if I'd deploy it heavily at this point.

    Nginx is the defacto standard at this point for more 'knowledgeable' folks.  Really solid piece of software with tons of features.  

    Would be great to Cherokee-like admin for Nginx.  That would be purrrrfect.
     
  8. SeriesN

    SeriesN New Member Verified Provider

    753
    152
    Mar 29, 2013
    But why not apache? Given the condition above, Apache can beat anything. I am loving me some apache 2.4 right now.
     
  9. NodeBytes

    NodeBytes Dedi Addict

    687
    92
    May 15, 2013
    I'm using apache. It's super quick! My personal site www.brendancarlson.me is hosted on a dedicated server with apache and it loads really fast.
     
  10. MannDude

    MannDude Just a dude vpsBoard Founder Moderator

    5,036
    2,634
    Mar 8, 2013
    MannDude
    Cherokee was pretty slick when I decided to give it a go. Didn't use it for anything production, just wanted to use it. If Nginx has a similar admin/backend/GUI like Cherokee did, my god. That'd be awesome.

    I like Apache because of how well documented it is. Still the most used webserver, but I do prefer Nginx over it as I've made myself more familiar with it over the past year or so. My experience with lighttpd isn't that great, although lighttpd is powering vpsBoard at this current time. I did use Litespeed in the past, but I found Apache + Varnish Cache out performed Litespeed, so I can rule out Litespeed.

    TL;DR: I don't know.
     
    Last edited by a moderator: May 20, 2013
    SeriesN likes this.
  11. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,717
    May 13, 2013
    I missed the last line, about large RAM and what would you use...

    Nginx is what I use.  Still use other servers though behind Nginx :)  Lots of Apache stuff that just works and porting it to Nginx isn't quick and easy to translate, rules, etc.

    Larger sites I'd do:  Varnish ---> Nginx ---> whatever server.  But this is where good amount of static or media content.

    Apache is always capable and perhaps competitive with tweaking, but I've always hated the config style of Apache.
     
  12. shovenose

    shovenose New Member Verified Provider

    819
    101
    May 13, 2013
    Apache FTW
     
  13. ihatetonyy

    ihatetonyy New Member

    91
    45
    May 15, 2013
  14. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,717
    May 13, 2013
    Problem is those numbers are old --- 2011 :)

    The top speed is Lite + Xcache --- assuming they are serving the same document every time.  So entirely out of the cache/RAM on every request after the first.

    They test Apache fronted by Varnish and it didn't lag Lite + Xcache a whole heck of a lot considering.

    Oddly they didn't test Nginx fronted by Varnish.

    Whole bunch of data missing from the tests too.

    When you have the luxury of serving the same document a gazillion times from cache, it is hard to beat plain old Varnish.
     
  15. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    My preference is lighttpd. I use it for small php sites and as a front end proxy for my thin/rails apps.

    Proxy setup is quite easy:

    Code:
    $HTTP["host"]=~ "domain.com|domain2.com"  {
            proxy.balance = "fair"
            proxy.server =  ("" =>
                            (( "host" => "127.0.0.1", "port" => 4001 ))
                            )
    }
    
    
     
  16. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,717
    May 13, 2013
    That's simple as it possibly can get....  Bunch of other crud for the config file though?  Or will lighthttpd run with literally just that?

    Have to love front end proxy feature.  It is what I use most --- with Nginx.
     
  17. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    The configuration of lighttpd is quite simple. You have one lighttpd.conf in /etc/lighttpd

    and some additional module config files:


    /etc/lighttpd/conf-enabled$ ls -al
    total 8
    drwxr-xr-x 2 root root 4096 Apr 19 09:15 .
    drwxr-xr-x 4 root root 4096 Apr 10 12:23 ..
    lrwxrwxrwx 1 root root 30 Apr 10 12:12 05-auth.conf -> ../conf-available/05-auth.conf
    lrwxrwxrwx 1 root root 35 Apr 10 12:12 10-accesslog.conf -> ../conf-available/10-accesslog.conf
    lrwxrwxrwx 1 root root 29 Apr 10 12:12 10-cgi.conf -> ../conf-available/10-cgi.conf
    lrwxrwxrwx 1 root root 33 Apr 10 12:12 10-fastcgi.conf -> ../conf-available/10-fastcgi.conf
    lrwxrwxrwx 1 root root 31 Apr 10 12:12 10-proxy.conf -> ../conf-available/10-proxy.conf
    lrwxrwxrwx 1 root root 29 Apr 10 12:12 10-ssl.conf -> ../conf-available/10-ssl.conf
    lrwxrwxrwx 1 root root 32 Apr 19 09:15 10-status.conf -> ../conf-available/10-status.conf
    lrwxrwxrwx 1 root root 37 Apr 10 12:25 15-fastcgi-php.conf -> ../conf-available/15-fastcgi-php.conf

    B.t.w. I do like the linking to /conf-enabled and /conf-disabled.

    That is my whole lighttpd.conf: (so leaving https, auth and php config to the files in /conf-enabled)


    server.modules = (
    "mod_access",
    "mod_alias",
    "mod_compress",
    "mod_redirect",
    "mod_rewrite"
    )

    server.document-root = "/var/www"
    server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
    server.errorlog = "/var/log/lighttpd/error.log"
    server.pid-file = "/var/run/lighttpd.pid"
    server.username = "www-data"
    server.groupname = "www-data"
    index-file.names = ( "index.php", "index.html" )
    url.access-deny = ( "~", ".inc" )
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

    dir-listing.encoding = "utf-8"
    server.dir-listing = "disable"

    compress.cache-dir = "/var/cache/lighttpd/compress/"
    compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )

    include_shell "/usr/share/lighttpd/create-mime.assign.pl"
    include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

    $HTTP["host"] =~ "^domain\.net$" {
    url.redirect = ( "^/(.*)" => "http://www.domain.net/$1" )
    }

    $HTTP["host"]=~ "domain1|domain2" {
    proxy.balance = "fair"
    proxy.server = ("" =>
    (
    ( "host" => "127.0.0.1", "port" => 4001 )
    ))
    }

    $HTTP["remoteip"] =~ "127.0.0.1" {
    alias.url += ("/munin/" => "/var/cache/munin/www/")
    }

    $HTTP["host"]=~ "domain.org" {
    server.document-root = "/var/www-org"
    }

    So what I really like about lighttpd is the fact that based on some rules you can override quite every single server parameter.

    Alias, rewrites, Proxy, document-root, just everthing can be configured based on hosts, ips, etc.
     
    Last edited by a moderator: May 21, 2013
  18. Ruchirablog

    Ruchirablog New Member

    190
    25
    May 18, 2013
    Your site is very simple and behind cloudflare. So it should run fast but its not really that fast for me
     
  19. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
  20. prometeus

    prometeus New Member Verified Provider

    64
    33
    May 17, 2013
    Anybody is running apache 2.4 with php for mid sized sites? How it compare with 2.2?