[RESOLVED] Manage Load on servers with databases
I've always wonder how large sites handle massive databases?
Is it efficient for say facebook to have 1 server for friends database, another server with just the wall posts database etc etc? You can use different connections to get the data, and use another server for comparing data on temp tables?
Or how does PHP coding change if you have the MySQL database fragmented across multiple servers?
If someone could clear up my understanding it would be appreciated :).
Re: Manage Load on servers with databases
as long as you have
host, username and password
You should be able to connect to any database.
But mostly all use same database just whit diffent tabel
Re: Manage Load on servers with databases
also i would like to add that its not very secure to use multiple databases or those that can be accessed remotely..
xampp recently added a new security feature that only allows you to connect to phpmyadmin locally, and if you attempt to connect remotely it will only give you an error message.
Re: Manage Load on servers with databases
Massive sites typically don't use MySQL; it gets inefficient at that level (or so is my understanding). NoSQL systems are often employed instead, often with the big guys (Amazon, Google, Facebook) developing their own flavors of it in-house. I don't claim to understand the intricacies of those sorts of systems (and I will likely never need to).
@Justa - there's nothing crucially insecure about using multiple databases, or remotely accessible ones. And why are you bringing up xampp at all?
Re: Manage Load on servers with databases
Google use MySQL— see: http://www.mysql.com/customers/view/?id=555
and in particular: http://www.bytebot.net/blog/archives...ysql-at-google
It would not be practical to spread individual tables of a relational database across different servers. The typical approach is to use replication of the whole database. One web application might have one master database server and three slave servers (for example): read operations can be made against any server, while write operations are made against the master which then propagates the changes to the slaves. The master is responsible for keeping all of the slaves in sync. This approach works for most high traffic applications because read operations are typically much more frequent than writes.