When my user base grows, does Heroku take care of setting up multiple database servers for my Rails app or do I have to configure it manually somehow?
In other words, does Heroku scale well and correctly (replicate servers) when needed?
When my user base grows, does Heroku take care of setting up multiple database servers for my Rails app or do I have to configure it manually somehow?
In other words, does Heroku scale well and correctly (replicate servers) when needed?
I think that's the idea of Heroku - they handle all the administration and setup for you. You can add resources to your application to scale up instantly.
From the Heroku docs:
For Rails apps, database connectivity is configured automatically — your app should just work.
Their shared database plan, Koi, is $15 and offers 20GB of space. Performance shouldn't be much of a worry though it won't always be predictable since other users' actions can have an impact on it. As far as scaling goes, as your website grows and your database along with it, you can upgrade to a new plan or dedicated database server easily. Just make sure you scale your dynos as your traffic grows.
Heroku has everything managed in their cloud and has three ways to scale: db, dynos, and workers. Heroku will not scale your application for you. It is your responsibility to adjust settings that control how much cpu / database storage. I will outline how Heroku works below but right now directly answer the question by saying that there are two options for databases with Heroku: shared, dedicated. Dedicated machines keep info on one machine but machines are beefed up accordingly which Heroku dubs compute unit while shared dbs share machines for databases.
If you are reading this answer and don't know about Heroku it's more important to go check them out than reading on.
First let me say its FREE to deploy applications on Heroku unless you want to add resources. Deployment is done with your git such as:
Whenver you want to update your your app it's three things:
How is this possible. with the heroku gem.
It's kinda scary how much better Heroku takes care of deploying and scaling Ruby applications so I also had this question and did some research. It turns out that there are really only three things you need to know to scale your application with Heroku:
All you have to do is increase your dynos (basically thin processes) or workers (for delayed jobs) to scale your application.
There are basically three ways to sale your application
Dynos and workers both run about $.05 / hour
Then you can choose from 5 Databse options.
And then there are dedicated servers for your DB which work like this:
The only thing that is will be dedicated to one server is your database and you have to choose an option for that to happen. Everything else is in the cloud layered into different servers like this: