Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. 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 have a turbogears app that I am bringing live that uses a postgresql DB on the back end. From a performance issue am I better off having the DB and app on separate server or on the same server? If on the same server and I better off having the DB on a separate physical drive?

share|improve this question
Probably best if migrated to – FrustratedWithFormsDesigner May 13 '11 at 21:22
I think this is perfectly acceptable for Programmers. – ChrisF May 13 '11 at 21:47
up vote 1 down vote accepted

For the vast majority of apps, its really not going to matter much where you put the database because the web server isnt likely to ever be pushed to the point where its noticably impacting database performance (or the other way around).

I would recommend keeping it simple and keeping the db on the webserver unless you already know you are going to face a lot of traffic. You can always move the db to a second server (or start replicating to an additional server) as needed.

One particular arrangement I use is to have the main db on the webserver, but to have a replicated copy on a second server. Reporting and similar intensive/not-real-time queries are performed against the replicated copy, but everything else is done against the main db. This prevents any 'runaway' queries done in reports from impacting the main server. But again, this really on helps when there's enough traffic in the first place to make it an issue.

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.