I would like to ask you the idea of using php for read/write splitting. Is there a simple method for synchronization (or even without any php code modifications) to implement or similar functions? (I am very lazy) I would like to ask you about the idea of using php for read/write splitting and the synchronization problem,
Is there a simple way to implement or perform similar functions without making any changes to the php code?
(I am very lazy)
Reply content:
I would like to ask you the idea of using php for read/write splitting and the synchronization problem,
Is there a simple way to implement or perform similar functions without making any changes to the php code?
(I am very lazy)
Read/write splitting without any php code modification. Of course, we recommend the official mysqlnd-ms extension of php!
Let's just take a look at the SQL statement. When the select statement starts, the slave database is connected, and the other master databases are connected. The change volume is still small.
Of course you can. mysql Master/Slave solves this problem.
Certainly, as you can't move the code, it's what O & M DBAs need to do. All mysql reads and writes are allocated to different DB databases for data, and master-slave synchronization is configured, ensure data consistency
Try mysql-proxy and so on. There are many similar middleware Products available. You can search for them online.
1. Use the framework to switch between read splitting, which is very convenient.
2. Use Mysql middleware to automatically separate read/write requests to different servers. The Mysql Master/Slave mentioned by others cannot solve your problem. You need to add read/write splitting on the basis of the Master/Slave. Middleware such as mysql-proxy, Atlas, for more comparisons see: http://www.guokr.com/blog/475765/
Use mysql cluster
I really think this is a good Community, so many people who are interested in it.