[Blog recommendations] Microsoft Azure deployment MYSQL-MMM process details (1)

Source: Internet
Author: User

[Blog recommendations] Microsoft Azure deployment MYSQL-MMM process details (1)

This blog post is from the Bkjia blog star, Mr. Li Xiaozhu. If you have any questions, please go to the blog homepage for an interactive discussion!

Blog blog address: http://lixun.blog.51cto.com/4198640/1629177

MMM is the Master-Master Replication Manager for MySQL (mysql Master Replication Manager) A Scalable script suite for monitoring, failover, and management of mysql master/Master replication configurations (only one node can be written at any time ), this suite can also perform read load balancing on any number of slave servers with standard master-slave configurations, so you can use it to start virtual ip addresses on a group of slave servers. In addition, it also has scripts for implementing data backup and node-to-node re-synchronization.

MySQL itself does not provide a replication failover solution. The MMM solution can implement server failover to achieve high availability of mysql.

MMM project from Google: http://code.google.com/p/mysql-master-master

Official Website: http://mysql-mmm.org

The main features of MMM are provided by the following three scripts:

  • L mmm_mond monitors the daemon process for all monitoring jobs and determines the removal of nodes.
  • L mmm_agentd is a proxy daemon running on the mysql server. It is provided to the Monitoring node through a simple remote service set.
  • L mmm_control manages the mmm_mond process through the command line

In the master-master environment of two nodes, MMM uses five IP addresses. Each node uses a fixed IP address, which will never change.

Two reader IPs (read-only) and one writer IP (updates). The following three IP addresses (two reader IP addresses and one Writer IP address) are migrated between the two nodes, the migration depends on the availability of the node.

Normally, the active master has two virtual ip addresses (reader and writer), and the standby master has a virtual ip address (reader ), if the active master fails, all the virtual IP addresses of reader and writer will be allocated to the standby master.

The specific configuration information is as follows:

 
 
  1. Role IP address host name server-id
  2.  
  3. Monitoring 10.0.0.6 monitor-
  4.  
  5. Master1 10.0.0.4 db1 1
  6.  
  7. Master2 10.0.0.5 db2 2
  8.  
  9. Slave1 10.0.0.7 db3 3

The service ip information in the service is as follows:

 
 
  1. IP address role description
  2.  
  3. 10.0.0.80 the write application connects to this ip address to write requests to the master database.
  4.  
  5. 10.0.0.90 the read application connects to this ip address for read requests
  6.  
  7. 10.0.0.100 the read application connects to this ip address for read requests

The deployment architecture is as follows:


Advantages and disadvantages of MySQL-MMM

Advantages: high availability, good scalability, automatic failover in case of faults. For master-master synchronization, only one database write operation is provided at the same time to ensure data consistency.

Disadvantage: The Monitor node is a single point and can be combined with Keepalived to achieve high availability.


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.