I am not exactly sure why this isn’t documented but nginx as of 0.7.x supports event ports

This is a huge performance win for Solaris. Nginx can avoid the 0(n) file descriptor problem with event ports support.

To enable event ports add this to your nginx.conf


events {
    use eventport;
}

Here is our performance-proven configuration that we use on fabulously40

The follow configuration will help you survive massive traffic with nginx. We have served 4.4 million requests in a 4 hour time frame with no issues. That is 305req/sec.


worker_processes  8;
worker_rlimit_nofile 10240;
events {
    worker_connections  8024;
    use eventport;
}
http {
    keepalive_timeout  20;
    server_names_hash_bucket_size 64;
    sendfile        on;
    tcp_nopush     on;
    client_max_body_size 150m;


    gzip  on;
    gzip_comp_level  5;
    gzip_vary       on;
    gzip_proxied    any;
    gzip_types      text text/plain text/css text/xml application/xml text/javascript text/html application/x-javascript;
}