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 improvements in Group replication and 5.X of MYSQL 8?

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

Editor to share with you what improvements MYSQL 8 Group replication and 5.X have, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

MYSQL 8 Group Replication recently began to do experiments. MGR of MYSQL 5.7has found a lot of problems and solved many problems in less than a year of use. The first feeling that MYSQL 8 GROUP REPLICATION found in the build environment was that nodes entered the cluster faster than MYSQL 5.7s.

There is no harm without comparison, so let's take a look at the improvements in Group replication and 5.x of MYSQL 8.

The information displayed by performance_schema.replicatiton_group_members is different.

Students who are familiar with MGR of MYSQL 5.7x usually use the above VIEW to query the status of nodes in the cluster, but the information shown in MYSQL 5.7x is only

CHANNEL_NAME

MEMBER_ID

MEMBER_HOST

MEMBER_PORT

MEMBER_STATE

In fact, the most important display is missing, that is, which machine is the master? Of course, you can deploy multi-hosts, but in practical applications, there are only a few and unimportant systems, and there are differences in the way they are used.

MYSQL 8.0 directly makes up for this problem, as you can see in the following figure, there are two more columns than MYSQL 5.7x, one column is which is the master, and the other is the version.

Some people asked, what is the use of displaying the version, of course it is useful, whether I can connect with different versions of MGR, and when I check the status of different versions, do I just bring out the version number to let me know at a glance?

Of course, this is just the beginning. The missing function in MGR, which was most complained about in MYSQL 5.7, is that you can't choose which one is the master. Although it can be done by weight later, it is still inconvenient. Now MYSQL MGR can directly choose its own master. Through the following figure, you can clearly see how to manually automatically select the master and switch.

SELECT group_replication_set_as_primary ('3dca6cf9-8a66-11e9-bd97-000c29ba69f2')

And MYSQL 8.0 also adds some new parameters and features to improve the application of MGR, such as

Group_replication_exit_state_action

The previous version has been working after the members lost contact with the cluster for various reasons, and cannot be selected, but now this problem can be selected.

With the above parameters, you can choose whether to turn it off or set it to read_only

Of course, there is also a key point to complain about, that is, due to network problems, nodes that are kicked out by mistake did not debug such parameters in 5.7. but now there are such parameters in MYSQL 8.

Group_replication_member_expel_timeout

With this parameter, you can easily avoid some unnecessary node kicking problems caused by network problems or sudden network traffic.

At the same time, the cost of information exchange in distributed databases should also be considered, because there is a rollback problem, which can not be avoided. So MYSQL 8.0 can adjust such parameters.

Group_replication_transaction_size_limit

Default 8.0 is set to 143MB, transaction control is not set in MYSQL5.7, and there is no limit by default. So often do not know how to use MYSQL, MYSQL when the ORACLE of the dear, you may be in the case of big business, you will be kicked back, this does not blame MYSQL, blame you do not really understand the essence of MYSQL use.

Having said that, I would like to say that some parameters are no longer supported by 8.0.

If on MYSQL 5.7X, this command is often used to add slave libraries to the cluster if the GTID is inconsistent, (of course, you should first ensure that the three nodes of the data should be consistent, use this method)

Group_replication_allow_local_disjoint_gtids_join

In fact, there is still a lot to say in terms of monitoring, but let's call it a day and have a rest.

These are all the contents of this article entitled "what are the improvements in Group replication and 5.X of MYSQL 8?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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