Read/write separation and data separation is the same, read and write separation, is read and write in the same server different database, or different server different database?
1 Master-slave replication, is used to establish a database and the main database exactly the same as the databases environment, called from the database, the main database is generally real-time business database, from the role of the database and the use of a few general:
First, as a backup database, the primary database server failure, you can switch to continue to work from the database;
Second, the database can be used for backup, data statistics and so on, so as not to affect the performance of the main database;
2 Read and write separation, refers to the reading and writing respectively using different databases, of course, usually on different servers; the read and write environment on the same server is estimated to be used for testing.
Generally read and write database environment is configured, a write database, one or more read database, each database on different servers, take full advantage of server performance and database performance, of course, it will involve how to ensure that the data read-write database consistency, this can be done using master-slave replication technology.
The general application is: The business throughput is very large, read the database (can be easily understood as the proportion and impact of the SELECT statement) the load is large;
The official mysql-proxy is a software that implements multiple functions such as read-write separation, load balancing, and so on.
Database one Master multi-principle (Turn)