GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How Can I have 2 databases hosted on 2 servers (https://gfy.com/showthread.php?t=1137470)

lakerslive 04-02-2014 05:59 PM

How Can I have 2 databases hosted on 2 servers
 
under 1 domain... this will be for community site. Can this be done with php? (i am assuming this is how siteslike youtube/google/xvideos work)

tnx

lonerunner 04-02-2014 10:16 PM

cdn and mirroring, clustering or replication, search on google about that it might help

Kephael 04-02-2014 10:16 PM

You can use database replication to have the same database hosted on multiple servers locally. Most RDBMS will generally have this sort of functionality.

PornDiscounts-V 04-02-2014 10:47 PM

Talk to your host. They probably do this all day long for vps servers.

TidalWave 04-02-2014 10:57 PM

You need a semi-complicated setup to keep both DB's fully sync'ed at all times, and also update when one goes down for whatever reason.

Do you want both active at the same time to distribute load, but also be available in case one goes down? (active/active) or do you want one 1 active and 1 for redundancy (active/passive)?

The active/passive method is way easier to implement and manage then trying to keep 2 dynamic DB's update to date in real time with active/active.

It is not easy and won't be cheap or included in some cheap type of hosting -- even if they call it "managed".

You want real sysadmins to do this shit for you, and professionals charge money.

sandman! 04-02-2014 11:03 PM

sure it can be done not super easy to do tho :)

LucyVanAngel 04-02-2014 11:11 PM

I need this as well. Who here can do that job? I already talked to my host (nationalnet) they said i need a programmer to split the dbs.

EddyTheDog 04-02-2014 11:20 PM

Quote:

Originally Posted by LucyVanAngel (Post 20036558)
I need this as well. Who here can do that job? I already talked to my host (nationalnet) they said i need a programmer to split the dbs.

It will depend on what and why - If its just a WP install that needs splitting between servers then that's easy - It gets more complicated from there really...

Of course when I say easy - Its easy when you know how.....

There is not an easy answer - Its going to cost basically...

EddyTheDog 04-02-2014 11:28 PM

Just as an after thought - If you are paying for managed hosting this what you are paying for - Its an upsell for them as well...

dunhill 04-03-2014 07:19 AM

Quote:

Originally Posted by lakerslive (Post 20036329)
under 1 domain... this will be for community site. Can this be done with php? (i am assuming this is how siteslike youtube/google/xvideos work)

tnx

The only thing you can do from php is a basic roundrobin to choose a database server, but you need a solution to ignore a failed slave. This can be achieved either by creating a file that stores the alive slaves(you can go further by setting a weight for each one based on the slaves server load) or at the DNS level(this will work out of the box on your php script and it's easy to update on my opinion).

It is a lot to talk about the database replication, some people needs it for redundancy, some people needs it to scale up starting from a simple master-slave setup and going to multi master setup when a single master become a bottleneck.

Assuming that you need a simple master-slave setup, if you have a managed plan and they can't do this simple job for you then it's time to drop that host. Period.

TidalWave 04-03-2014 10:21 AM

Like I said above, "managed server", doesn't mean something like THIS would be included -- especially if you are not paying enough.

Handling DB replication is a big job. It's almost part of your programmers/DB administrator -- not your server sysadmin.

You need to wear multiple hats to have DB replication active/active.

It's going to cost you money, professionals COST MONEY.

Your $199/month "managed server" IS NOT going to cover that.

I would expect at least another $199/month on top of your server cost for initial setup and on-going management of your DB replication.
You may even have an initial setup fee of $500~ to get everything setup and running smoothly at first -- but do not expect it to continue running smoothly, they break quite easy and often.
You will have more stability with active/passive (one running the main DB, one for backup only) then active/active (both actively serving queries and staying in-sync with each other - because BOTH will be receiving updates at the SAME time, so one can't copy off another).


If you're at this point, the cost should be feasible from a budget perspective. If you're site isn't important enough or making enough money but you "need" all this, perhaps its time to rethink whether your site should even exist.


.


All times are GMT -7. The time now is 07:01 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123