3

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?

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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