OK nginx is cool

For the simple reason that it’s the only static web server I’ve seen that supports Solaris’s Event Ports

events {
    worker_connections  1024;
    use eventport;
}

I’m cutting over the ton of static servers we have to it.

If you’re interested in a x86/64 build for Solaris

http://assets1.joyent.com/opt-nginx-amd64-build.tgz
http://assets1.joyent.com/opt-pcre7-amd64-build.tgz

Just drop it in place

$ ln -s /opt/pcre-7.0 /opt/pcre
$ ls -l /opt/
nginx/
pcre -> /opt/pcre-7.0/
pcre-7.0/

There’s an dot.xml file in /opt/nginx that you can use for SMF.

(note there’s currently some issues in the eventports implementation, so leave it commented out for now and nginx will use dev/poll)

7 Comments

  1. Posted April 25, 2007 at 1:44 am | Permalink

    I’ve been really impressed by nginx’s static file serving. Not quite as flexible as an apache or a lighttpd, but it’s perfectly functional.

    The biggest user-visible performance benefits I’ve noticed is:

    # Use distributed asset hosts
    # Bundle all your JS and CSS into one file which you munge and combine at deploy time.
    # Make sure you’re sending all the cacheability headers.

    The ‘two-requests-per-host’ limitation in the http rfc makes some js or css heavy sites like the connector feel much much slower than the network tab in firefox indicates. All the rails optimisation in the world won’t help you if your application is spending 90% of its time sending static assets to users

    All the best!

  2. Posted April 25, 2007 at 5:49 am | Permalink

    Event Ports look an awful lot like kqueue on BSD/OS X. Which means that they’re totally awesome, because all the asynchronous APIs completely suck. It’s too bad they didn’t support signals in the queue, though…

  3. Posted April 25, 2007 at 10:14 am | Permalink

    I get a 404 on the pcre link.
    (But thanks for the builds… I’ve wondered about nginx for a while.)

  4. Posted April 25, 2007 at 2:32 pm | Permalink

    static web server? it supports fastcgi.

  5. Joe Van Dyk
    Posted April 25, 2007 at 4:34 pm | Permalink

    So nginx w/ event ports is better on solaris for serving static files than lighttpd?

  6. Posted April 26, 2007 at 12:19 am | Permalink

    Various people use it for load-balancing.

  7. Posted August 22, 2007 at 9:07 am | Permalink

    It shines for load balancing and for serving static files.


Post a Comment

You must be logged in to post a comment.