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 responses to “OK nginx is cool”

  1. 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. 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. I get a 404 on the pcre link.
    (But thanks for the builds… I’ve wondered about nginx for a while.)

  4. static web server? it supports fastcgi.

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

  6. Various people use it for load-balancing.

  7. It shines for load balancing and for serving static files.

Discover more from Jason A. Hoffman

Subscribe now to keep reading and get access to the full archive.

Continue reading