Quote:
Originally Posted by lakerslive
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.