Deployment Question

I am getting ready deploy my app and trying to figure its configuration to allow for scaling if needed. I am looking at deploying on Amazon. I do not expect high traffic in the beginning (though that is completely a conjecture), i was thinking of deploying the whole app including a MySQL on the single instance. I am trying to figure out how difficult would it be if I had to separate the components with having the db on its own instance with balance loading and front end servers all running on their own instances. Is it easy to make that transition or is it difficult enough that one should just setup the more redundant setup now to avoid the difficulty.

thanks!

I wouldn't worry about scaling till you have to do it.

But, going from a 1 server setup (app and db on the same server) to a 2 server setup (1 app and 1 db) is pretty easy. All you'd have to really do to your app is change your database.yml to point to your new db server.

OK sounds good.

So, I imagine one will have to port the data over to the new server. It just seems like there might be some loss of data if the time takes too long between swithcing. i guess we cross the bridge when it comes.

I would suggest to start small at first (single-server instance) unless you have a pretty good indication that your site is gonna be a huge success on the day of launch. Should that be the case, you can investigate some of the cloud- hosting solutions which would scale quite nicely as needed (and you pay per actual usage). A couple of suggestions for Rails apps are Heroku and Engine Yard. Of course, you can go with a cheaper shared hosting platform for your single server. Separating that architecture into a multi-server architecture is not straighforward but highly doable. Lots of tutorial around in the web on how to do that type of setup.

- Ricardo

Thanks for the advice. I decided to go with running it on a single instance for now. in order to get the most out of the singel instance, what configuration would you recommend?

passenger v monglre v thin

apache v nginx

i looked around and there are many tutorails but htere does not seem to be one way people consistently find easy and efficient in keeping the app fast. any recs?