Friday 24 July 2009

move from ec2onrails

Recently the performance on FilmAmora.com has been plummeting. And I had no idea why. Often apache was timing out waiting for a mongrel. Very little development has happened recently on FilmAmora, so I was stumped.
So - like a good developer - I took this as a chance to make a drastic move from ec2onrails machines to straight ubuntu, with everything else installed by hand.

It has made a HUGE difference. So much so that I could actually drop a machine from the configuration and still have better response times.

I followed these instructions to get started: rails-nginx-passenger-ubuntu. I also switched to nginx and ruby enterprise edition - just to make following the instructions easier.

So far so good. It took a couple hours and presto a leaner meaner installation. My NewRelic Apdex score went from .5 to .9.

1 comment:

Anonymous said...

The reason would be that Apache's mod_proxy balances using round-robin, which means if you have some slow actions that take a long time to respond to requests, then other requests will pile up behing them, even if other back-end mongrel processes are actually idle.

I've got an unreleased version that's using Passenger and Nginx which doesn't have this problem (it also has a lot of other changes, it's almost a complete re-write), it will be released very soon but it's being held up by a Passenger bug (which will affect all Passenger on Ubuntu on EC2 installations):

http://code.google.com/p/phusion-passenger/issues/detail?id=316

Paul