MySQL Add from library

Source: Internet
Author: User

First, MySQL master-slave replication

Common master-Slave architecture:

    • One master one from : a master, a Slave
    • one master multi-slave : One master, multiple Slave

Specifically, refer to:

Implementation Details

What are the underlying implementation details of MySQL in the master-slave synchronization? After this, we analyze the reason of the master-slave delay and optimize the scheme, prepare the theory.

In summary, MySQL's master-slave replication: 异步单线程 .

    • Master1 IO线程 , responsible for transmitting to slave binary log ( binlog )
    • SlaveOn 2 Threads: IO 线程 and 执行SQL的线程 , where:
      • IO线程: Append the obtained log information to the relay log;
      • 执行SQL的线程: Relay log content is detected to be updated, then execute SQL on slave;

Special Note : MySQL 5.6.3 started to support " 多线程 the 主从复制 ", 一个数据库 一个线程 多个数据库 can 多个线程 .

Complete Master & Slave between the master and slave replication processes:

MySQL Add from library

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.