Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the functions of mysql group replication

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what is the role of mysql group replication". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the role of mysql group replication"?

1. Fault detection. Group replication includes a failure detection mechanism that finds and reports which servers are down.

If server A does not receive a message from server B within the specified time, it will time out and arouse suspicion. So, if the team agrees that the suspicion is true, then the team decides that the given server will be down. That is, other members of the team will take coordinated decisions to exclude a given member.

If the server is isolated from the rest of the group, it is suspected that all other servers have failed, but there is no result because an agreement cannot be reached with the group (because the legal number of votes cannot be ensured). When the server is isolated from the group in this way, the local transaction cannot be performed.

2. Group membership service. MGR relies on the group membership service and is built into the plug-in.

It defines which servers are online and participate in the team. The list of online servers is often called a view. As a result, each server in the team has a consistent view, including members who are actively involved in the team at a given time.

The server agrees not only to commit the transaction, but also to the current view. Therefore, if the server allows the new server to be part of the group, the group itself will be reconfigured as an integrated server, triggering a view change. Conversely, if the server leaves the group, the group dynamically updates the configuration, triggering a view change.

Members leave components, active and passive. Initiating a dynamic reconfiguration of the group will trigger all other members to reach a new view agreement without a server. When leaving passively, such as an unexpected stop or network outage, the fault detection mechanism recommends that the group be reconfigured, which requires the consent of most of the servers in the group. If the group cannot reach an agreement, the system cannot change the configuration dynamically, which means that the administrator needs to step in to solve the problem.

3. Fault tolerance.

On top of implementing the Paxos distributed algorithm, MGR requires most of the servers to be active to reach the legal number of votes to make a decision. This directly affects the number of failures that the system can tolerate, but does not affect the group replication itself and the overall functionality. The number of servers required to tolerate f failure machine n is: n=2*f+1.

In practice, in order to tolerate a failed machine, the group must have three servers, because at this time, if one server fails, there are still two servers that make up the majority, and allow the system to continue to make automatic decisions. continue to provide services. But if the second server continues to fail, the group (the remaining servers) will be blocked because there is no majority of votes to decide.

Thank you for your reading, the above is the content of "what is the role of mysql group replication". After the study of this article, I believe you have a deeper understanding of the role of mysql group replication, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report