Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm setting up a database server as a separate VM in my server so that I can control resources, and make backups of just that instance. I own a server that will reside in a colo soon. Is this the best way to approach my DB regarding scalability? Are there any security concerns? Do I listen at localhost still, even though it's a separate instance? And, is there any benefit to running your DB (PostgreSQL in my case) in the same machine as your application (web based SAAS application in my case)?

share|improve this question
up vote 1 down vote accepted

Scalable systems usually partition the application and the database, so you're on the right track. Security should be good as long as you use the built-in IP filtering of pgSQL.

As far as benefits of running everything on one server, its definitely easy to backup, but all it takes is one hardware failure and your entire application goes down.

If you're just getting started, money is probably the biggest factor towards not doing this, but I would suggest two physical servers running two VMs each (one application, one DB) and setup to be able to failover to each other.

share|improve this answer
Thanks. I never log in on SF (just SO), so I'm a bit late. – orokusaki Sep 9 '10 at 17:49

I'd say you start with one machine hosting both application and database. It is still quite easy moving the database to a separate machine or cluster or whatever when you find a need for it.

When setting up the system, just keep in mind that your infrastructure might need to change in the future. Maybe assign a hostname for the database already from the beginning, so you don't need updating the application whenever the database is moved. Just point the hostname to the new location.

Having a lot of hardware (be it physical or virtual) when you don't need just lead to overhead and potential failures. You may or may not ever need more resources, but don't overgrow from the beginning.

Keep it simple!

share|improve this answer

Your Answer


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.