3

We have a product that uses Postgres for RDBMSish data (accounts, billing, etc.) and MongoDB for each of the accounts data (which obviously can't be maintained on Postgres).

In local development we set up our boxes to have the psql instance and mongod instance on the same box (accompanied with the application server and web server), but as we are moving to beta phase I'd like to know what is the best set up for production environment or rather what is easier to set up and maintain.

An instance (cloud server) holding both the databases together or should we split instances and each should have his own machine? (Obviously the second option is always better)

Has anyone ever experienced with these sorts of setups and have some insights? We also look at the possibility of migrating to MongoDB completely but that possibility is further down the road.

3
  • "which obviously can't be maintained on Postgres" Why not? Commented Feb 3, 2013 at 14:28
  • document-style data, it doesnt have a structure Commented Feb 3, 2013 at 17:19
  • With Postgrsql 9.2 you have native json support and xml support has been there for a while. So i would say it supports "document-style data". Commented Mar 27, 2013 at 10:05

1 Answer 1

5

It's generally a bad idea to host two database-like programs on the same system. MongoDB in specific is designed to be a sole tenant of whatever machine it is on. Postgress is a bit more friendly, but will also be a lot happier as a sole tenant.

There are caveats, though:

  • If the system has enough RAM for both databases to fully cache their databases in RAM, then they can happily coexist given sufficient I/O.
  • If the databases are very asymmetric (wee account metadata DB in psql, monster-sized account DB in mongo), you can share so long as you have enough RAM for fast Mongo performance and the bit needed for psql.
  • If both databases are large enough that they can't fit in RAM when running by themselves, then having two servers is strongly indicated.

If you do decide to consolidate onto Mongo in the future, you can happily reduce down to a single server for DB.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.