nginx+mongrel vs apache+passenger (+wp super cache)
Sunday 11/23/2008 – Category: Uncategorized
I've liked using Phusion Passenger as a stupid-easy deployment solution for Rails (and now merb) apps, but running three Rails apps and one Merb app on a Slicehost 256slice, things got kind of crowded. I had to set the PassengerMaxPoolSize variable to 2 in order to keep my free memory at an acceptable level, and I got annoyed when Passenger would automatically kill my apps after a certain amount of idle time or when another app was started up. Though things were generally zippy once the instances were loaded, there was a laggy startup time while spawning the new app.
Because of this, I decided to take another shot at deploying with mongrel+nginx--I had used it for a site awhile back but had gotten lazy. It turns out that nginx (a super-fast lightweight web server) is a lot easier and less confusing to setup and configure than Apache...and after setting up the reverse proxy stuff my Rails/Merb apps were humming along smoothly.
Another cool thing about nginx is that it serves static assets (stylesheets/js/images/etc) really fast. To take advantage of this on my blogs, I installed WP Super Cache (following this howto) to generate static files. This speeds up load time since Wordpress doesn't have to hit the database at all once a page is cached.
Overall I'm happy with the move to nginx/mongrel...and now my server is running 30% free memory (as compared to just a few MB to spare with my previous setup).
Leave a Reply
Recent Posts
- LED Light for iPhone 4
(Monday 06/28/2010 – 38 Comments) - WWDC 2010: Worth Every Minute
(Monday 06/14/2010 – No Comments) - Flickr Original for Safari 5!
(Wednesday 06/9/2010 – 15 Comments) - iPad thoughts
(Friday 04/2/2010 – 1 Comment)
