I'm moving a rails application from heroku to AWS in order to increase reliability and control over the stack architecture.
I was planning to use amazon RDS as I will need several app servers, and a managed MySQL solution on amazon network seemed a perfect match for our case. I configured the app server and new relic for tracing and profiling.
Unfortunatly my server perform worse than it did on heroku altough we're using 2 m3.medium instances for our tests (compared to a 2 1x dynos on heroku).
Looking at new relic it came out that is the database requiring 90% of time (~1.0 sec!) for simple select queries (nothing too complex as it worked out of the box on heroku/cleardb). Simple SELECT's are running in a second, so I tried out by tweaking the default configuration as I found some suggestions on a blog post, but nothing has changed (now the config is restored to the default)... I also tried by enabling IOPS (1000 where new relic counts ~6 req/s on the server -not already publicly available of course-), and still nothing has changed...
I am now moving from the
db.m3.xlargeto check if something changes...
Just for testing purposes I installed a local mysql on the machine and well... pages are server in ~0.2 seconds, so I am pretty sure it's the RDS instance causing the remaining delay.
Any suggestion on what can I try? I don't really need a big instance as
db.m3.xlarge at the moment.