kevj2 Posted July 13, 2009 Posted July 13, 2009 Is there any way to run like 2 databases on the one script but set it up so that if one database goes down or times out it will connect to the other one automaticly and it will then display at the bottom saying like"Connect to backup database,Main database will be back online shortly". I was just wondering this as it would be cool to have the back up like that. plus i feel lots of game wound benifit from this mod. Thanks Kevj2 Quote
Haunted Dawg Posted July 13, 2009 Posted July 13, 2009 Re: [Mccodes v2] DatatBase quiestion You would need your own server and then setting up clustering. Quote
kevj2 Posted July 13, 2009 Author Posted July 13, 2009 Re: [Mccodes v2] DatatBase quiestion what is clustering and i might be getting a server soon :) not hur yet Quote
Haunted Dawg Posted July 13, 2009 Posted July 13, 2009 Re: [Mccodes v2] DatatBase quiestion Google "Clustered Servers" Quote
kevj2 Posted July 13, 2009 Author Posted July 13, 2009 Re: [Mccodes v2] DatatBase quiestion would you need a clusterd server to run 2 db on 1 game,and is there any way to like have both of them working on the registration bage and login page but when you login ip pick one randmly and connects then to that server then displays connect to db1 or db2 or would that need a clusterd server. Quote
Haunted Dawg Posted July 13, 2009 Posted July 13, 2009 Re: [Mccodes v2] DatatBase quiestion Clustered server mean's that you have 2 servers and if one fail's or drop's then your other one kick's in automaticly and everyone is still playing.. all the file's and databases are syncronized so they are alway's up to date on both server's. If the first one drop's and sends to second server, once first one is up all the database table's are then updated from the second one. Quote
Miniman Posted July 13, 2009 Posted July 13, 2009 Re: [Mccodes v2] DatatBase quiestion I think what he means is how can he make it so some are connected to Server 1 and others are connected to Server 2. I guess he wants to make some speed and prevent lag on either of the servers. 100 users on server 1 100 users on server 2 I think Quote
Magictallguy Posted July 13, 2009 Posted July 13, 2009 Re: [Mccodes v2] DatatBase quiestion You would need your own server and then setting up clustering. You can do that, or you can create another database with the same data and use MC Craps' change_database() function :P Quote
Haunted Dawg Posted July 13, 2009 Posted July 13, 2009 Re: [Mccodes v2] DatatBase quiestion But not what he is trying to get, what he want's is when one server fail's the other kicks in.. @mtg Quote
kevj2 Posted July 13, 2009 Author Posted July 13, 2009 Re: [Mccodes v2] DatatBase quiestion I think what he means is how can he make it so some are connected to Server 1 and others are connected to Server 2. I guess he wants to make some speed and prevent lag on either of the servers. 100 users on server 1 100 users on server 2 I think Yea that is what i am looking for you where right the first time HD but i dont have enought money at mometn to use cluster servs i will maybe get that eventually:) so what the easy way so that it connects to the server if there is like 100 on each as show above ? Quote
Haunted Dawg Posted July 15, 2009 Posted July 15, 2009 Re: [Mccodes v2] DatatBase quiestion Buying 2 hosting plan's on the exact same server and joining them then using an count and if and a php code to connect to db 2. Quote
Lithium Posted July 15, 2009 Posted July 15, 2009 Re: [Mccodes v2] DatatBase quiestion Buying 2 hosting plan's on the exact same server and joining them then using an count and if and a php code to connect to db 2. this could be an option... but in a failover... you'd be without both ;) yet this is quite the way to a cheap approach, using as HD said some php function to use only one db, and if it triggers any error... jump to server 2. So... 2 hosting plans on 2 different servers (and be sure that atleast one of them allows remote access to DB's (not only localhost)) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.