Forum Moderators: phranque
I will be launching a site that contains 2 components: A database and a bunch of static articles. I want to keep the database on a seperate server so it doesn't slow down the rest of the site.
So my question is...
I would like the database and all of it's info to reside at a URL similar to:
www.mysite.com/database
and then all of my static articles will just be part of the www.mysite.com domain.
How can I do this using 2 seperate servers? (I would rather not use subdomains, but I will if you guys suggest that is the best way to do it)
thank you,
Therefore, it doesn't make sense to connect to your db through a web address. You can assign a subdomain to your db server, that combined with a port address funnels requests to the db, but it is not necessary. I recommend just using the server IP for the connect strings in your web app.
Hope that helps.
Putting the database server on its own physical server is enough to get the performance benefits you want. Your web application (which uses the database) will physically reside on your web server, not the database server.
Thus, on your web server you will have some files that are static html files (for your articles) and some files written in a dynamic scripting language (php, asp, cfm, etc.) that query your database and display different information depending on what is pulled from the db.
It is not necessary to separate the static files from the dynamic ones onto different servers. The database server handles the queries, parsing and information retrevial back to the web server. That is the load you don't want on your webserver. Your webserver will be focused just on serving readable pages to your visitors as fast as possible.