Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm a web developer by day but I haven't had as much server administration experience as I'd like. I'm working on some side projects which are hosted on a 512mb linode server.

The main app that I'm working on is a rails app that really doesn't do anything resource intensive.

Based on the size server I have is it best to run my primary database on the same server?

Would it be detrimental at all to put the primary database on another 512mb linode? Would there be in latency issues, maybe with larger reads/writes, if the second box is in the same data center with a private ip (192.168.x.x)?

Also I'm thinking about trying MongoDB. I know that Mongo loves a lot of memory because the memory mapped file strategy it uses but is there anyway I can get away with running MongoDB on my 512mb linode along side my application or even on it's own 512mb linode?

One last question, is it better to keep the primary and the first slave/replica set on the same box, or should I split the first slave/replica set to it's own box?

share|improve this question
1  
If you're planning to scale up, you'll need to eventually split the database role onto a dedicated server. Doing it that way from the start might help expose any potential problems. –  Nic Nov 10 '11 at 8:26
add comment

2 Answers

Personally I really like MongoDB, but none of his answer is Mongo-specific.

Most likely 512MB of RAM will not be enough for your DB server unless you have a trivial amount of data, and you don't expect it to grow much.

Having your database live on a separate server is a common and well-supported scenario. While there is a higher latency to communicate between your application and DB over the network than on the same system, I prefer to have them separated. If for no other reason (and there are others) than to keep one system/daemon/app 's failures from burning down the entire house.


As far as MongoDB goes, I really like it for it's boostrapability. It's simple in concept, simple in administration, and allows (encourages, even) a flexibility to your data model that a RDBMS) just can't.

share|improve this answer
add comment

Let me rephrase some of your questions.

Do I need to run my database server on a separate machine?

If your application does frequent reads/writes, running database and even all the other dependent components on one node would be much faster than multiple nodes. But in most cases, Sql server consumes more CPU resources than network IO because of the table-join queries and transactions. CPU and memory is more likely to be the bottleneck of your website. So it's practical in web development to have web application and database on separate machines.

Should I go with Sql database or NoSql database?

To build your web application from scratch, I would suggest you start with MySql or any other Sql servers. It's well supported. You can get help from anywhere. If you're planning to run one-node database, Sql server will not be slower than any NoSql database. When your online business grows to very large scale, you may need to redesign your database to fit it into NoSql databases.

http://en.wikipedia.org/wiki/NoSQL

share|improve this answer
    
What are you talking about?! –  gWaldo Jan 15 '12 at 15:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.