Home > Database > Mysql Tutorial > body text

MySQL-Concrete analysis of two architectural methods to improve Replication performance

黄舟
Release: 2017-03-13 16:42:05
Original
1351 people have browsed it

1. Architecture design 1

1. Master-slave Service servers can use different storage engines. InnoDB is used on the Master, taking advantage of advanced features such as transactions and row-level locks. MyISAM is used on the Slave, which has better read performance, saves memory, and is easy to back up. You can also use different data types, such as varchar on the Master and char on the Slave. This not only saves space, but also makes use of MyISAM's static table features. 2. In the M-S-Muti Slave solution, the relay slave can also use the BlackHole storage engine. The BlackHole storage engine only records logs and does not write data. Using this feature can greatly improve the performance of relay logs. However, this solution does not support Replication under GTIDs, because BlackHole can only be used with binary logs in StateMent format, and both Row and Mixed formats are not available. 3. In the design of read-write separation, the master-slave server can adopt different
index
solutions. Master can only retain indexes such as primary keys or unique indexes that guarantee data relationships. And Salve does index optimization for query.
2. Architecture design 2

Let frequent updates and real-time data queries be placed on the Master. Then through persistence

Session

, the user who made the modification can see the result first, and others will wait for synchronization to view Replication.

The above is the detailed content of MySQL-Concrete analysis of two architectural methods to improve Replication performance. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template