MYSQL/MARIADB Master-slave replication

Source: Internet
Author: User

MySQL replocation: Nysql replication, MySQL replication defaults to asynchronous working mode
MySQL 's replication function is built-in MySQL, and after it has this feature, and MySQL replication is the MySQL implementation of large-scale high-performance applications of a basic tool, MySQL to complete the level of the basic architecture, in order to be able to cope with more access requests, Usually we need to extend the server, and there are usually two ways to extend it: scale up and scale out;
Scale up:Scale on, also known as vertical expansion, is generally the expansion of the server's memory or CPU number of this is scaling up.
to scale out:scale out, also known as horizontal expansion, compared to a server is not enough, plus a server, no longer enough to add, this situation is scaling out.
In fact, MySQL's replication function is the ability to use MySQL to scale out, that is, the function of horizontal expansion.

the so-called synchronous replication:first, the master server every update of the data is written to the disk file, but also write a to the binary log file, from the server to the primary server to request binary information stored in the trunk log, after saving by the local SQL thread from the log application to the local disk file from the server. When this process is completed and returned from the server to confirm the results to the primary server, the primary server will return the results to the client.
so-called asynchronous replication:when the primary server to write data, write to the local disk, write to the binary file log, write the binary log file and return the results to the client, as to whether the service from the primary server to synchronize the binary log he does not care.
Note: The MySQL on both sides of the copy should be consistent, if not consistent, the master is lower than the slave.
MySQL master-slave service schematic diagram:

This article is from the "Share with June" blog, please be sure to keep this source http://kevin92.blog.51cto.com/6928681/1671113

MYSQL/MARIADB Master-slave replication

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.