Web Application Scalling

For discussions about game development that does not fit in any of the other topics.
Post Reply
newkid
Posts: 2
Joined: Sun Sep 23, 2012 6:49 pm

Web Application Scalling

Post 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
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Web Application Scalling

Post 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` 
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Web Application Scalling

Post 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. :)
The indelible lord of tl;dr
Post Reply

Return to “General Development”