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
- Marble Paint
(Friday 02/4/2011 – 1 Comment) - More Flickr Original Updates
(Sunday 01/23/2011 – 13 Comments) - Flickr Original updates
(Saturday 08/7/2010 – 19 Comments) - LED Light for iPhone 4
(Monday 06/28/2010 – 65 Comments)
