我要评分
获取效率
正确性
完整性
易理解

MyCAT for MySQL Read/Write Splitting

The read/write splitting of MyCAT depends on the primary-secondary replication architecture of MySQL. In the read/write splitting configuration of MyCAT, writeHost serves as the primary node, and readHost serves as the secondary node. In normal cases, MyCAT uses the first writeHost as the writer node, and all DML SQL statements are sent to this node. After data is written to the writer node, the data on the primary node is kept consistent with that on the secondary node through primary-secondary replication. If read/write splitting is enabled for MyCAT, SELECT SQL statements are sent to the readHost for execution based on the read/write splitting policy.

Figure 1 MyCAT for MySQL read/write splitting