Causes and solutions for data delay of mysql replication slave server

Source: Internet
Author: User

The reason for the data delay of mysql replication slave server and the inherent cause of the solution delay is that the master server has two threads from the server, but it can only be executed in a single thread sequence, and there are also network latency and other reasons. Cause of delay: the master server can execute in parallel with multiple threads, but the slave server cannot execute in parallel because two processes need to depend on each other. Long execution query due to inefficient join operations. Hard Disk I/O bottleneck. Data lock. InnoDB concurrent threads. Solution to latency: www.2cto.com 1. effectively organize your data: Data normalization and data partitioning. 2. Divide and conquer each Breakthrough: there are enough slave; when all slave lag (latency) occurs, replication filtering and intermediary slave are required. 3. Find the long-running query and perform the following queries: simplify queries or use transactions instead. When using transactions, consider data loss caused by slave execution. 4. Server Load balancer. 5. Keep the hardware updated. 6. Reduce lock contention: MyISAM lock table and InnoDB row-level Lock. Author: Orange

Related Article

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.