CN114422427B - A flow balancing method, device, electronic device and storage medium - Google Patents

A flow balancing method, device, electronic device and storage medium Download PDF

Info

Publication number
CN114422427B
CN114422427B CN202111617326.5A CN202111617326A CN114422427B CN 114422427 B CN114422427 B CN 114422427B CN 202111617326 A CN202111617326 A CN 202111617326A CN 114422427 B CN114422427 B CN 114422427B
Authority
CN
China
Prior art keywords
router
weight
node
target
network node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111617326.5A
Other languages
Chinese (zh)
Other versions
CN114422427A (en
Inventor
雷涛
罗印威
黄永远
户才来
卢学嘉
莫琛
肖玮勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Cloud Technology Co Ltd
Original Assignee
China Telecom Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Cloud Technology Co Ltd filed Critical China Telecom Cloud Technology Co Ltd
Priority to CN202111617326.5A priority Critical patent/CN114422427B/en
Publication of CN114422427A publication Critical patent/CN114422427A/en
Application granted granted Critical
Publication of CN114422427B publication Critical patent/CN114422427B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请涉及云计算技术领域,尤其涉及一种流量均衡方法、装置、电子设备和存储介质,用以降低网络节点的流量压力。其中,方法包括:获取各网络节点的初始节点权重,并将各路由器的初始路由权重同步为对应的初始节点权重;针对任意一个网络节点,确定存在路由器发生主备切换时,根据网络节点中的主路由器的数量,确定目标节点权重;根据目标节点权重,更新各路由器的初始路由权重,获得目标路由权重;经由不同网络节点上分属同一交换机制软件的路由器基于目标路由权重进行报文交互的方式,确定主路由器、备用路由器。由于本申请通过调整网络节点上主路由器的数量,能够实现不同网络节点上的负载均衡,减轻单个网络节点上的流量压力。

The present application relates to the field of cloud computing technology, and in particular to a traffic balancing method, device, electronic device and storage medium to reduce the traffic pressure of network nodes. Among them, the method includes: obtaining the initial node weight of each network node, and synchronizing the initial routing weight of each router to the corresponding initial node weight; for any network node, when it is determined that a router has a master-standby switchover, according to the network node The number of main routers determines the target node weight; based on the target node weight, the initial route weight of each router is updated to obtain the target route weight; the routers belonging to the same switching mechanism software on different network nodes perform message exchange based on the target route weight. method to determine the main router and backup router. Because this application can achieve load balancing on different network nodes and reduce traffic pressure on a single network node by adjusting the number of main routers on the network node.

Description

Flow balancing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a flow balancing method, a device, an electronic device, and a storage medium.
Background
With the popularization of cloud computing, an OpenStack cloud computing management platform is widely adopted. The high availability function of OpenStack can ensure that routers on a plurality of physical machines keep a main and multi-standby mode based on keepalive exchange mechanism software, and the internet traffic of a user flows out from the main router.
In the related art, when implementing the high availability function through keepalive, broadcast will be performed between two routers, the broadcast message contains the weight information of keepalive, the router receiving the message will compare the weight, and the router with larger weight will be upgraded to the main router. If the weights are equal, the IP addresses (Internet Protocol Address, internet protocol addresses) of the messages sent by the keepalive are compared, and the router with the larger IP address is updated to the master router. However, implementing high availability based on the above manner may cause multiple master routers to fall on the same physical machine (i.e. network node), thereby exceeding the maximum network load of the physical machine, resulting in problems such as packet loss, gao Shiyan, and the like.
Therefore, how to maintain the flow balance of the network nodes in the OpenStack cluster is a current urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides a flow balancing method, a flow balancing device, electronic equipment and a storage medium, which are used for reducing the flow pressure of a network node.
The flow balancing method provided by the embodiment of the application comprises the following steps:
acquiring initial node weights corresponding to network nodes respectively, and synchronizing the initial routing weights of routers in the network nodes into corresponding initial node weights respectively;
determining the target node weight of any one network node according to the number of the main routers in any one network node when the main and standby switching of the routers in any one network node is determined;
updating the initial routing weight of each router in any network node according to the target node weight to obtain the target routing weight of each router;
and determining a main router and a standby router by routers belonging to the same switching mechanism software on different network nodes based on the mode of message interaction of respective target routing weights.
Optionally, the determining the target node weight of the arbitrary network node according to the number of the master routers in the arbitrary network node includes:
and taking the sum of the initial node weight and a routing coefficient as the target node weight, wherein the routing coefficient is the whole ratio of the number of the main routers in any network node to a preset parameter value.
Optionally, the determining the primary router and the standby router by the routers belonging to the same switching mechanism software on different network nodes based on the respective target routing weights includes:
through switching mechanism software, the routers which belong to the same switching mechanism software on different network nodes are controlled to mutually send messages carrying own target routing weight;
and determining the router identity of the message receiver according to the received comparison result of the target routing weight of the message sender and the target routing weight of the message receiver, wherein the router identity characterizes the primary and backup attributes of the message receiver.
Optionally, if the comparison result indicates that the target routing weight of the message receiver is smaller than the target routing weight of the message sender, the router identity of the message receiver is the master router;
if the comparison result shows that the target routing weight of the message receiver is greater than the target routing weight of the message sender, the router identity of the message receiver is a standby router;
and if the comparison result shows that the target routing weight of the message receiver is equal to the target routing weight of the message sender, comparing the Internet Protocol (IP) addresses of the message receiver and the message sender, wherein the router identity with larger IP address is the main router.
The flow equalization device provided in the embodiment of the application includes:
the system comprises an acquisition unit, a synchronization unit and a synchronization unit, wherein the acquisition unit is used for acquiring initial node weights corresponding to network nodes respectively and synchronizing the initial routing weights of routers in the network nodes into corresponding initial node weights respectively;
a first determining unit, configured to determine, for any one network node, a target node weight of the any one network node according to the number of the primary routers in the any one network node when a primary-backup handover occurs to a router existing in the any one network node;
the updating unit is used for updating the initial routing weight of each router in any network node according to the target node weight to obtain the target routing weight of each router;
and the second determining unit is used for determining a main router and a standby router by using routers belonging to the same switching mechanism software on different network nodes based on the mode of message interaction of respective target routing weights.
Optionally, the first determining unit is specifically configured to:
and taking the sum of the initial node weight and a routing coefficient as the target node weight, wherein the routing coefficient is the whole ratio of the number of the main routers in any network node to a preset parameter value.
Optionally, the second determining unit is specifically configured to:
through switching mechanism software, the routers which belong to the same switching mechanism software on different network nodes are controlled to mutually send messages carrying own target routing weight;
and determining the router identity of the message receiver according to the received comparison result of the target routing weight of the message sender and the target routing weight of the message receiver, wherein the router identity characterizes the primary and backup attributes of the message receiver.
Optionally, if the comparison result indicates that the target routing weight of the message receiver is smaller than the target routing weight of the message sender, the router identity of the message receiver is the master router;
if the comparison result shows that the target routing weight of the message receiver is greater than the target routing weight of the message sender, the router identity of the message receiver is a standby router;
and if the comparison result shows that the target routing weight of the message receiver is equal to the target routing weight of the message sender, comparing the Internet Protocol (IP) addresses of the message receiver and the message sender, wherein the router identity with larger IP address is the main router.
The electronic device provided by the embodiment of the application comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to execute the steps of any one of the flow balancing methods.
The embodiment of the application provides a computer readable storage medium, which comprises a computer program, wherein when the program code runs on electronic equipment, the computer program is used for enabling the electronic equipment to execute the steps of any one of the flow balancing methods.
Embodiments of the present application provide a computer program product comprising a computer program stored in a computer readable storage medium; when the processor of the electronic device reads the computer program from the computer readable storage medium, the processor executes the computer program, so that the electronic device performs the steps of any one of the flow equalization methods described above.
The beneficial effects of the application are as follows:
the flow balancing method, the flow balancing device, the electronic equipment and the storage medium provided by the embodiment of the application firstly acquire initial node weights corresponding to each network node, and respectively synchronize the initial routing weights of routers in each network node into corresponding initial node weights; then, determining the target node weight of any one network node according to the number of the main routers in any one network node when the main and standby switching of the routers exists in any one network node; updating the initial routing weight of each router in any network node according to the weight of the target node to obtain the target routing weight of each router; and finally, determining a main router and a standby router by routers which are respectively assigned to the same switching mechanism software on different network nodes based on the mode of message interaction of respective target routing weights. The router weights are dynamically adjusted according to the number of the main routers on the network nodes, so that load balancing on different network nodes is realized, traffic pressure on a single network node is reduced, the problems of data packet loss and high time delay are reduced, and the bandwidth utilization rate in the network node cluster is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is a schematic diagram of a primary and a backup router in the related art;
fig. 2 is a flowchart of an implementation of a flow balancing method in an embodiment of the present application;
FIG. 3 is a schematic diagram of a primary and backup router according to an embodiment of the present application;
fig. 4 is a flow chart of a flow balancing method in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a flow equalization device according to an embodiment of the present application;
fig. 6 is a schematic diagram of a hardware composition structure of an electronic device to which the embodiments of the present application are applied.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present application, but not all embodiments. All other embodiments, which can be made by a person of ordinary skill in the art without any inventive effort, based on the embodiments described in the present application are intended to be within the scope of the technical solutions of the present application.
Some of the concepts involved in the embodiments of the present application are described below.
OpenStack (cloud computing management platform): the cloud computing management platform project is an open-source cloud computing management platform project, is a combination of a series of software open-source projects, provides extensible and elastic cloud computing service for private cloud and public cloud, and provides a cloud computing management platform which is simple to implement, can be expanded on a large scale, is rich and has unified standards.
Keepalive (switching mechanism software): the method is used for detecting the state of a server (i.e. a router), if one server is down or the work fails, keepalive will detect and reject the failed server from the system, meanwhile, other servers are used for replacing the work of the server, when the server works normally, keepalive automatically joins the server into a server group, all the works are automatically completed, manual intervention is not needed, and only the failed server is needed to be repaired manually.
And (3) a router: the network device is a hardware device connected with two or more networks, plays a role of a gateway between the networks, is a special intelligent network device for reading addresses in each data packet and then deciding how to transmit, and ensures that routers on a plurality of network nodes keep one master and multiple standby through keepalive in the application, and the internet traffic of a user flows out from the master router.
The following briefly describes the design concept of the embodiment of the present application:
with the popularization of cloud computing, openStack is widely adopted. OpenStack suffers from some drawbacks due to less experience in large-scale applications. The high availability function of OpenStack can ensure that routers on a plurality of physical machines keep a main and multi-standby mode based on keepalive exchange mechanism software, and the internet traffic of a user flows out from the main router.
In the related art, the default weight of keepalive is 50, when the high availability function is realized by keepalive, broadcasting is performed between two routers, the broadcasting message contains the weight information of keepalive, the router receiving the message compares the weight, and the router with larger weight is updated to be the main router. If the weights are equal, comparing the IP addresses of the messages sent by the keepalive, and upgrading the router with the larger IP address into the main router. However, implementing high availability based on the above manner may cause multiple primary routers to fall on the same physical machine (i.e. network node), as shown in fig. 1, where both the primary router represented by the solid line and the primary router represented by the dotted line fall on the network node 1, resulting in that the user traffic of the OpenStack cluster passes through the network node 1, and thus exceeds the maximum network load of the physical machine, resulting in problems such as packet loss, gao Shiyan, and the like.
Therefore, how to maintain the flow balance of the network nodes in the OpenStack cluster is a current urgent problem to be solved.
In view of this, the embodiments of the present application provide a flow balancing method, apparatus, electronic device, and storage medium, where initial node weights corresponding to network nodes are first obtained, and initial routing weights of routers in the network nodes are synchronized to corresponding initial node weights, respectively; then, determining the target node weight of any one network node according to the number of the main routers in any one network node when the main and standby switching of the routers exists in any one network node; updating the initial routing weight of each router in any network node according to the weight of the target node to obtain the target routing weight of each router; and finally, determining a main router and a standby router by routers which are respectively assigned to the same switching mechanism software on different network nodes based on the mode of message interaction of respective target routing weights. The router weights are dynamically adjusted according to the number of the main routers on the network nodes, so that load balancing on different network nodes is realized, traffic pressure on a single network node is reduced, the problems of data packet loss and high time delay are reduced, and the bandwidth utilization rate in the network node cluster is improved.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and are not intended to limit the present application, and embodiments and features of embodiments of the present application may be combined with each other without conflict.
Referring to fig. 2, a flow balancing method implementation flow chart provided in an embodiment of the present application is shown, where a specific implementation flow of the method is as follows:
s201: acquiring initial node weights corresponding to each network node, and synchronizing the initial routing weights of routers in each network node to the corresponding initial node weights;
the initial node weights may be set to 50, for example, in the OpenStack cluster shown in fig. 3, if the initial node weights of the network node 1 and the network node 2 are set to 50, the initial routing weights of the router 1, the router 2, the router 3 and the router 4 are all 50.
S202: determining the target node weight of any one network node according to the number of the main routers in any one network node when the main and standby switching of the routers exists in any one network node;
the primary-standby switching refers to switching of a router in a network node from a primary router to a standby router or from the standby router to the primary router.
Optionally, when any network node generates primary-standby switching, taking the sum of the initial node weight and the routing coefficient as the target node weight.
The routing coefficient is a whole ratio of the number of the main routers in any network node to a preset parameter value, and the weight of the target node can be determined by the following formula:
wherein 50 is the initial node weight, n represents the number of the main routers in any network node, k represents the preset parameter value, which can be adjusted according to the requirement,representation pair->Rounding, i.e. routing coefficients.
For example, if the number of primary routers n is 2 and k is set to 1, then the target node weight is 52.
S203: updating the initial routing weight of each router in any network node according to the target node weight to obtain the target routing weight of each router;
when the weight of any network node is updated from the initial node weight to the target node weight, the initial routing weight of the router on the corresponding network node is also updated to the target routing weight, for example, the initial node weight of the network node 1 is 50, the initial routing weights of the router 1 and the router 2 on the network node 1 are 50, and when the target node weight of the network node 1 is 52, the target routing weights of the router 1 and the router 2 are 52.
S204: and determining a main router and a standby router by routers belonging to the same switching mechanism software on different network nodes based on the mode of message interaction of respective target routing weights.
The router 1 and the router 3 in fig. 3 belong to the same switching mechanism software, and the router 1 and the router 3 can carry own target routing weight in a message interaction mode to determine whether the router is a main router or a standby router.
In the embodiment of the application, the router weight is dynamically adjusted according to the number of the main routers on the network nodes, so that load balancing on different network nodes is realized, the traffic pressure on a single network node is reduced, the problems of packet loss and high time delay of data are reduced, and the bandwidth utilization rate in the network node cluster is improved.
Optionally, step S204 is implemented based on the following steps:
firstly, through switching mechanism software, controlling routers belonging to the same switching mechanism software on different network nodes to mutually send messages carrying own target routing weight; then, determining the router identity of the message receiver according to the comparison result of the received target routing weight of the message sender and the target routing weight of the message receiver through the message receiver.
The router identity characterizes the primary and the backup attributes of the message receiver, namely the router is a primary router or a backup router.
Specifically, taking the router 1 and the router 3 as examples, the router 1 receives the message sent by the router 3, acquires the target routing weight of the router 3, the router 1 compares the target routing weight of the router with the own routing weight to determine the own active/standby attribute, and correspondingly, the router 3 receives the message sent by the router 1, acquires the target routing weight of the router 1 and compares the target routing weight with the own routing weight to determine the own active/standby attribute.
Optionally, if the comparison result indicates that the target routing weight of the message receiver is smaller than the target routing weight of the message sender, the router identity of the message receiver is the main router;
if the comparison result shows that the target routing weight of the message receiver is greater than the target routing weight of the message sender, the router identity of the message receiver is a standby router;
if the comparison result shows that the target routing weight of the message receiver is equal to the target routing weight of the message sender, comparing the Internet Protocol (IP) addresses of the message receiver and the message sender, wherein the router identity with larger IP address is the main router.
For example, the target routing weight of the router 1 is 50, the target routing weight of the router 3 is 52, the router 1 is used as a message receiver, the router 1 is determined to be a master router if the own routing weight is smaller than the target routing weight of the message sender, the router 3 is used as a message receiver, the router 3 is determined to be a standby router if the own routing weight is greater than the target routing weight of the message sender. If the target routing weights of router 1 and router 3 are equal, the IP addresses of both sides are compared, and the router identity with the larger IP address is the master router.
Referring to fig. 4, which is a flow chart of a flow balancing method in the embodiment of the present application, in conjunction with fig. 4, the flow balancing method in the present application is described below by taking the OpenStack cluster in fig. 3 as an example.
Taking the network node 1 as an example, storing all routers on the node into a cyclic connection table, determining whether the keepalive weight of the current router is equal to the weight of the current network node, if not, modifying the weight of the router so that the weight of the router is equal to the weight of the current network node, pointing to the next router, if so, directly pointing to the next router, and finally, hopefully achieving the balance of the number of the main routers on different network nodes.
For example, if the initial node weights of the network node 1 and the network node 2 are set to 50, the initial routing weights of the router 1, the router 2, the router 3, and the router 4 are all 50. When one master router is added to the network node 1, and the number of the master routers is 2, the target node weight q is 51. When the circulation connection table points to the router 1, the target routing weight 50 of the router 1 is updated to be 51, the router 1 and the router 3 send messages to each other to carry own target routing weight, the router 1 determines that the own target routing weight is greater than the target routing weight of the router 3, the router 1 is switched to a standby router, the router 3 determines that the own target routing weight is less than the target routing weight of the router 1, and the router 3 is switched to a main router.
In the embodiment of the application, by monitoring the number of routers (i.e. network nodes) on a physical machine, determining keepalive weights of the routers on the physical machine, and circularly and sequentially adjusting keepalive weights of the routers on the physical machine, finally, the balance of the number of main routers on the physical machine is expected to be achieved, so that the flow balance of the network nodes in the OpenStack cluster can be maintained, the load of the physical machine is reduced, packet loss is reduced, and the cluster bandwidth utilization rate is improved.
Based on the same inventive concept, the embodiment of the application also provides a flow balancing device. As shown in fig. 5, which is a schematic structural diagram of the flow equalization device 500, may include:
an obtaining unit 501, configured to obtain initial node weights corresponding to each network node, and synchronize initial routing weights of routers in each network node to corresponding initial node weights respectively;
a first determining unit 502, configured to determine, for any one network node, a target node weight of any one network node according to the number of the primary routers in any one network node when the primary-backup switching occurs in the router in any one network node;
an updating unit 503, configured to update an initial routing weight of each router in any one network node according to the target node weight, to obtain a target routing weight of each router;
a second determining unit 504, configured to determine, via routers belonging to the same switching mechanism software on different network nodes, a primary router and a standby router according to a manner of performing packet interaction based on respective target routing weights.
Optionally, the first determining unit 502 is specifically configured to:
taking the sum of the initial node weight and the routing coefficient as the target node weight, wherein the routing coefficient is the whole ratio of the number of the main routers in any network node to the preset parameter value.
Optionally, the second determining unit 504 is specifically configured to:
through the switching mechanism software, the routers belonging to the same switching mechanism software on different network nodes are controlled to mutually send messages carrying own target routing weight;
and determining the router identity of the message receiver according to the comparison result of the received target routing weight of the message sender and the target routing weight of the message receiver by the message receiver, wherein the router identity characterizes the primary and backup attributes of the message receiver.
Optionally, if the comparison result indicates that the target routing weight of the message receiver is smaller than the target routing weight of the message sender, the router identity of the message receiver is the main router;
if the comparison result shows that the target routing weight of the message receiver is greater than the target routing weight of the message sender, the router identity of the message receiver is a standby router;
if the comparison result shows that the target routing weight of the message receiver is equal to the target routing weight of the message sender, comparing the Internet Protocol (IP) addresses of the message receiver and the message sender, wherein the router identity with larger IP address is the main router.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present application.
Those skilled in the art will appreciate that the various aspects of the present application may be implemented as a system, method, or program product. Accordingly, aspects of the present application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
The embodiment of the application also provides electronic equipment based on the same inventive concept as the embodiment of the method. In this embodiment, the electronic device may be configured as shown in fig. 6, including a memory 601, a communication module 603, and one or more processors 602.
A memory 601 for storing a computer program for execution by the processor 602. The memory 601 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, programs required for running an instant messaging function, and the like; the storage data area can store various instant messaging information, operation instruction sets and the like.
The memory 601 may be a volatile memory (RAM) such as a random-access memory (RAM); the memory 601 may also be a nonvolatile memory (non-volatile memory), such as a read-only memory (rom), a flash memory (flash memory), a hard disk (HDD) or a Solid State Drive (SSD); or memory 601, is any other medium capable of carrying or storing a desired computer program in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to such. The memory 601 may be a combination of the above memories.
The processor 602 may include one or more central processing units (central processing unit, CPU) or digital processing units, etc. A processor 602 for implementing the above-described flow balancing method when calling the computer program stored in the memory 601.
The communication module 603 is used for communicating with terminal devices and other servers.
The specific connection medium between the memory 601, the communication module 603, and the processor 602 is not limited in the embodiment of the present application. The embodiment of the present application is shown in fig. 6, where the memory 601 and the processor 602 are connected by a bus 604, and the bus 604 is shown in fig. 6 with a bold line, and the connection between other components is merely illustrative, and not limited to the above. The bus 604 may be divided into an address bus, a data bus, a control bus, and the like. For ease of description, only one thick line is depicted in fig. 6, but only one bus or one type of bus is not depicted.
The memory 601 stores a computer storage medium in which computer executable instructions are stored for implementing the flow equalization method of the embodiments of the present application. The processor 602 is configured to perform the flow equalization method described above, as shown in fig. 2.
In some possible embodiments, aspects of the flow equalization methods provided herein may also be implemented in the form of a program product comprising a computer program for causing an electronic device to perform the steps of the flow equalization methods according to the various exemplary embodiments of the present application described herein above when the program product is run on the electronic device, e.g. the electronic device may perform the steps as shown in fig. 2.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and comprise a computer program and may run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave in which a readable computer program is embodied. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with a command execution system, apparatus, or device.
A computer program embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer programs for performing the operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer program may execute entirely on the user's computing device, partly on the user's equipment, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the elements described above may be embodied in one element in accordance with embodiments of the present application. Conversely, the features and functions of one unit described above may be further divided into a plurality of units to be embodied.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having a computer-usable computer program embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program commands may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the commands executed by the processor of the computer or other programmable data processing apparatus produce means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program commands may also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the commands stored in the computer readable memory produce an article of manufacture including command means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (6)

1. A method of flow equalization, the method comprising:
acquiring initial node weights corresponding to network nodes respectively, and synchronizing the initial routing weights of routers in the network nodes into corresponding initial node weights respectively;
determining, for any one network node, that when a router in the any one network node performs active-standby switching, taking the sum of an initial node weight corresponding to the any one network node and a routing coefficient as a target node weight of the any one network node, where the routing coefficient is a whole ratio of the number of the active routers in the any one network node to a preset parameter value;
updating the initial routing weight of each router in any network node according to the target node weight to obtain the target routing weight of each router;
through the switching mechanism software, the routers belonging to the same switching mechanism software on different network nodes are controlled to mutually send messages carrying own target routing weight;
and determining the router identity of the message receiver according to the received comparison result of the target routing weight of the message sender and the target routing weight of the message receiver, wherein the router identity characterizes the primary and backup attributes of the message receiver.
2. The method of claim 1, wherein if the comparison result indicates that the target routing weight of the message receiver is smaller than the target routing weight of the message sender, the router identity of the message receiver is the master router;
if the comparison result shows that the target routing weight of the message receiver is greater than the target routing weight of the message sender, the router identity of the message receiver is a standby router;
and if the comparison result shows that the target routing weight of the message receiver is equal to the target routing weight of the message sender, comparing the Internet Protocol (IP) addresses of the message receiver and the message sender, wherein the router identity with larger IP address is the main router.
3. A flow equalization device, comprising:
the system comprises an acquisition unit, a synchronization unit and a synchronization unit, wherein the acquisition unit is used for acquiring initial node weights corresponding to network nodes respectively and synchronizing the initial routing weights of routers in the network nodes into corresponding initial node weights respectively;
a first determining unit, configured to determine, for any one network node, when a master-slave handover occurs in a router existing in the any one network node, taking a sum of an initial node weight corresponding to the any one network node and a routing coefficient as a target node weight of the any one network node, where the routing coefficient is a whole ratio of the number of master routers in the any one network node to a preset parameter value;
the updating unit is used for updating the initial routing weight of each router in any network node according to the target node weight to obtain the target routing weight of each router;
the second determining unit is used for controlling routers belonging to the same switching mechanism software on different network nodes to mutually send messages carrying own target routing weight through the switching mechanism software; and determining the router identity of the message receiver according to the received comparison result of the target routing weight of the message sender and the target routing weight of the message receiver, wherein the router identity characterizes the primary and backup attributes of the message receiver.
4. The apparatus of claim 3, wherein the router identity of the message receiver is the master router if the comparison indicates that the target routing weight of the message receiver is less than the target routing weight of the message sender;
if the comparison result shows that the target routing weight of the message receiver is greater than the target routing weight of the message sender, the router identity of the message receiver is a standby router;
and if the comparison result shows that the target routing weight of the message receiver is equal to the target routing weight of the message sender, comparing the Internet Protocol (IP) addresses of the message receiver and the message sender, wherein the router identity with larger IP address is the main router.
5. An electronic device comprising a processor and a memory, wherein the memory stores a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1-2.
6. A computer readable storage medium, characterized in that it comprises a computer program for causing an electronic device to perform the steps of the method according to any one of claims 1-2 when said computer program is run on the electronic device.
CN202111617326.5A 2021-12-27 2021-12-27 A flow balancing method, device, electronic device and storage medium Active CN114422427B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111617326.5A CN114422427B (en) 2021-12-27 2021-12-27 A flow balancing method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111617326.5A CN114422427B (en) 2021-12-27 2021-12-27 A flow balancing method, device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN114422427A CN114422427A (en) 2022-04-29
CN114422427B true CN114422427B (en) 2024-03-08

Family

ID=81268952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111617326.5A Active CN114422427B (en) 2021-12-27 2021-12-27 A flow balancing method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114422427B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115643264B (en) * 2022-09-08 2025-04-11 华润数字科技有限公司 Load balancing method, device, equipment and storage medium based on core load
CN116055386B (en) * 2023-03-07 2023-06-02 燧原智能科技(成都)有限公司 Port weight updating method, device, chip and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2318747A1 (en) * 1997-12-19 1999-07-01 Holontech Corporation Router pooling in a network flowswitch
CN103188157A (en) * 2011-12-28 2013-07-03 迈普通信技术股份有限公司 Router equipment
CN107888492A (en) * 2017-10-16 2018-04-06 闽南师范大学 A kind of method and apparatus of VRRP load balancing
CN111726246A (en) * 2020-05-29 2020-09-29 苏州浪潮智能科技有限公司 Method, device and storage medium for switching between active and standby network cards in network card binding mode
CN112866107A (en) * 2021-01-25 2021-05-28 网宿科技股份有限公司 IP address notification method, traffic guidance method and network device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9619006B2 (en) * 2012-01-10 2017-04-11 Intel Corporation Router parking in power-efficient interconnect architectures
US10038626B2 (en) * 2013-04-16 2018-07-31 Amazon Technologies, Inc. Multipath routing in a distributed load balancer
US20170237623A1 (en) * 2016-02-15 2017-08-17 Kilton Patrick Hopkins Methods and apparatus for unified integration and processing of a variety of information sensors and systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2318747A1 (en) * 1997-12-19 1999-07-01 Holontech Corporation Router pooling in a network flowswitch
CN103188157A (en) * 2011-12-28 2013-07-03 迈普通信技术股份有限公司 Router equipment
CN107888492A (en) * 2017-10-16 2018-04-06 闽南师范大学 A kind of method and apparatus of VRRP load balancing
CN111726246A (en) * 2020-05-29 2020-09-29 苏州浪潮智能科技有限公司 Method, device and storage medium for switching between active and standby network cards in network card binding mode
CN112866107A (en) * 2021-01-25 2021-05-28 网宿科技股份有限公司 IP address notification method, traffic guidance method and network device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Dynamic load balanced routing in IP network;KuangYi Li等;《2016 international conference on information communication and management》;全文 *
基于VRRP的路由技术研究;洪亮;《长沙通信职业技术学院学报》;全文 *

Also Published As

Publication number Publication date
CN114422427A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN112087312B (en) Method, device and equipment for providing edge service
US9912538B2 (en) Synchronization of configuration file of virtual application distribution chassis
US10623251B2 (en) Private network driven hosted network device management
EP3664372A1 (en) Network management method and related device
US11822983B2 (en) Controller for off-cluster operations
US20190370376A1 (en) High-availability network device database synchronization
US20190026168A1 (en) Geographical Redundancy and Dynamic Scaling for Virtual Network Functions
US11893395B2 (en) Restart controller
CN114422427B (en) A flow balancing method, device, electronic device and storage medium
EP3316555A1 (en) Mac address synchronization method, device and system
CN114064206A (en) Pod method, system, equipment and storage medium for accessing edge node
CN106411574B (en) Management control method and device
CN114911171A (en) Equipment control method and device
US20250142317A1 (en) Unified data registry (udr) synchronization in a wireless communication network
WO2025102794A1 (en) Data splitting method and apparatus, device, storage medium, and program product
US12242900B2 (en) Event synchronization in a clustered environment using a distributed timer
CN117041055A (en) A configuration rollback method, equipment and media for RoCE-SAN lossless storage network
CN115460040A (en) Service processing method, device, terminal equipment and storage medium
US12470455B2 (en) Efficient state replication in SDN networks
CN112543511A (en) Method, device, apparatus and medium for providing and discovering moving edge calculation
RU2675050C1 (en) Method and device for selecting access control address to mac environment
CN114422280B (en) Network deployment method, device, node and storage medium
CN120144343A (en) Cluster management method, device, storage medium and electronic device
CN120811969A (en) Data transmission method and device based on double-link switching, electronic equipment and medium
WO2026094067A1 (en) Method and system for managing database expansion in a network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant