A method, system, device and storage medium for dynamic allocation of communication links

By dividing the communication links into N groups and dynamically adjusting them using load balancing principles, the problem of low communication link utilization is solved, achieving more efficient data synchronization and stability.

CN119766751BActive Publication Date: 2025-11-04INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411999261.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-11-04
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The existing communication link allocation method results in low communication link utilization. Remote replication relationships and consistency groups within and between clusters cannot be effectively utilized, and a single abnormal disconnection affects all services on the entire link.

Method used

A dynamic allocation method is adopted to divide the communication links into N groups, and the communication links are adjusted within the group according to the load balancing principle. The communication links are allocated to the remote replication relationship and consistency group in the manner of (ID primary + ID secondary) % X + X×Z and (G primary + G secondary) % X + X×Z, and the load status is monitored and adjusted to achieve load balancing.

Benefits of technology

It improves the utilization rate of communication links, ensures the convenience and reliability of the solution, reduces the impact of a single anomaly on the entire link, and enhances the stability and efficiency of data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766751B_ABST
    Figure CN119766751B_ABST
Patent Text Reader

Abstract

The application discloses a dynamic allocation method and system of a communication link, a device and a storage medium, and belongs to the technical field of communication. The method comprises the following steps: when a remote replication relationship is established within a cluster or between clusters, allocating a communication link for the remote replication relationship from all communication links of the cluster; when a remote replication consistency group is established within the cluster or between the clusters, allocating a communication link for the remote replication consistency group from all communication links of the cluster; dividing all communication links of the cluster into N groups, determining a load state of each communication link in each group for each group of communication links; and moving a remote replication relationship and / or a remote replication consistency group of one or more communication links in the group to other communication links in the group according to a load balancing principle for each group of communication links. The application can effectively improve the utilization rate of the communication link and guarantee the convenience and reliability of the implementation of the scheme.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication technology, in particular to a dynamic allocation method, system, device and storage medium of communication link. BACKGROUND

[0002] Remote replication relationship within or between clusters and remote replication consistency group, the main end and the auxiliary end need to rely on communication link for information transmission, the number and quality of the used communication link determine the speed and stability of remote replication data synchronization. The current communication link allocation mode is as follows: for the remote replication within the cluster, the used transmission link stream_id=0. For the remote replication between clusters, the transmission link stream_id=16xother_cluster. The parameter other_cluster represents the remote replication peer cluster in the ordering ID of the peer relationship of the local cluster, for example, when each cluster supports up to 3 cluster peer relationship, the parameter other_cluster takes the value of 1 or 2 or 3. As can be seen, the remote replication relationship within the cluster is transmitted through stream 0, and the remote replication relationship between clusters is transmitted through stream 16, 32 and 48, so that for the remote replication relationship within the cluster and the remote replication relationship between clusters, the allocated communication link is fixed, and the utilization rate is only 1 / 16. When a single remote replication exception affects the disconnection of the entire link, it will affect all remote replication services of the communication link.

[0003] In addition, for the remote replication consistency group within or between clusters, the current allocation mode cannot achieve effective utilization of the communication link.

[0004] In summary, how to effectively improve the utilization rate of the communication link is a technical problem that the technical personnel in the field urgently need to solve. SUMMARY

[0005] The purpose of the present application is to provide a dynamic allocation method, system, device and storage medium of communication link, so as to effectively improve the utilization rate of the communication link.

[0006] To solve the above technical problems, the present application provides the following technical solutions:

[0007] In a first aspect, the present application provides a dynamic allocation method of communication link, comprising:

[0008] When the remote replication relationship within or between clusters is established, a communication link is allocated for the remote replication relationship;

[0009] When the remote replication consistency group within or between clusters is established, a communication link is allocated for the remote replication consistency group;

[0010] All the communication links are divided into N groups, and for each group of communication links, the load status of each communication link in the group is determined; N is a positive integer not less than 2.

[0011] For each group of communication links, in accordance with the principle of load balancing, the remote replication relationship and / or remote replication consistency group of one or more of the communication links in the group are moved to other communication links in the group.

[0012] On the other hand, when establishing a remote replication relationship within or between clusters, allocating a communication link for the remote replication relationship includes:

[0013] When establishing a remote replication relationship within or between clusters, the communication link numbers assigned to the master and slave ends according to the remote replication relationship are both equal to (ID). 主 +ID 辅 The communication link is allocated to the remote replication relationship in the manner of % X + X×Z;

[0014] Among them, ID 主 This refers to the logical storage unit number on the master end in the remote replication relationship; ID 辅 This represents the logical storage unit number of the slave node in the remote replication relationship; X is a preset positive integer, % X represents the remainder after taking X, and Z represents the sorting number of the peer cluster in the partner cluster of the local cluster. For remote replication relationships within the cluster, the value of Z is zero.

[0015] On the other hand, when establishing a remote replication consistency group within or between clusters, allocating a communication link for the remote replication consistency group includes:

[0016] When establishing a remote replication consistency group within or between clusters, the communication link numbers assigned to the master and slave ends of the remote replication consistency group are both equal to (G). 主 +G 辅 The remote replication consistency group is allocated a communication link in the manner of % X + X×Z;

[0017] Among them, G 主 This indicates the remote replication consistency group number of the master end within the remote replication consistency group; G 辅 This represents the remote replication consistency group number of the slave node in the remote replication consistency group; X is a preset positive integer, %X represents the remainder after taking X, and Z represents the sort number of the peer cluster in the partner cluster of the local cluster, and for remote replication consistency groups within the cluster, the value of Z is zero.

[0018] In another aspect, further comprising:

[0019] recording the communication link number assigned by the secondary end of the remote copy consistency group to the primary end of the remote copy consistency group, and recording the communication link number assigned by the primary end of the remote copy consistency group to the secondary end of the remote copy consistency group.

[0020] In another aspect, further comprising:

[0021] monitoring the connection state of each of the communication links, and when an abnormal connection state of any of the communication links is monitored, performing an abnormal handling operation.

[0022] In another aspect, for each of the groups of communication links, moving the remote copy relationship and / or the remote copy consistency group of one or more of the communication links in the group to other of the communication links in the group according to a load balancing principle, comprising:

[0023] determining whether the current average load of the ith communication link in the group is greater than K times the current average load of the (i+a)%Yth communication link in the group;

[0024] if greater than K times the current average load of the (i+a)%Yth communication link in the group, moving part of the load of the ith communication link to the (i+a)%Yth communication link; wherein a is a positive integer, Y is the total number of communication links in the group, %Y means taking Y as a remainder, K is a preset number greater than 1; the load of a communication link includes the remote copy relationship and the remote copy consistency group of the communication link;

[0025] determining whether the current average load of the ith communication link in the group is greater than K times the current average load of the (i+b)%Yth communication link in the group;

[0026] if greater than K times the current average load of the (i+b)%Yth communication link in the group, moving part of the load of the ith communication link to the (i+b)%Yth communication link; wherein b is a positive integer, and b≠a;

[0027] determining whether the current average load of the ith communication link in the group is greater than K times the current average load of the (i+c)%Yth communication link in the group;

[0028] if greater than K times the current average load of the (i+c)%Yth communication link in the group, moving part of the load of the ith communication link to the (i+c)%Yth communication link; wherein c is a positive integer, and b≠a≠c;

[0029] After i takes values from 0 to Y-1 successively, the load balancing of the group of communication links is completed.

[0030] In another aspect, moving part of the load of the i-th communication link to the (i+a)%Y-th communication link comprises:

[0031] Moving 1 / M of the load of the i-th communication link to the (i+a)%Y-th communication link, M is a positive integer greater than 1.

[0032] In a second aspect, the present application provides a dynamic allocation system of communication links, comprising:

[0033] A first communication link allocation module, configured to allocate a communication link for a remote replication relationship when the remote replication relationship is established within a cluster or between clusters;

[0034] A second communication link allocation module, configured to allocate a communication link for a remote replication consistency group when the remote replication consistency group is established within a cluster or between clusters;

[0035] A load state determination module, configured to divide all the communication links into N groups, and for each group of the communication links, determine the load state of each of the communication links in the group; N is a positive integer not less than 2;

[0036] A communication link adjustment module, configured to for each group of the communication links, move the remote replication relationship and / or the remote replication consistency group of one or more of the communication links in the group to other communication links in the group according to the principle of load balancing.

[0037] In a third aspect, the present application provides a dynamic allocation device of communication links, comprising:

[0038] A memory, configured to store a computer program;

[0039] A processor, configured to execute the computer program to implement the steps of the dynamic allocation method of communication links as described above.

[0040] In a fourth aspect, the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program is executed by a processor to implement the steps of the dynamic allocation method of communication links as described above.

[0041] By using the technical solution provided by the embodiment of the present application, the communication links can be dynamically allocated to improve the utilization rate of the communication links. Specifically, when a remote replication relationship within a cluster or between clusters is established, a communication link can be allocated to the remote replication relationship from all the communication links of the cluster to ensure the implementation of the remote replication relationship. When a remote replication consistency group within a cluster or between clusters is established, a communication link can also be allocated to the remote replication consistency group from all the communication links of the cluster to ensure the implementation of the remote replication consistency group. After the allocation is completed, the communication links can be further dynamically adjusted in the present application. Specifically, considering that if the dynamic adjustment of the communication links is performed in the global range, the implementation will be relatively complex, therefore, in the present application, all the communication links are divided into N groups, N is a positive integer not less than 2, so that the dynamic adjustment of the communication links is performed within the group, to ensure the convenience and reliability of the implementation of the scheme. For each group of communication links, the load state of each communication link in the group needs to be determined, and then according to the load balancing principle, the remote replication relationship and / or the remote replication consistency group of one or more communication links in the group are moved to other communication links in the group, that is, by adjusting the communication links to which the remote replication relationship and / or the remote replication consistency group belong, the dynamic adjustment of the communication links is realized, and the load balancing is ensured, so that the utilization rate of the communication links can be effectively improved.

[0042] In summary, in the present application, the utilization rate of the communication links can be effectively improved, and the convenience and reliability of the implementation of the scheme are ensured. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0044] Figure 1 The implementation flowchart of the dynamic allocation method of the communication links provided by one specific embodiment of the present application;

[0045] Figure 2 The structural schematic diagram of the dynamic allocation system of the communication links provided by one specific embodiment of the present application;

[0046] Figure 3 The structural schematic diagram of the dynamic allocation device of the communication links provided by one specific embodiment of the present application;

[0047] Figure 4 The structural schematic diagram of the computer readable storage medium of the present application. DETAILED DESCRIPTION

[0048] The core of the present application is to provide a dynamic allocation method of communication link, which can effectively improve the utilization rate of communication link and guarantee the convenience and reliability of the implementation of the scheme.

[0049] In order to make the personnel in the technical field better understand the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0050] Please refer to Figure 1 , Figure 1 The implementation flowchart of the dynamic allocation method of communication link provided by a specific embodiment of the present application can include the following steps:

[0051] Step S101: When establishing the remote replication relationship within the cluster or between the clusters, allocate the communication link for the remote replication relationship from all the communication links of the cluster.

[0052] Specifically, the present application scheme can be applied to each cluster. When establishing the remote replication relationship within the cluster or between the clusters, it is necessary to allocate the communication link for the primary and secondary ends of the remote replication relationship. The communication link ids of the primary and secondary ends are usually consistent. The specific communication link allocation method can be set according to actual needs, for example, the original default communication link allocation method can be used.

[0053] Still taking the example that each cluster supports at most 3 cluster partnerships, for example, cluster A establishes a remote replication relationship within the cluster, the communication link for the remote replication relationship can be allocated from all the communication links of cluster A, specifically, the communication links for the primary and secondary of the remote replication relationship are allocated, and as described above, generally the communication link ids of the primary and secondary are generally consistent. Since the default communication link allocation mode is adopted, in this example, the communication link number allocated for the remote replication relationship is 0, that is, the communication links allocated for the primary and secondary are both stream_id=0. The stream refers to the communication link for transmitting information, in the scheme of the present application, specifically the communication link used for data transmission between the primary and secondary of the remote replication, and the stream_id is the communication link id, or the communication link number. When establishing a remote replication relationship between clusters, the allocation mode for allocating the communication links for the primary and secondary of the remote replication relationship can be represented as stream_id=16×other_cluster. The parameter other_cluster represents the remote replication peer cluster in the ordering id of the local cluster partnership, since in this example, each cluster supports at most 3 cluster partnerships, the value of the parameter other_cluster is 1 or 2 or 3. For example, after cluster A and cluster B establish a partnership, a remote replication relationship is established between cluster A and cluster B, according to the above formula, the stream_id of the communication links allocated for the primary and secondary of the remote replication relationship is 16×1=16, that is, for the primary of the remote replication relationship (cluster A), the communication link allocated for the remote replication relationship is stream16 of cluster A, and similarly, for the secondary of the remote replication relationship (cluster B), the communication link allocated for the remote replication relationship is stream16 of cluster B. Similarly, for example, cluster A and cluster C also establish a partnership, and a remote replication relationship is established between cluster A and cluster C, the stream_id of the communication links allocated for the primary and secondary of the remote replication relationship between cluster A and cluster C is 16×2=32. For example, cluster A and cluster D also establish a partnership, and a remote replication relationship is established between cluster A and cluster D, the stream_id of the communication links allocated for the primary and secondary of the remote replication relationship between cluster A and cluster D is 16×3=48.

[0054] In one specific embodiment of the present application, step S101 can include:

[0055] When establishing a remote replication relationship within a cluster or between clusters, the communication link numbers allocated for the primary and secondary of the remote replication relationship are both (ID 主 +ID 辅X + X × Z, to assign a communication link to the remote replication relationship;

[0056] ID 主 represents the logical storage unit number of the primary end in the remote replication relationship; ID 辅 represents the logical storage unit number of the secondary end in the remote replication relationship; X is a preset positive integer, X represents taking X modulo, and Z represents the sorting number of the peer cluster in the partner relationship of the local cluster, and for the remote replication relationship within the cluster, Z is zero.

[0057] As can be seen from the foregoing description, in the above example, the remote replication relationship within the cluster is transmitted through stream 0, and the remote replication between clusters is transmitted through streams 16, 32, and 48, respectively. In this way, for the remote replication relationship, the communication link is fixed and the utilization rate is only 1 / 16, and when a single remote replication exception affects the disconnection of the entire link, it will affect all remote replication services of the communication link. Although the dynamic allocation of the communication link can be performed in the subsequent steps of the application, if the communication link can be allocated to different remote replication relationships more evenly at the time of performing step S101, the moving amount in the subsequent operation can be effectively reduced, which is beneficial to improve the execution efficiency of the subsequent steps. Therefore, in this embodiment, when performing step S101, the remote replication relationship within the cluster or between the clusters can be allocated to different communication links more evenly.

[0058] Specifically, this embodiment considers that, for the remote replication relationship within the cluster or between the clusters, the logical storage unit numbers of the primary and secondary ends involved in different remote replication relationships are usually different and random, and therefore, in this embodiment, when establishing the remote replication relationship within the cluster or between the clusters, the communication link number allocated to the primary end or the secondary end of the remote replication relationship is calculated according to (ID 主 + ID 辅 ) X + X × Z, that is, the stream_id of the primary end or the secondary end is = (ID 主 + ID 辅 ) X + X × Z.

[0059] In this formula, ID 主 and ID 辅 respectively represent the logical storage unit number of the primary end and the logical storage unit number of the secondary end in the remote replication relationship. ID 主 and ID 辅After the summation, X needs to be taken as a remainder, for example, when X is 16, it is taken as a remainder of 16, and the result will be an integer value from 0 to 15. X is 16 in the current embodiment, and in other embodiments, X can be other values based on different cluster parameter configurations, which does not affect the implementation of the present application.

[0060] Still taking X=16 and each cluster supporting a maximum of 3 cluster partnerships as an example. In this embodiment, when establishing a remote replication relationship within cluster A, Z=0, and at this time, the stream_id of the communication link allocated to the primary and secondary ends of the remote replication relationship is (ID 主 +ID 辅 ) % X. It can be seen that for the remote replication relationship within cluster A, stream0 of cluster A is no longer fixedly allocated, but stream0 to stream15 of cluster A can all be allocated. For example, after cluster A and cluster B establish a partnership, a remote replication relationship is established between cluster A and cluster B, and in this embodiment, the stream_id of the communication link allocated to the primary and secondary ends of the remote replication relationship is (ID 主 +ID 辅 ) % 16 + 16x1. That is, for the remote replication relationship between cluster A and cluster B, stream16 to stream31 of cluster A can all be allocated.

[0061] For example, cluster A also establishes a partnership with cluster C, and a remote replication relationship is established between cluster A and cluster C, and in this embodiment, the stream_id of the communication link allocated to the primary and secondary ends of the remote replication relationship is (ID 主 +ID 辅 ) % 16 + 16x2. That is, for the remote replication relationship between cluster A and cluster C, stream32 to stream47 of cluster A can all be allocated.

[0062] Step S102: When establishing a remote replication consistency group within a cluster or between clusters, a communication link is allocated to the remote replication consistency group from all communication links of the cluster.

[0063] A remote replication consistency group is a method for uniformly managing multiple remote replication relationships and simultaneously operating multiple remote replication relationships. In a remote replication consistency group, LUNs (Logical Unit) of different remote replication relationships can be located in different controllers, but must use the same replication mode. In addition, when adding a remote replication relationship to a remote replication consistency group, the configuration attributes (synchronization rate, recovery strategy, etc.) need to be the same as the remote replication consistency group.

[0064] When a remote replication consistency group is established within a cluster or between clusters, a communication link needs to be allocated for the remote replication consistency group from all the communication links of the cluster, specifically, a communication link needs to be allocated for the primary end and the secondary end of the remote replication consistency group, and the stream_id of the communication links allocated for the primary end and the secondary end is usually consistent, and the specific allocation manner of the communication links can be set according to actual needs, for example, the original default allocation manner of the communication links can be used. Still taking the example that each cluster supports a partnership with at most 3 clusters, when a remote replication consistency group is established within a cluster, the stream_id of the communication links allocated for the primary end and the secondary end of the remote replication consistency group is stream_id=consist_group % 16. The parameter consist_group refers to the ID of the remote replication consistency group. And for a remote replication consistency group between clusters, the stream_id of the communication links allocated for the primary end and the secondary end of the remote replication consistency group is stream_id=consist_group % 16+16×other_cluster. It can be seen that when the number of remote replication consistency groups is low, the communication links cannot be effectively utilized.

[0065] Since in this example, each cluster supports a partnership with at most 3 clusters, the value of the parameter other_cluster is 1 or 2 or 3. For example, after cluster A and cluster B establish a partnership, a remote replication consistency group is established between cluster A and cluster B, and the stream_id of the communication links allocated for the primary end and the secondary end of the remote replication consistency group is stream_id=consist_group % 16+16×1. That is, for the remote replication consistency group between cluster A and cluster B, stream16 to stream31 of cluster A can be allocated. For another example, cluster A and cluster C establish a partnership, and a remote replication consistency group is established between cluster A and cluster C, and the stream_id of the communication links allocated for the primary end and the secondary end of the remote replication consistency group between cluster A and cluster C is stream_id=consist_group % 16+16×2. That is, for the remote replication consistency group between cluster A and cluster C, stream31 to stream47 of cluster A can be allocated. For another example, cluster A and cluster D establish a partnership, and a remote replication consistency group is established between cluster A and cluster D, and the stream_id of the communication links allocated for the remote replication consistency group between cluster A and cluster D is stream_id=consist_group % 16+16×3. That is, for the remote replication consistency group between cluster A and cluster D, stream48 to stream63 of cluster A can be allocated.

[0066] However, it should be noted that, as can be seen, when the above scheme is adopted, if the number of remote replication consistency groups is low, only a small number of communication links will be allocated, and if no subsequent operation is performed to move the load, it is also not conducive to the effective use of the communication links.

[0067] In one specific embodiment of the present application, step S102 can specifically include:

[0068] When establishing a remote replication consistency group within a cluster or between clusters, the communication links are allocated to the remote replication consistency group in a manner that the communication link numbers allocated by the primary and secondary ends of the remote replication consistency group are equal to (G 主 +G 辅 ) % X + X × Z from all the communication links of the cluster.

[0069] Wherein, G 主 represents the remote replication consistency group number of the primary end in the remote replication consistency group; G 辅 represents the remote replication consistency group number of the secondary end in the remote replication consistency group; X is a preset positive integer, % X represents taking X modulo, and Z represents the ordering number of the peer cluster in the partner relationship of the local cluster, and for a remote replication consistency group within a cluster, the value of Z is zero.

[0070] In the case of assigning a communication link to a remote replication consistency group in the aforementioned default manner, in some special scenarios, the stream_id of the primary and secondary ends may not be consistent. Specifically, for example, cluster A and cluster B establish a partnership, and a remote replication consistency group within cluster A is established, referred to as rc_grp_A. Then, a remote replication consistency group between cluster A and cluster B is created, referred to as rc_grp_AB, and an inter-cluster remote replication rc_rel_AB with the primary end being cluster A is established and added to the consistency group rc_grp_AB. Since there are two remote replication consistency groups in the primary end (cluster A), according to the implementation manner described above, for the remote replication consistency group between cluster A and cluster B, for cluster A, consist_group = 1, and other_cluster = 1, therefore, for the remote replication consistency group between cluster A and cluster B, the stream_id of the primary end (cluster A) = consist_group % 16 + 16x1 = 1%16 + 16x1 = 1 + 16 = 17. Since there is only one remote replication consistency group in the secondary end (cluster B), for the remote replication consistency group between cluster A and cluster B, for cluster B, consist_group = 0, and other_cluster = 1, therefore, the stream_id of the secondary end (cluster B) = consist_group % 16 + 16x1 = 0%16 + 16x1 = 0 + 16 = 16. The stream_id assigned by the primary and secondary ends to themselves is different, which does not affect the continuous operation of the remote replication consistency group, but there is a certain degree of risk of link processing disorder.

[0071] In this implementation manner, the case that the stream_id assigned by the primary and secondary ends to themselves is different due to the special scenario described above can be avoided.

[0072] Specifically, in this implementation manner, when a remote replication consistency group within a cluster or between clusters is established, the primary and secondary ends will both assign a communication link to themselves according to stream_id = (G 主 +G 辅 ) % X + XxZ.

[0073] Still taking X = 16 and each cluster supporting a partnership with at most 3 clusters as an example. In this implementation manner, when a remote replication consistency group within cluster A is established, Z = 0, and the stream_id of the communication link assigned by the primary and secondary ends to themselves for the remote replication consistency group = (G 主 +G 辅 ) % 16. G 主 and G 辅The tables respectively show the remote replication consistency group numbers of the primary and secondary in the remote replication consistency group. It can be seen that, since the stream_id of the communication link allocated by the primary and secondary are both equal to (G 主 +G 辅 ) % 16, therefore, for the remote replication consistency group within the cluster, the stream_id allocated by the primary and secondary will not be different.

[0074] Taking the above special scenario as an example, for example, cluster A and cluster B establish a partnership, and a remote replication consistency group within the cluster is established in cluster A, which is called rc_grp_A. Then, a remote replication consistency group between cluster A and cluster B is created, which is called rc_grp_AB, and then an inter-cluster remote replication rc_rel_AB with the primary being cluster A is established and joined in the consistency group rc_grp_AB. For this remote replication consistency group between cluster A and cluster B, in the implementation, the stream_id of the communication link allocated by the primary and secondary are both equal to (G 主 +G 辅 ) % 16 + 16 x 1. In the example, G 主, is equal to 1, and G 辅 is equal to 0. It can be seen that, since the stream_id of the communication link allocated by the primary and secondary are both equal to (G 主 +G 辅 ) % X + X x Z, therefore, for the remote replication consistency group between clusters, the stream_id allocated by the primary and secondary will not be different due to the special scenario of the above type.

[0075] In addition, when the communication link is allocated for the remote replication consistency group in the default manner described above, in some other special scenarios, the stream_id of the primary and secondary will also be inconsistent. Specifically, for example, cluster A and cluster B establish a partnership, cluster B and cluster C establish a partnership, and then a remote replication relationship rc_rel_BC between cluster B and cluster C is established with cluster B as the primary. At this time, for the primary (cluster B) of the remote replication relationship rc_rel_BC, other_cluster = 2, therefore stream id = 16 x other_cluster = 16 x 2 = 32, and for the secondary of the remote replication relationship rc_rel_BC, other_cluster = 1 (cluster C), therefore stream id = 16 x other_cluster = 16 x 1 = 16.

[0076] For the case that the stream_id assigned to the primary and secondary ends are different, one processing manner is to add extra judgment logic in the IO processing flow of the secondary end, judging whether to use the stream_id of the primary end or the stream_id of the secondary end for IO processing.

[0077] In one specific embodiment of the present application, it can further include:

[0078] The communication link number assigned by the secondary end of the remote copy consistency group is recorded to the primary end of the remote copy consistency group, and the communication link number assigned by the primary end of the remote copy consistency group is recorded to the secondary end of the remote copy consistency group.

[0079] This specific embodiment considers that for the case that the stream_id assigned to the primary and secondary ends are different, the communication link number assigned by the secondary end of the remote copy consistency group can be recorded to the primary end of the remote copy consistency group, that is, for this remote copy consistency group, the primary end can not only determine its own stream_id, but also know the stream_id of the secondary end. Similarly, the communication link number assigned by the primary end of the remote copy consistency group is recorded to the secondary end of the remote copy consistency group, that is, the secondary end can not only determine its own stream_id, but also know the stream_id of the primary end. At this time, the primary and secondary ends can both determine whether the remote copy consistency group has the case that the stream_id is different. In addition, for the case that the stream_id assigned to the primary and secondary ends are different, usually, it has an impact in the error processing logic, and in this specific embodiment, since for this remote copy consistency group, the primary and secondary ends can both determine the stream_id of the opposite end, the corresponding operation can be completed based on the stream_id of the opposite end in the error processing logic, so as to effectively guarantee the correct execution of the error processing logic.

[0080] Further, in one specific embodiment, after assigning the communication links for the remote replication relationship, the assigned communication link number of the secondary end of the remote replication relationship can also be recorded to the primary end of the remote replication consistency group, and the assigned communication link number of the primary end of the remote replication relationship can also be recorded to the secondary end of the remote replication consistency group. Thus, the problems of inconsistent logical storage unit numbers of the primary and secondary ends, inconsistent ordering numbers of the peer clusters in the local cluster, etc. can be avoided, and after the stream_id assigned by the primary and secondary ends are different, the execution of the error handling logic, the occurrence of link error, etc. can be affected. That is, for the remote replication relationship, even if the stream_id assigned by the primary and secondary ends are different, in this embodiment, since the primary and secondary ends can both determine the stream_id of the peer end, the correct execution of the error handling logic can be effectively guaranteed, and the risk of link processing error can be reduced.

[0081] Step S103: divide all the communication links of the cluster into N groups, and for each group of communication links, determine the load state of each communication link in the group; N is a positive integer not less than 2.

[0082] Considering that if the dynamic adjustment of the communication links is performed in the global range, the implementation will be relatively complex, therefore, in the present application, for all the communication links of a cluster, all the communication links are divided into N groups, N is a positive integer not less than 2, so that the dynamic adjustment of the communication links is performed in the group, and the convenience and reliability of the implementation of the scheme are guaranteed. The specific grouping manner can be set and adjusted according to actual needs. Generally, considering that the cluster has different peers, generally, the communication links used in the cluster can be taken as one group, and the communication links used between the cluster and different peers can be taken as corresponding groups. For example, in the example above, each cluster supports at most 3 clusters to establish a peer relationship, X = 16, and all the communication links can be divided into 4 groups, i.e. N = 4. Each group includes 16 communication links, wherein the communication links occupied by the intra-cluster communication are stream0 to stream15, the communication links occupied by the inter-cluster communication are stream16 to stream31, stream32 to stream47, and stream48 to stream63.

[0083] For each group of communication links, the load status of each communication link in the group needs to be determined, which can be measured by various load parameters such as real-time load and / or average load. For example, in a specific case, the load status is considered to change constantly, but the fluctuation is usually not particularly large, so the average load of the communication link in the first time period is usually taken as the load status of the communication link. The first time period can be set as needed. The load of the communication link includes the remote replication relationship and the remote replication consistency group using the communication link, that is, the load of the communication link refers to the total number of remote replication relationships and remote replication consistency groups using the communication link. The average load of the communication link is the average value of the load in the first time period.

[0084] Step S104: For each group of communication links, the remote replication relationship and / or the remote replication consistency group of one or more communication links in the group are moved to other communication links in the group according to the load balancing principle.

[0085] For each group of communication links, since the load status of each communication link in the group is determined, the remote replication relationship and / or the remote replication consistency group of one or more communication links in the group can be moved to other communication links in the group according to the load balancing principle.

[0086] The load of the communication link refers to the total number of remote replication relationships and remote replication consistency groups using the communication link. The specific moving method can be set and adjusted according to actual needs, so that after the moving is completed, the communication links in the group reach the purpose of load balancing.

[0087] In a specific embodiment of the present application, for each group of communication links, the remote replication relationship and / or the remote replication consistency group of one or more communication links in the group are moved to other communication links in the group according to the load balancing principle, including:

[0088] For each group of communication links, it is judged whether the current average load of the i th communication link in the group is greater than K times of the current average load of the (i+a) %Y th communication link in the group;

[0089] If it is greater than K times of the current average load of the (i+a) %Y th communication link in the group, part of the load of the i th communication link is moved to the (i+a) %Y th communication link; wherein a is a positive integer, Y is the total number of communication links in the group, %Y represents taking Y as the remainder, K is a preset value greater than 1; the load of the communication link includes the remote replication relationship and the remote replication consistency group of the communication link;

[0090] determining whether the current average load of the ith communication link in the group is greater than K times the current average load of the (i+b)th %Y communication link in the group;

[0091] if greater than K times the current average load of the (i+b)th %Y communication link in the group, moving part of the load of the ith communication link to the (i+b)th %Y communication link; wherein b is a positive integer, and b≠a;

[0092] determining whether the current average load of the ith communication link in the group is greater than K times the current average load of the (i+c)th %Y communication link in the group;

[0093] if greater than K times the current average load of the (i+c)th %Y communication link in the group, moving part of the load of the ith communication link to the (i+c)th %Y communication link; wherein c is a positive integer, and b≠a≠c;

[0094] after i takes values from 0 to Y-1 in turn, the load balancing of the communication links in the group is completed.

[0095] This embodiment considers that, since a group includes a large number of communication links, in order to effectively realize load balancing, the load balancing can be realized as much as possible through the way of loop traversal, and the utilization rate of the communication links is improved.

[0096] For example, in one occasion, a user batch creates 1000 double-active volumes, each double-active volume including a primary volume, a secondary volume, a primary change volume, and a secondary change volume. And each double-active volume establishes a remote replication relationship within the cluster, if the communication link numbers allocated by the primary end and the secondary end of the remote replication relationship are both = (ID 主 +ID 辅 ) % X + X×Z, since the double-active primary end LUN_ID (i.e. ID 主 ) of each double-active volume can be expressed as 4×n, and the double-active secondary end LUN_ID (i.e. ID 辅 ) can be expressed as 4×n+1, it can be seen that the obtained stream_id of the primary end and the secondary end will only be stream1, stream5, stream9, stream13, resulting in a link utilization rate of only 1 / 4. Although compared with the default allocation algorithm (fixed as stream0 to make the link utilization rate 1 / 16), the link utilization rate is improved by 3 times, but the 16 communication links in the cluster are not fully utilized, and the scheme of the present application can further improve the utilization rate of the communication links through the operation of step S104.

[0097] Y is the total number of communication links in the group, which is usually the same as the value of X, for example, taking Y=16 as an example, i takes values from 0 to 15 in turn.

[0098] Take i=0 as an example. First, it is needed to judge whether the current average load of the 0th communication link in the group is greater than K times of the current average load of the (i+a)%Yth communication link in the group. In the case of Y=16, a may be 8 for example, and K may take 2 for example.

[0099] In this example, (0+8)%16=8. If the current average load of the 0th communication link in the group is greater than 2 times of the current average load of the 8th communication link in the group, it means that the current average load of the 0th communication link is much higher than that of the 8th communication link, and therefore, part of the load of the 0th communication link needs to be moved to the 8th communication link.

[0100] When part of the load of the ith communication link is moved to the (i+a)%Yth communication link, there can be multiple specific operation modes, for example, in one specific implementation, it can include: moving 1 / M amount of load of the ith communication link to the (i+a)%Yth communication link, M being a positive integer greater than 1. In this implementation, a certain proportion of the load of the ith communication link, i.e., 1 / M amount of load, is moved to the (i+a)%Yth communication link, for example, M=4, and specifically, the first 1 / 4 amount of load of the ith communication link can be moved to the (i+a)%Yth communication link.

[0101] After part of the load of the ith communication link is moved to the (i+a)%Yth communication link, subsequent judgment can be continued. Of course, if the current average load of the ith communication link in the group is not greater than K times of the current average load of the (i+a)%Yth communication link in the group, subsequent judgment can be directly performed.

[0102] In this example, i=0, K=2, and b takes 4 for example, and it is needed to continue to judge whether the current average load of the 0th communication link in the group is greater than 2 times of the current average load of the (0+4)%Yth communication link in the group. Since Y=16, (0+4)%Y=4.

[0103] If the current average load of the 0th communication link in the group is greater than 2 times of the current average load of the 4th communication link in the group, it means that the current average load of the 0th communication link is much higher than that of the 4th communication link, and therefore, part of the load of the 0th communication link needs to be moved to the 4th communication link. After part of the load of the ith communication link is moved to the (i+b)%Yth communication link, subsequent judgment can be continued. Of course, if the current average load of the ith communication link in the group is not greater than K times of the current average load of the (i+b)%Yth communication link in the group, subsequent judgment can be directly performed.

[0104] For example, if the value is 2, it is needed to continue to judge whether the current average load of the 0th communication link in the group is greater than 2 times the current average load of the 2nd communication link in the group. If yes, it indicates that the current average load of the 0th communication link is much higher than that of the 2nd communication link, and thus it is needed to move part of the load of the 0th communication link to the 2nd communication link. The iteration process for the 0th communication link is executed and ends.

[0105] It can be seen that when i is 0, the load of the 0th communication link can be effectively migrated to other communication links with lower average load in the group through at most 3 times of load migration. After i is sequentially taken as Y-1 from 0, the iteration of the load balancing of all communication links in the group is completed.

[0106] In this embodiment, the load balancing is as much as possible to be realized through the iteration, and the utilization of the communication link is improved. In the iteration process, the average load of the ith communication link does not need to be compared with the average load of the rest of the communication links in the group, and thus the iteration efficiency is effectively ensured. In addition, after the load balancing is performed according to this embodiment, the load condition usually does not fluctuate greatly in a short time, and thus the load balancing can be performed again after a period of time, and the over-adjustment of the communication link is avoided.

[0107] In a specific embodiment of the present application, the following can also be included:

[0108] The connection state of each communication link is monitored, and when the connection state of any communication link is monitored to be abnormal, an abnormal handling operation is performed.

[0109] In this embodiment, the connection state of each communication link can be monitored, and when the connection state of any communication link is monitored to be abnormal, a preset abnormal handling operation can be performed, for example, the load of the communication link, i.e., all remote replication relationships and remote replication consistency groups of the communication link, can be moved to the rest of the normal communication links. For another example, the reconnection and abnormal recovery of the communication link can be attempted through a preset means, and the setting of the abnormal handling operation according to the actual needs can be performed.

[0110] The technical scheme provided by the embodiment of the application can dynamically allocate the communication links, thereby improving the utilization rate of the communication links. Specifically, when a remote replication relationship is established within a cluster or between clusters, a communication link is allocated for the remote replication relationship from all the communication links of the cluster, so as to guarantee the implementation of the remote replication relationship. When a remote replication consistency group is established within a cluster or between clusters, a communication link is also allocated for the remote replication consistency group from all the communication links of the cluster, so as to guarantee the implementation of the remote replication consistency group. After the allocation is completed, the communication links can be dynamically adjusted in the scheme. Specifically, considering that if the dynamic adjustment of the communication links is performed in a global range, the implementation will be relatively complex, therefore, in the scheme, all the communication links are divided into N groups, N is a positive integer not less than 2, so that the dynamic adjustment of the communication links is performed within the groups, thereby guaranteeing the convenience and reliability of the implementation of the scheme. For each group of communication links, the load state of each communication link in the group is determined, and then, according to the load balancing principle, the remote replication relationship and / or the remote replication consistency group of one or more communication links in the group are moved to other communication links in the group, that is, by adjusting the communication links to which the remote replication relationship and / or the remote replication consistency group belong, the dynamic adjustment of the communication links is realized, and the load balancing is guaranteed, thereby effectively improving the utilization rate of the communication links.

[0111] In summary, in the scheme, the utilization rate of the communication links can be effectively improved, and the convenience and reliability of the implementation of the scheme are guaranteed.

[0112] Corresponding to the method embodiment, the embodiment of the application further provides a dynamic allocation system of communication links, which can be mutually referred to above.

[0113] Referring to Figure 2 Fig. 1 is a structural schematic diagram of a dynamic allocation system of communication links in the application, which comprises:

[0114] The first communication link allocation module 201 is configured to, when a remote replication relationship is established within a cluster or between clusters, allocate a communication link for the remote replication relationship from all the communication links of the cluster.

[0115] The second communication link allocation module 202 is configured to, when a remote replication consistency group is established within a cluster or between clusters, allocate a communication link for the remote replication consistency group from all the communication links of the cluster.

[0116] The load state determination module 203 is configured to divide all the communication links of the cluster into N groups, and for each group of communication links, determine the load state of each communication link in the group; N is a positive integer not less than 2.

[0117] The communication link adjustment module 204 is used to move the remote replication relationship and / or remote replication consistency group of one or more communication links in each group to other communication links in the group according to the principle of load balancing.

[0118] In one specific embodiment of the present invention, the first communication link allocation module 201 is specifically used for:

[0119] When establishing a remote replication relationship within or between clusters, the communication link numbers assigned to the master and slave ends of the remote replication relationship from all communication links in the cluster are all equal to (ID). 主 +ID 辅 The method of % X + X×Z is used to allocate communication links for remote replication relationships;

[0120] Among them, ID 主 This represents the logical storage unit number on the master end in a remote replication relationship; ID 辅 This represents the logical storage unit number of the slave node in the remote replication relationship; X is a preset positive integer, % X represents the remainder after taking X, and Z represents the sort number of the peer cluster in the partner cluster of the slave node cluster. For remote replication relationships within the cluster, the value of Z is zero.

[0121] In one specific embodiment of the present invention, the second communication link allocation module 202 is specifically used for:

[0122] When establishing a remote replication consistency group within or between clusters, the communication link numbers assigned to the master and slave ends of the remote replication consistency group from all communication links in the cluster are equal to (G). 主 +G 辅 The method of % X + X×Z is used to allocate communication links to remote replication consistency groups;

[0123] Among them, G 主 This indicates the remote replication consistency group number on the master end within the remote replication consistency group; G 辅 This represents the remote replication consistency group number of the slave node in the remote replication consistency group; X is a preset positive integer, % X represents the remainder after taking X, and Z represents the sort number of the peer cluster in the partner cluster of the slave node cluster. For remote replication consistency groups within the cluster, the value of Z is zero.

[0124] In one specific embodiment of the present invention, a peer communication link number acquisition module is further included, used for:

[0125] The communication link number assigned by the secondary end of the remote copy consistency group is recorded to the primary end of the remote copy consistency group, and the communication link number assigned by the primary end of the remote copy consistency group is recorded to the secondary end of the remote copy consistency group.

[0126] In one embodiment of the present application, the communication link connection state monitoring module is further configured to:

[0127] The connection state of each communication link is monitored, and when the connection state of any communication link is found to be abnormal, an abnormality handling operation is performed.

[0128] In one embodiment of the present application, the communication link adjustment module 204 is specifically configured to:

[0129] For each group of communication links, it is determined whether the current average load of the ith communication link in the group is greater than K times the current average load of the (i+a)%Yth communication link in the group;

[0130] If it is greater than K times the current average load of the (i+a)%Yth communication link in the group, part of the load of the ith communication link is moved to the (i+a)%Yth communication link; where a is a positive integer, Y is the total number of communication links in the group, %Y means taking Y as the remainder, and K is a preset number greater than 1; the load of the communication link includes the remote copy relationship and the remote copy consistency group of the communication link;

[0131] It is determined whether the current average load of the ith communication link in the group is greater than K times the current average load of the (i+b)%Yth communication link in the group;

[0132] If it is greater than K times the current average load of the (i+b)%Yth communication link in the group, part of the load of the ith communication link is moved to the (i+b)%Yth communication link; where b is a positive integer, and b≠a;

[0133] It is determined whether the current average load of the ith communication link in the group is greater than K times the current average load of the (i+c)%Yth communication link in the group;

[0134] If it is greater than K times the current average load of the (i+c)%Yth communication link in the group, part of the load of the ith communication link is moved to the (i+c)%Yth communication link; where c is a positive integer, and b≠a≠c;

[0135] After i takes values from 0 to Y-1 in sequence, the load balancing of the group of communication links is completed.

[0136] In one embodiment of the present application, moving part of the load of the ith communication link to the (i+a)%Yth communication link comprises:

[0137] Moving 1 / M of the load of the ith communication link to the (i+a)%Yth communication link, M being a positive integer greater than 1.

[0138] Corresponding to the above method and system embodiments, the embodiments of the present application also provide a dynamic allocation device of communication links, a computer readable storage medium and a computer program product, which can be mutually corresponding with the above.

[0139] Referring to Figure 3 The device can comprise:

[0140] A memory 301 for storing a computer program;

[0141] A processor 302 for executing the computer program to implement the steps of the dynamic allocation method of communication links in any of the above embodiments.

[0142] The computer program product comprises computer programs / instructions which, when executed by a processor, implement the steps of the dynamic allocation method of communication links in any of the above embodiments.

[0143] Referring to Figure 4 The computer readable storage medium 40 stores a computer program 41, which, when executed by a processor, implements the steps of the dynamic allocation method of communication links in any of the above embodiments. The computer readable storage medium 50 mentioned herein includes RAM (Random Access Memory), memory, ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), register, hard disk, removable disk, or any other form of storage medium known in the technical field.

[0144] It is also important to note that the use of relational terms such as first and second, and the like, are used solely to distinguish one from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0145] Those skilled in the art will further appreciate that the units and algorithms described in connection with the examples disclosed herein can be embodied directly in hardware, in software, or in a combination of the two. For the sake of brevity, descriptions of these conventional implementations are not included herein. Those skilled in the art will appreciate that the embodiments described herein can be practiced with the aid of one or more computers or processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which can be hand-held, notebook, desktop, or mainframe. In particular, the embodiments described herein can be practiced with the aid of one or more electronic processors, which

Claims

1. A method for dynamically allocating communication links, characterized in that, include: When establishing a remote replication relationship within or between clusters, a communication link is allocated for the remote replication relationship from all communication links of the cluster. When a remote replication consistency group is established within or between clusters, a communication link is allocated to the remote replication consistency group from all communication links of the cluster. The cluster's communication links are divided into N groups, and for each group of communication links, the load status of each communication link within the group is determined. N is a positive integer not less than 2; For each group of communication links, according to the principle of load balancing, the remote replication relationship and / or remote replication consistency group of one or more communication links in the group are moved to other communication links in the group; For each group of communication links, according to the principle of load balancing, the remote replication relationship and / or remote replication consistency group of one or more communication links in the group are moved to other communication links in the group, including: For each group of communication links, determine whether the current average load of the i-th communication link in the group is greater than K times the current average load of the (i+a)%Y-th communication link in the group; If the load is greater than K times the current average load of the (i+a)%Yth communication link in the group, then part of the load of the i-th communication link will be moved to the (i+a)%Yth communication link; where a is a positive integer, Y is the total number of communication links in the group, %Y represents the remainder when Y is taken, and K is a preset value greater than 1; the load of the communication link includes the remote replication relationship and the remote replication consistency group of the communication link. Determine whether the current average load of the i-th communication link in the group is greater than K times the current average load of the (i+b)%Y-th communication link in the group; If the load is greater than K times the current average load of the (i+b)%Yth communication link in the group, then a portion of the load of the i-th communication link will be moved to the (i+b)%Yth communication link; where b is a positive integer and b≠a; Determine whether the current average load of the i-th communication link in the group is greater than K times the current average load of the (i+c)%Y-th communication link in the group; If the load is greater than K times the current average load of the (i+c)%Yth communication link in the group, then a portion of the load of the i-th communication link will be moved to the (i+c)%Yth communication link; where c is a positive integer and b≠a≠c; After i takes values ​​from 0 to Y-1, load balancing of the communication links in this group is completed.

2. The dynamic allocation method for communication links according to claim 1, characterized in that, When establishing a remote replication relationship within or between clusters, a communication link is allocated for the remote replication relationship from all communication links in the cluster, including: When establishing a remote replication relationship within or between clusters, the communication link numbers assigned to the master and slave ends of the remote replication relationship from all communication links in the cluster are equal to (ID). 主 +ID 辅 The communication link is allocated to the remote replication relationship in the manner of % X + X×Z; Among them, ID 主 This refers to the logical storage unit number on the master end in the remote replication relationship; ID 辅 This represents the logical storage unit number of the slave in the remote replication relationship; X is a preset positive integer, % X represents the remainder after taking X, and Z represents the sorting number of the peer cluster in the partner cluster of the local cluster. For remote replication relationships within the cluster, the value of Z is zero.

3. The dynamic allocation method for communication links according to claim 1, characterized in that, When establishing a remote replication consistency group within or between clusters, a communication link is allocated to the remote replication consistency group from all communication links in the cluster, including: When establishing a remote replication consistency group within or between clusters, the communication link numbers allocated from all communication links in the cluster according to the master and slave ends of the remote replication consistency group are all equal to (G). 主 +G 辅 The remote replication consistency group is allocated a communication link in the manner of % X + X×Z; Among them, G 主 This indicates the remote replication consistency group number of the master end within the remote replication consistency group; G 辅 This represents the remote replication consistency group number of the slave node in the remote replication consistency group; X is a preset positive integer, % X represents the remainder after taking X, and Z represents the sorting number of the peer cluster in the partner cluster of the slave node cluster, and for remote replication consistency groups within the cluster, the value of Z is zero.

4. The dynamic allocation method for communication links according to claim 3, characterized in that, Also includes: The communication link number assigned to the auxiliary end of the remote replication consistency group is recorded to the master end of the remote replication consistency group, and the communication link number assigned to the master end of the remote replication consistency group is recorded to the auxiliary end of the remote replication consistency group.

5. The dynamic allocation method for communication links according to claim 1, characterized in that, Also includes: Monitor the connection status of each of the communication links, and when an abnormal connection status is detected in any of the communication links, perform an exception handling operation.

6. The dynamic allocation method for communication links according to claim 1, characterized in that, Moving a portion of the load from the i-th communication link to the (i+a)%Y-th communication link includes: Move 1 / M of the load from the i-th communication link to the (i+a)%Y-th communication link, where M is a positive integer greater than 1.

7. A dynamic allocation system for communication links, characterized in that, include: The first communication link allocation module is used to allocate communication links for the remote replication relationship when a remote replication relationship is established within or between clusters. The second communication link allocation module is used to allocate communication links to the remote replication consistency group when a remote replication consistency group is established within or between clusters. The load status determination module is used to divide all the communication links into N groups, and for each group of communication links, determine the load status of each communication link in the group. N is a positive integer not less than 2; The communication link adjustment module is used to move the remote replication relationship and / or remote replication consistency group of one or more communication links in each group to other communication links in the group, according to the principle of load balancing. The communication link adjustment module is specifically used for: For each group of communication links, determine whether the current average load of the i-th communication link in the group is greater than K times the current average load of the (i+a)%Y-th communication link in the group; If the load is greater than K times the current average load of the (i+a)%Yth communication link in the group, then part of the load of the i-th communication link will be moved to the (i+a)%Yth communication link; where a is a positive integer, Y is the total number of communication links in the group, %Y represents the remainder after dividing by Y, and K is a preset value greater than 1; the load of the communication link includes the remote replication relationship and the remote replication consistency group of the communication link. Determine whether the current average load of the i-th communication link in the group is greater than K times the current average load of the (i+b)%Y-th communication link in the group; If the load is greater than K times the current average load of the (i+b)%Yth communication link in the group, then a portion of the load of the i-th communication link will be moved to the (i+b)%Yth communication link; where b is a positive integer and b≠a; Determine whether the current average load of the i-th communication link in the group is greater than K times the current average load of the (i+c)%Y-th communication link in the group; If the load is greater than K times the current average load of the (i+c)%Yth communication link in the group, then a portion of the load of the i-th communication link will be moved to the (i+c)%Yth communication link; where c is a positive integer and b≠a≠c; After i takes values ​​from 0 to Y-1, load balancing of the communication links in this group is completed.

8. A dynamic allocation device for communication links, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the dynamic allocation method for communication links as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the dynamic allocation method for communication links as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • High-availability load balancing method and system and computer readable storage medium

    CA3131098A1

  • Dynamic load balancing for layer-2 link aggregation

    CN101682442A