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

On the basic principle of MGR-MGR

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

state machine replication

MGR is essentially a cluster of state machine replicas. In a state machine replication architecture, the database is treated as a state machine. Every write operation causes a change in the state of the database. To create a cluster of highly available databases, a component, the transaction distributor, sends these operations in the same order to multiple databases with consistent initial states, causing them to perform the same operations. Because the initial state is the same, each time the operation is performed, the data on each database remains consistent after each state change.

Distributed state machine replication

A transaction dispatcher is a single point of failure, and distributed state machine replication can be used to avoid single points of failure. In distributed state machine replication, there are multiple transaction distributors that communicate with each other. Transaction distributors can receive transaction requests simultaneously, just as a single transaction distributor receives transaction requests simultaneously. At the application level, concurrent transactions sent to the same transaction distributor have the same effect as those sent to different transaction distributors. Transaction distributors communicate with each other to summarize and sort all transactions. Eventually, there is a complete ordered transaction request on each transaction distributor. Each transaction dispatcher is connected to only one database and is responsible for sending transaction requests to connected databases for execution in turn, which is a model of distributed state machine replication.

Distributed high availability database

Integrating distributed transaction distribution modules into a database system becomes a distributed, highly available database system. Users perform transactions through the user interface of the database. After the database receives the transaction request, it is first processed by the transaction distribution module. The transaction distribution module summarizes and sorts the transactions, and then hands them to the data processing module to execute them in turn. If you strip out the internal details, you'll see that this is a very neat database clustering scenario. MGR is such a distributed, highly available MySQL system.

Taste a paragraph from the official file ~

The most common way to create a fault-tolerant system is to resort to making components redundant, in other words the component can be removed and the system should continue to operate as expected. This creates a set of challenges that raise complexity of such systems to a whole different level. Specifically, replicated databases have to deal with the fact that they require maintenance and administration of several servers instead of just one. Moreover, as servers are cooperating together to create the group several other classic distributed systems problems have to be dealt with, such as network partitioning or split brain scenarios.

Therefore, the ultimate challenge is to fuse the logic of the database and data replication with the logic of having several servers coordinated in a consistent and simple way. In other words, to have multiple servers agreeing on the state of the system and the data on each and every change that the system goes through. This can be summarized as having servers reaching agreement on each database state transition, so that they all progress as one single database or alternatively that they eventually converge to the same state. Meaning that they need to operate as a (distributed) state machine.

MySQL Group Replication provides distributed state machine replication with strong coordination between servers. Servers coordinate themselves automatically when they are part of the same group.

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

Database

Wechat

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

12
Report