Page 1 of 1

Web Application Scalling

Posted: Wed Sep 26, 2012 1:12 pm
by newkid
Hi,

I am currently developing a web application and have a few questions I'd like you to help me with. As one of the techniques to allow an application to scale is to enabled the ability of upgrading from a single DB server to a master-slave setup. My questions is, can I do so using a web hosting service? That is, using the database provided can I set my database in this manner and access each server individually in my application? If so, how can this be accomplished.

Thanks

Re: Web Application Scalling

Posted: Wed Sep 26, 2012 2:32 pm
by hallsofvallhalla
Quite easily. You simply set the database as a dynamic property in the players table or column. So you use one master DB that hosts accounts only and then it stores what DB the players character resides along with worlds and such. Let one DB hand out where everything is stored using queries and dynamic variables to fill in table names.

Code: Select all

$worldDB = $playerinfo3['playerworld'];

select * from `$worldDB` 

Re: Web Application Scalling

Posted: Wed Sep 26, 2012 8:06 pm
by Jackolantern
If you need something more than that, you can go with full replication, which can be setup in several ways, including a master/slave configuration as you mentioned. However, that will require the cooperation of your web host, and they will have to offer the feature. You will need to check with them on that, and hopefully if it is a larger host they have some guides on how to use their facilities to do it. :)