Archives For mongrel_cluster

nginx

September 3, 2007 — Leave a comment

I switched from apache + mod_proxy_balancer to nginx, which on my lame VPS is saving me around 14 precious MB of memory. There are so many reasons to use nginx. Ezra recommends the monit + nginx + mongrel_cluster stack, and my friend/co-worker has a great conf to start with. It took me about 5 minutes to setup, even with multiple hosts.

My nginx.conf and init script.

Nginx is hyper optimized…

1
2
3
4
./ngx_http_upstream.c:        if (h->value.len == 2) {
./ngx_http_upstream.c:            if (c0 == 'n' && c1 == 'o') {
./ngx_http_upstream.c:        } else if (h->value.len == 3) {
./ngx_http_upstream.c:            if (c0 == 'y' && c1 == 'e' && c2 == 's') {