WO2014082259A1 - 实现负载均衡的方法及设备 - Google Patents

实现负载均衡的方法及设备 Download PDF

Info

Publication number
WO2014082259A1
WO2014082259A1 PCT/CN2012/085560 CN2012085560W WO2014082259A1 WO 2014082259 A1 WO2014082259 A1 WO 2014082259A1 CN 2012085560 W CN2012085560 W CN 2012085560W WO 2014082259 A1 WO2014082259 A1 WO 2014082259A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual link
number array
link number
virtual
array
Prior art date
Application number
PCT/CN2012/085560
Other languages
English (en)
French (fr)
Inventor
王哲
姚志明
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201280004550.XA priority Critical patent/CN103534996B/zh
Priority to PCT/CN2012/085560 priority patent/WO2014082259A1/zh
Publication of WO2014082259A1 publication Critical patent/WO2014082259A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • 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

Definitions

  • the present invention relates to communication technologies, and in particular, to a method and a device for implementing load balancing. Background technique
  • a load-balanced transmission link improves the reliability of information transmission and prevents service interruption due to excessive load on a link.
  • the algorithms for load balancing mainly include: rotation method, hash hash method, least connection method, fastest response method, minimum missing method and weighting method, random equalization algorithm and so on.
  • the above algorithm can solve the requirements of most network environment load balancing scenarios. These algorithms are related to the application, and the complexity is in the range of O(logn) to O(n). For example, the least connection method is to perform load balancing on the number of TCP connections between the server and the client, and then select a server with a small number of connections to serve the client. The above algorithm does not consider the scenario where the link itself is added or deleted, and the impact on the service when the link status changes is generally uncertain.
  • an embodiment of the present invention provides a method for implementing load balancing, including: acquiring, by a first node, an array of virtual link numbers between the first node and the second node, and the virtual link number array The location in which the identifier of each virtual link is distributed is represented by an index value of the virtual link number array, and the index value is unique;
  • the first node acquires a hash value corresponding to the service flow that needs to send the second node according to the hash algorithm, and searches for a virtual link corresponding to the same index value as the hash value in the virtual link number array. And identifying, by using the virtual link corresponding to the virtual link identifier, the service flow.
  • an embodiment of the present invention provides a communications device, including: a processor and a memory; the processor, configured to acquire an array of virtual link numbers between a current communications device and another communications device, where the virtual chain The location of each virtual link identifier in the array of road numbers is represented by an index of the array of virtual link numbers, and the index value is unique;
  • the memory is configured to store an array of current virtual link numbers obtained by the processor, and the processor is further configured to acquire, according to a hash algorithm, a hash value corresponding to a service flow that needs to send the another communication device Locating, in the current virtual link number array stored in the memory, a virtual link identifier corresponding to the same index value as the hash value, and using the virtual link corresponding to the virtual link identifier to carry the business flow.
  • an embodiment of the present invention provides a communications device, including:
  • An array obtaining unit configured to acquire an array of virtual link numbers between the current communication device and another communication device, where each virtual link identifier in the virtual link number array is distributed by using the virtual link
  • the index of the number array indicates that the index value is unique
  • a virtual link selection unit configured to acquire, according to a hash algorithm, a hash value corresponding to a service flow that needs to send the another communication device, and search and disperse in the current virtual link number array obtained by the array obtaining unit
  • the virtual link identifier corresponding to the index value with the same column value is used to carry the service flow by using the virtual link corresponding to the virtual link identifier.
  • the method and device for implementing load balancing acquire the virtual link number array between the current first node and the second node by using the first node, and then obtain the service flow according to the hash algorithm.
  • a hash value such that the virtual link corresponding to the index value corresponding to the hash value carries the service flow, thereby realizing the balance of the service flow carried on each virtual link between the first node and the second node, and simultaneously
  • the link in the prior art for deleting a link and increasing a link is solved. It is difficult to achieve load balancing at the traffic level.
  • 1A is a scene diagram of a node in an embodiment of the invention.
  • FIG. 1B is a schematic flowchart of a method for implementing load balancing according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for implementing load balancing according to another embodiment of the present invention
  • FIG. 4 is a schematic flowchart of a method for implementing load balancing according to another embodiment of the present invention
  • FIG. 5 is a schematic flowchart of a method for implementing load balancing according to another embodiment of the present invention
  • FIG. 6 is a schematic flowchart of a method for implementing load balancing according to another embodiment of the present invention
  • FIG. 8 is a schematic flowchart of a method for implementing load balancing according to another embodiment of the present invention
  • Schematic diagram of the structure of the communication device
  • FIG. 9 is a schematic structural diagram of a communication device according to another embodiment of the present invention.
  • the technical solutions of the present invention will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the various embodiments described below are merely exemplary embodiments of the invention. Based on the following various embodiments of the present invention, those skilled in the art can obtain other technical features that can solve the technical problems of the present invention and achieve the technical effects of the present invention by equivalently transforming some or even all of the technical features without creative work. The various embodiments of the invention are apparent from the scope of the invention as disclosed.
  • the algorithms used in the method of implementing load balancing include: a rotation method, a hash hash method, a minimum connection number equalization algorithm, a fastest response method, a minimum missing method, a weighting method, and a random equalization algorithm.
  • These algorithms can solve the requirements of most network environment load balancing scenarios. These algorithms are related to the application, and the complexity is in the range of O(logn) to O(n). Such as the minimum number of connections
  • the algorithm is to perform some load balancing on the number of TCP connections between the server and the client.
  • the scenario of adding and deleting the link itself is not particularly considered, and the impact on the service when the link status changes is generally uncertain.
  • each service request of the client may have a large difference in the time of staying at the server.
  • a simple polling or random equalization algorithm is used, on each server.
  • the number of connection processes can vary greatly, so that it does not actually achieve true load balancing.
  • the minimum connection number equalization algorithm has a data record for each server that needs to be loaded internally, and records the number of connections currently being processed by the server. When there is a new service connection request, the current request is assigned to the least number of connections. The server makes the balance more in line with the actual situation, and the load is more balanced.
  • the minimum connection number equalization algorithm is a dynamic scheduling algorithm that estimates the load on the server by the number of connections currently active on the server.
  • the scheduler needs to record the number of connections that have been established for each server. When a request is dispatched to a server, the number of connections is increased by one; when the connection is aborted or timed out, the number of connections is decremented by one.
  • the minimum connection number equalization algorithm is suitable for long-term processing of request services, such as FTP applications.
  • the minimum connection number equalization algorithm can smooth the load distribution with large load variation to each server, and all requests with long processing time cannot be sent to the same server.
  • the algorithm is not ideal, because the TCP connection will enter the TIME_WAIT state after processing the request, and the TIME_WAIT of TCP is generally 2 minutes. At this time, the connection also occupies the resources of the server, so this will occur.
  • a high-performance server has processed the received connection, the connection is in the TIME_WAIT state, and the low-performance server is already busy processing the received connection and is constantly receiving new connection requests.
  • the embodiment of the present invention provides a method for implementing load balancing, which is used to implement load balancing of virtual links when virtual links are added and deleted in a network.
  • the physical link is the actual number of links between two or more nodes.
  • the virtual link is a plurality of abstract links in a physical link. Multiple virtual links can correspond to the same physical link.
  • the scalable virtual link mentioned in the embodiment of the present invention means that, in the load balancing algorithm, the array space storing the virtual link identifier may be enlarged by a multiple of 2n (n>0) according to actual needs to implement the service flow. A more balanced purpose when selecting virtual link identifiers on an array based on the results of the hash algorithm.
  • the service virtual link carried by the physical link may be 8n (n is greater than or equal to 1), for convenience between the first node and the second node. How the load of the virtual link is balanced, assuming that n is equal to 1, the number of physical links is equal to the number of virtual links.
  • FIG. 1A is a partial schematic structural diagram of a control system according to an embodiment of the present invention
  • FIG. 1B is a schematic flowchart of a method for implementing load balancing according to an embodiment of the present invention, which is combined with FIG. 1A and FIG.
  • the method for implementing load balancing in this embodiment is as follows.
  • the first node acquires an array of virtual link numbers between the first node and the second node, and the location of each virtual link in the virtual link number array is distributed.
  • the index value of the virtual link number array indicates that the index value is unique.
  • the virtual link number array includes the identity and index values of the virtual link, where the index value indicates the location of the identity of the virtual link.
  • the identifiers of the virtual links are distributed and balanced in the virtual link number array, so that the service flows carried on the virtual links can be balanced.
  • the index value is represented by the Arabic numerals 0 ⁇ 7.
  • the virtual link identifier is represented by ID n, where n takes an integer greater than 0, as follows: Virtual link identifiers in various tables: ID 1, ID 2, ID 3, and so on.
  • the first node acquires, according to the hash algorithm, a service flow pair that needs to send the second node.
  • the virtual hash identifier corresponding to the index value that is the same as the hash value is found in the virtual link number array, and the virtual link bearer corresponding to the virtual link identifier is used.
  • the business flow is used.
  • the first node may obtain a hash value corresponding to the service flow that needs to be sent to the second node according to a value of a specific field in the service flow (such as a destination IP).
  • a service flow may obtain a modulus value according to a hash algorithm such as (destination IP) %8, and then search for a virtual link corresponding to the same index value in the current virtual link number array. And identifying, by using the virtual link corresponding to the identifier of the virtual link, the service flow.
  • a hash algorithm such as (destination IP) %8
  • the virtual link identifier corresponding to the index value 2 corresponding to the modulus value 2 For ID 1 , the virtual link of ID 1 is used to carry the above service flow.
  • the first node first obtains an array of virtual link numbers between the current first node and the second node, and then obtains a hash of the service flow according to the hash algorithm.
  • the value is such that the virtual link corresponding to the index value that is consistent with the hash value carries the service flow, thereby realizing the balance of the service flow carried on each virtual link between the first node and the second node, and simultaneously solving the present problem
  • the current virtual link number array " between the first node and the second node" may include the following sub-steps, as shown in FIG. 2.
  • the first node and the second node obtain an array of the first virtual link number according to the initialized virtual link number array (ie, the virtual link number array in the initial state).
  • the identifiers of the N virtual links in the first virtual link number array are balanced; the first virtual link number array is an array of virtual link numbers between the first node and the second node; Where N is a positive integer greater than or equal to 1.
  • the first virtual link number array is obtained according to the initialized virtual link number array, as shown in Table 1.
  • the first virtual link number array in .
  • the first virtual link number array is obtained according to the initialized virtual link number array, such as the first virtual link number array in Table 3.
  • the foregoing step 102 may be as follows:
  • the first node acquires, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the second node, that is, a modulus value, and searches for the index value corresponding to the hash value in the first virtual link number array.
  • the virtual link is identified by the virtual link corresponding to the identifier of the virtual link.
  • the method for implementing load balancing in this embodiment can implement the service flow balancing carried on each virtual link between the first node and the second node, and solve the problem of deleting the link and increasing the link in the prior art. It is difficult to achieve load balancing at the link traffic level.
  • the first node is configured with two virtual links to the second node, Linkl (virtual link ID1) and 1_ ⁇ 1 ⁇ 2 (virtual chain).
  • the method for implementing load balancing is responsible for processing the first node in the virtual link increase and the virtual link deletion. Load balancing the service flows carried by the virtual link. When a virtual link is added, the new virtual link is used to share the most heavily loaded virtual link. When the virtual link is deleted, the link with the lightest load is selected to carry the service flow carried by the deleted virtual link. In particular, the above method rarely affects the original traffic flow when adding and deleting virtual links. The following description of the embodiments in Figures 3 to 7 is made.
  • the method for implementing load balancing may further include step 1012 as shown in FIG. 3;
  • the second virtual link number array is an array of virtual link numbers between the first node and the second node; wherein M is a positive integer greater than or equal to 1.
  • the change of the virtual link may be dynamic, such as the first node may add one or more virtual links according to the first instruction of the received control system, or according to the received control system.
  • the second instruction can delete one or more virtual links.
  • step 1012 a scenario in which M virtual links are added between the current two nodes is illustrated.
  • the step of obtaining the second virtual link number array according to the first virtual link number array may include:
  • the identifiers of the Q virtual links that are frequently used in the first virtual link number array are searched, and the identifiers of the Q virtual links that are used more frequently are replaced by the identifiers of the M virtual links that are used more frequently.
  • the number of times of use is a frequency at which the identifier of the virtual link appears in the first virtual link number array, for example, a virtual chain in any array of the second virtual link number array 01 to 07 in Table 2.
  • the frequency at which the sign of the road appears; Q is a positive integer greater than zero and less than or equal to M.
  • the first node configures the distribution of the N+M virtual link identifiers according to the number of uses of the virtual links in the first virtual link number array and the identifiers of the M virtual links. , obtaining the second virtual link number array.
  • the first node when a virtual link is added, the first node can find the virtual link with the heaviest load, and let the newly added virtual link share the traffic flow on the most heavily loaded virtual link. As a result, the impact on the original business is very small.
  • the virtual link may be dynamically added and dynamically deleted. In this embodiment, only the dynamic increase is taken as an example.
  • the service may be based on a certain hash.
  • the algorithm (such as the destination IP%8) directly selects the corresponding virtual link. For example, if the current virtual link is 5 (corresponding to the 7th row of Table 2), the identifier of the virtual link corresponding to the modulus 2 is ID2; The ID of the corresponding virtual link is ID5, and the ID of the virtual link corresponding to the modulo 1 is ID4.
  • the modulo 2
  • the virtual link bearer service flow of ID2 is selected.
  • the modulo is 7, the virtual link bearer of ID1 is selected. business flow.
  • each additional link has a very small impact on other services. For example, when adding a virtual link such as ID8, only the location of the virtual link ID1 with the heaviest load uses the newly added virtual link ID8. For sharing, the virtual links selected by other services do not change.
  • the foregoing step 102 may be as follows:
  • the first node acquires, according to the hash algorithm, a hash value corresponding to the traffic flow that needs to send the second node, that is, a modulus value, and searches for the index value corresponding to the hash value in the second virtual link number array.
  • the virtual link identifier carries the service flow by using a virtual link corresponding to the identifier of the virtual link.
  • the first extension instruction is used to instruct the first node to extend the current virtual chain according to the expansion factor.
  • the length of the road number array is used to instruct the first node to extend the current virtual chain according to the expansion factor.
  • the third virtual link number array is an array of virtual link numbers between the first node and the second node.
  • the length of the current virtual link number array (such as the second virtual link number array) is expanded from 8 to 16 according to the first extended instruction.
  • the identifiers of the virtual links in the original second virtual link number array need to be redistributed in the virtual link number array of length 16, that is, the N+M virtual link identifiers are redistributed in the virtual chain of length 16.
  • An array of road numbers That is, according to the first extended instruction and the second virtual link
  • the array of numbers obtains an array of third virtual link numbers, such as the third virtual link number array in Table 1 above.
  • the index value of the virtual link number array of length 16 is also represented by 0-15. Since the third virtual link number array is an array of virtual link numbers between the first node and the second node, the foregoing step 102 may be as follows:
  • the first node acquires, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the second node, that is, a modulus value, and searches for the index value corresponding to the hash value in the third virtual link number array.
  • the virtual link is identified by the virtual link corresponding to the identifier of the virtual link.
  • the expansion factor may be a default/preset extension factor in the node.
  • the step 1013 described above may be the step 1013' not shown in the following figure.
  • the second extension instruction is used to instruct the first node to extend the current virtual link number according to a preset spreading factor.
  • the fourth virtual link number array is an array of virtual link numbers between the first node and the second node.
  • the length of the virtual link number array is expanded from 8 to 16 according to the second extended instruction; if the default expansion factor is 4, according to the second extended instruction, The length of the virtual link number array is expanded from 8 to 32.
  • the identifiers of the virtual links in the original second virtual link number array can be redistributed in the virtual link number array of length 16/32.
  • the fourth virtual link number array is an array of virtual link numbers between the first node and the second node
  • the foregoing step 102 may be as follows:
  • the first node acquires, according to the hash algorithm, a service flow that needs to send the second node.
  • a hash value that is, a modulus value, in the fourth virtual link number array, searching for an identifier of a virtual link corresponding to an index value that is the same as a hash value, and using a virtual chain corresponding to the identifier of the virtual link
  • the road carries the traffic flow.
  • the virtual link identifier corresponding to the same index value carries the service flow by using the virtual link corresponding to the virtual link identifier.
  • the service weighting factor records the weight of the service carried on the link (generally, only one service is carried on one virtual link). In this embodiment, load balancing can be performed according to the service weighting factor.
  • the number of times of using the virtual link is used to speed up the search speed of the virtual node with the heaviest load of the first node, and the number of times of using one virtual link is found once according to the index value, and the virtual link is added. And delete the dynamic change scenes used.
  • the traffic weighting factor is used to speed up the lookup with the service-based load balancing method. For example, when a virtual link is added, the service flow on the virtual link of the service with a large service weight factor in the current virtual link number array needs to be shared in time; when the virtual link is deleted, the service weight factor is selected to be small. The virtual link bears the original service on the deleted virtual link, and avoids the impact on the services carried on the virtual link with the large service factor.
  • step 1012 includes the following steps: Step a01 not shown in the figure.
  • A01 If the service carried on the N virtual links has a service weight factor, configure N according to a product of the service weight factor and the number of times of using the virtual link of the service in the first virtual link number array. +M distribution of the identifiers of the virtual links, obtaining an array of second virtual link numbers; frequencies appearing in the array of pseudo link numbers.
  • the average value of the service weight factor and the first virtual link number array that are carried by each virtual link may be The product of the number of times of each virtual link is used to obtain the weight of the virtual link (the greater the weight, the more severe the load of the link is), and the N+M is configured according to the weight of the virtual link.
  • the distribution of the virtual link identifiers to obtain the second virtual link number array; the frequency appearing in the link number array; the service weight factor average may be the average of all the service weight factors in the node.
  • the virtual link usage number corresponding to ID2 is 4, and the virtual link usage number corresponding to ID1 is 4.
  • the virtual link usage number corresponding to ID5 is 3
  • the virtual link usage number corresponding to ID6 is 2
  • the virtual link usage number corresponding to ID1 is 3.
  • the service weight factor can be a preset value, and the service weight factor can be between 0 and 1. The larger the number, the more important the service corresponding to the number. Alternatively, the service weighting factor can take a number between 1 and 10. The larger the number, the more important the service corresponding to the number.
  • the virtual link identified as ID3 When the virtual link identified as ID1 in Table 3 below is deleted by the first node (the third row of Table 3), the virtual link identified as ID3 carries a large service weight factor relative to ID2. The virtual link of ID3 cannot be used to carry other services. In this case, the virtual link identified as ID3 may not be selected to fill the deleted virtual link in the current virtual link number array. . In the third row of Table 3, the virtual link with ID 2 is used to carry the traffic carried by the virtual link with the original ID ID1. At this time, the load balancing effect can also be achieved.
  • the foregoing step 1012 is based on the first expansion.
  • the step of acquiring the third virtual link number array "and the second virtual link number array" may include the sub-step b01 not shown in the following figure:
  • the first extension configures a distribution of the N+M virtual link identifiers to obtain an array of the third virtual link number; a frequency appearing in the link number array.
  • the weight is configured according to the weight of each virtual link in the second virtual link number array and the first extended instruction. And distributing the N+M virtual link identifiers to obtain the third virtual link number array.
  • the weight of the virtual link is the product of the service weighting factor of the traffic carried on the virtual link and the number of times the virtual link carrying the service is used.
  • a service flow uses a certain field (such as a destination IP) plus a hash algorithm (such as the simplest modulo hash algorithm) to obtain a modulus value, and virtualizes the same index value as the modulus value.
  • a certain field such as a destination IP
  • a hash algorithm such as the simplest modulo hash algorithm
  • the above method for implementing load balancing may further include Step 1012" shown in Figure 5;
  • the fifth virtual link number array is an array of virtual link numbers between the first node and the second node; wherein P is a positive integer smaller than N.
  • the change of the virtual link may be dynamic, such as one or more virtual links may be added, or one or more virtual links may be deleted.
  • the example illustrated in step 1012 is that the P strip is deleted between the current two nodes. The scenario of the proposed link.
  • the step of obtaining the fifth virtual link number array according to the identifier of the first virtual link number array and the deletion of the P virtual link in the foregoing 1012" may specifically include:
  • the identifiers of the R virtual links that are used less frequently in the first virtual link number array are searched, and the identifiers of the deleted P virtual links are equalized and replaced by the identifiers of the R virtual links, respectively.
  • the number of uses is a frequency at which the identifier of the virtual link appears in the first virtual link number group; R is a positive integer greater than zero and less than or equal to P.
  • the service carried on the ID1 can be
  • the virtual link bearer of ID3 can carry the service carried on ID2 by the virtual link of ID4, such as the obtained fifth virtual link number array 02.
  • Each virtual link is deleted, and no impact is affected on other services.
  • deleting link ID1 only the location corresponding to virtual link ID1 is replaced by the lightest virtual link ID2.
  • the virtual links of other services will not make any adjustments.
  • the foregoing step 102 may be as follows:
  • the first node acquires, according to the hash algorithm, a hash value corresponding to the traffic flow that needs to be sent by the second node, that is, a modulus value, and searches for the index value corresponding to the hash value in the fifth virtual link number array.
  • the virtual link is identified by the virtual link corresponding to the identifier of the virtual link.
  • the method for implementing load balancing may further include step 1013 shown in FIG. 6;
  • the third extension instruction is used to instruct the first node to extend the current virtual chain according to the expansion factor
  • the sixth virtual link number array is an array of virtual link numbers between the first node and the second node.
  • the length of the virtual link number array is expanded from 8 to 48 according to the third extended instruction.
  • the identification of each virtual link in the original sixth virtual link number array is required. Redistributed in the virtual link number array of length 48; if the extension is 8, the length of the virtual link number array is expanded from 8 to 64 according to the third extended instruction.
  • the original sixth virtual link number array Each virtual link identifier in the need to be redistributed in an array of virtual link numbers of length 64. Since the sixth virtual link number array is an array of virtual link numbers between the first node and the second node, the foregoing step 102 may be as follows:
  • the first node acquires, according to the hash algorithm, a hash value corresponding to the traffic flow that needs to send the second node, that is, a modulus value, and searches for the index value corresponding to the hash value in the sixth virtual link number array.
  • the virtual link is identified by the virtual link corresponding to the identifier of the virtual link.
  • the virtual link identifier corresponding to the same index value carries the service flow by using the virtual link corresponding to the virtual link identifier.
  • the foregoing extended instruction may not include an extension factor, and the expansion factor may be a default value, as follows:
  • the fourth extension instruction is used to instruct the first node to extend the current virtual link number according to a preset spreading factor.
  • the seventh virtual link number array is an array of virtual link numbers between the first node and the second node.
  • the length of the virtual link number array is expanded from 8 to 16 according to the fourth extended instruction.
  • each virtual link identifier in the original seventh virtual link number array Need to be redistributed in a virtual link number array of length 16. Table 4 below.
  • Virtual link (virtual link
  • the first virtual link number array is up, the fifth virtual link number array is deleted, the fifth virtual link number array is deleted, and the seventh virtual link number of the first node and the second node of the fifth virtual link number array is deleted.
  • the expansion factor is an array of virtual link numbers extended by the sixth virtual link number array.
  • the step of “acquiring the fifth virtual link number array according to the first virtual link number array and deleting the identifier of the P virtual link” in the foregoing step 1012 may include the following Step S01 is not shown in the figure.
  • the service carried by the N virtual links has a service weight factor
  • the average value of all service weight factors is obtained, according to the average value and the number of times of using the virtual link carrying the service.
  • the product (the larger the product, the heavier the load) configures the distribution of the identifiers of the NP virtual links to obtain the fifth virtual link number array.
  • the business weighting factor can be between 0 and 1. The larger the number, the more important the business of the number.
  • the virtual link carrying the service with a small service weight factor is selected to bear the original service of the deleted virtual link, and the virtual link carrying the service with a large service weight factor is avoided. influences.
  • the step of “acquiring the seventh virtual link number array according to the fourth extended instruction and the fifth virtual link number array” in the foregoing step 1013′ includes the following steps. Step q01 not shown in the figure:
  • the service carried on the NP virtual link has a preset service weight factor, Obtaining, according to the product of the service weighting factor and the number of times of using the virtual link of the service, and the fourth extension instruction, configuring the distribution of the identifier of the NP virtual link to obtain the seventh virtual link number array; The frequency that appears in the array of road numbers.
  • the first node when adding a virtual link, can find the virtual link with the heaviest load, and let the newly added virtual link share the bearer of the final virtual link.
  • the virtual link with the lightest load is found to bear the service transmission task of the deleted virtual link.
  • the complexity of the above method is low, which can be 0 (1 ), and the impact on the original service is very small in the process of adding and deleting links.
  • FIG. 7 is a schematic flow chart of a method for implementing load balancing according to another embodiment of the present invention. As shown in FIG. 7 and Table 5, the method for implementing load balancing in this embodiment is as follows.
  • the first virtual link number array is an array of virtual link numbers between the first node and the second node; wherein N is a positive integer greater than or equal to 1.
  • the second virtual link number array is an array of virtual link numbers between the first node and the second node; wherein M is a positive integer greater than or equal to 1.
  • the eighth virtual link number array is an array of virtual link numbers between the first node and the second node.
  • the first node determines that the second instruction for deleting the P virtual link sent by the control system where the first node is located is received,
  • the fifth virtual link number array is an array of virtual link numbers between the first node and the second node; wherein P is a positive integer smaller than N.
  • the ninth virtual link number array is an array of virtual link numbers between the first node and the second node.
  • the virtual link number array that initially stores the virtual link identifier (such as R) is invalid, and the result of the service flow selection is invalid (in this case, no virtual link is available).
  • the virtual link is added in the manner provided by the foregoing step 1011, all the locations in the virtual link number array are the identifiers of the virtual link, such as ID1;
  • the first node can find the identifier of the virtual link of the Q virtual link with the current virtual link usage, and use the virtual link of the virtual link. Identifying part of the identifiers of the Q virtual links that have been used more frequently, until all the virtual link identifiers are aligned in the current virtual link number array, and the load balancing effect is achieved;
  • the process of deleting a virtual link is similar to the process of adding a virtual link. It simply searches for the identifier of the virtual link that has been used less frequently for the current virtual link, and continuously replaces the deleted virtual link with the identifier of the virtual link that is used less frequently. The identification of the road until the identification of all virtual links is evenly arranged in the virtual link number array to achieve load balancing.
  • the first node acquires, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the second node, that is, a modulus value, and searches for an index value corresponding to the hash value in the current virtual link number array.
  • the virtual link identifier carries the service flow by using a virtual link corresponding to the virtual link identifier.
  • the method for implementing the load balancing in the foregoing embodiment may not affect the original service when the virtual link is deleted and the virtual link is added, and only the service carried on the virtual link corresponding to the deleted or added virtual link identifier may be Affected, there is no impact on the services carried on the virtual links corresponding to other virtual link identifiers in the virtual link number array.
  • the expandable virtual link virtualizes n virtual links for the service flow (n is a multiple of the physical link), and simultaneously uses the virtual link usage count array and the service weight factor save array in Table 6.
  • virtual link usage array (such as the first virtual link number array in Table 2, the number of virtual link ID1 used here is the statistical value in the table entry space, 8) for acceleration
  • Virtual link search and selection, virtual link identification can be selected according to actual needs, such as ample memory space, you can choose a larger value, so the hash value of the hash is hashed More evenly, the probability of each virtual link in the entry space being used is more uniform.
  • the scalable virtual link in any of the above embodiments can be understood as the number of times the virtual link is used by the array space. The more times the virtual link is used, the more the proportion of the traffic carried on the virtual link is. weight. If the virtual link is properly extended, the load balancing effect is more uniform, because the more the virtual link expands, the more balanced the load on the actual physical link is from the perspective of probability.
  • the above method can be easily extended.
  • the complexity of the virtual link search is 0 (1).
  • the service weight factor can be added to the optimal load balancing when the virtual link is added or deleted.
  • the embodiment of the present invention further provides a communication device.
  • the communication device in this embodiment includes: a processor 81 and a memory 82;
  • the processor 81 is configured to acquire an array of virtual link numbers between the current communication device and another communication device, where the location of each virtual link identifier in the virtual link number array is used.
  • An index of the virtual link number array indicates that the index value is unique;
  • the memory 82 is configured to store an array of current virtual link numbers acquired by the processor.
  • the processor 81 is further configured to acquire, according to a hash algorithm, a hash value corresponding to a service flow that needs to send the another communication device. Locating, in the current virtual link number array stored in the memory, a virtual link identifier corresponding to the same index value as the hash value, and using the virtual link corresponding to the virtual link identifier to carry the business flow.
  • the processor 81 is specifically configured to acquire the first virtual virtual network according to the initialized virtual link number array when there is a virtual link between the communication device and the another communication device.
  • the memory 82 is configured to store an array of a first virtual link number between the current communication device and the another communication device; where ⁇ is a positive integer greater than or equal to 1.
  • the processor 81 is further configured to acquire, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the another communication device, and search and hash in the first virtual link number array stored in the memory.
  • the virtual link identifier corresponding to the index value of the same value is used to carry the service flow by using a virtual link corresponding to the virtual link identifier.
  • the communications device further includes: a receiver 83;
  • the receiver 83 is configured to receive a first instruction for adding M virtual links sent by a control system where the communication device is located;
  • the processor 81 is further configured to: after the receiver 83 receives the first instruction, obtain an array of the second virtual link number according to the identifier of the first virtual link number array and the added M virtual links.
  • the identifiers of the N+M virtual links in the second virtual link number array are all unbalanced; the memory 82 is configured to store a second virtual link between the current communication device and the another communication device.
  • the processor 81 is further configured to acquire, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the another communication device, and search for the second virtual link number array stored in the memory.
  • the virtual link identifier corresponding to the index value of the hash value is used to carry the service flow by using a virtual link corresponding to the virtual link identifier.
  • the communications device further includes a receiver 83 not shown in the figure;
  • the receiver 83 is further configured to receive, by the control system, a first extended instruction that includes an extension factor, where the first extended instruction is used to instruct the communications device to extend the current virtual link according to the spreading factor.
  • the processor 81 is further configured to: after the receiver 83 receives the first extended instruction, acquire an array of a third virtual link number according to the first extended instruction and the second virtual link number array, where The identifier distribution of the N+M virtual links in the third virtual link number array is balanced; the memory 82 is configured to store an array of the third virtual link number between the current communication device and the another communication device. ;
  • the processor 81 is further configured to acquire, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the another communication device, and search for the third virtual link number array stored in the memory.
  • the virtual link identifier corresponding to the index value of the hash value is used to carry the service flow by using a virtual link corresponding to the virtual link identifier.
  • the communications device further includes a receiver not shown in the figure.
  • the receiver 83 is further configured to receive a second extended instruction sent by the control system, where The second extension instruction is used to instruct the communication device to extend the length of the current virtual link number array according to a preset spreading factor;
  • the processor 81 is further configured to: after the receiver 83 receives the second extended instruction, acquire an fourth virtual link number array according to the second extended instruction and the second virtual link number array, where The identifier distribution of the N+M virtual links in the fourth virtual link number array is balanced; the memory 82 is configured to store an array of the fourth virtual link number between the current communication device and the another communication device. .
  • the processor 81 is further configured to acquire, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the another communication device, and search for the fourth virtual link number array stored in the memory 82.
  • the virtual link identifier corresponding to the index value of the hash value is used to carry the service flow by using a virtual link corresponding to the virtual link identifier.
  • the processor 81 is further configured to: when the service carried on the N virtual links has a service weight factor, according to the service weight factor and the virtual bearer of the service The product of the number of times of use of the link, the number of uses of each virtual link in the first virtual link number array, the distribution of the identifiers of the N+M virtual links, and the second virtual link number array; The frequency that appears in the array.
  • the communications device further includes a receiver 83 not shown in the figure;
  • the receiver 83 is configured to receive a second instruction for deleting a P virtual link sent by a control system where the communication device is located;
  • the processor 81 is configured to obtain an array of the second virtual link number according to the identifier of the first virtual link number array and the deleted P virtual links after the receiver 83 receives the second instruction.
  • the identifier of the NP virtual link in the second virtual link number array is balanced; the memory 82 is configured to store an array of the fifth virtual link number between the current communication device and the another communication device.
  • P is a positive integer less than N.
  • the processor 81 is further configured to: obtain, according to a hash algorithm, a hash value corresponding to a service flow that needs to send the another communication device, and search and hash the fifth virtual link number array stored in the memory 82.
  • the virtual link corresponding to the road identifier carries the service flow.
  • the receiver 83 is further configured to receive, by the control system, a third extended instruction that includes an extension factor, where the third extended instruction is used to indicate that the communications device is configured according to the The expansion factor extends the length of the current virtual link number array;
  • the processor 81 is configured to obtain a sixth virtual link number array according to the third extended instruction and the fifth virtual link number array, after the receiver 83 receives the third extended instruction, The identifier distribution of the NP virtual links in the sixth virtual link number array is balanced;
  • the memory 82 is configured to store an array of sixth virtual link numbers between the current communication device and the another communication device;
  • the processor 81 is further configured to acquire, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the another communication device, in the sixth virtual link number array stored in the memory 82.
  • the virtual link identifier corresponding to the index value that is the same as the hash value is searched, and the service line is carried by the virtual link corresponding to the virtual link identifier.
  • the receiver 83 is further configured to receive a fourth extended instruction sent by the control system, where the fourth extended instruction is used to instruct the communications device to extend a length of the current virtual link number array according to a preset spreading factor;
  • the processor 81 is configured to obtain, after the receiver 83 receives the fourth extended instruction, an array of seventh virtual link numbers according to the fourth extended instruction and the fifth virtual link number array, where The identifier distribution of the NP virtual links in the seventh virtual link number array is balanced;
  • the memory 82 is configured to store an array of seventh virtual link numbers between the current communication device and the other communication device.
  • the processor 81 is further configured to acquire, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the another communication device, in the seventh virtual link number array stored in the memory 82.
  • the virtual link identifier corresponding to the index value that is the same as the hash value is searched, and the service line is carried by the virtual link corresponding to the virtual link identifier.
  • the processor 81 is specifically configured to: when the service carried on the N virtual links has a service weight factor, according to the service weight factor and a virtual chain carrying the service The product of the number of times of use of the road configures the distribution of the identifiers of the NP virtual links to obtain the fifth virtual link number array; The frequency that appears in the array of link numbers.
  • an embodiment of the present invention provides a communication device.
  • the communication device of this embodiment includes: an array obtaining unit 91 and a virtual link selecting unit 92;
  • the array obtaining unit 91 is configured to acquire an array of virtual link numbers between the current communication device and another communication device, where the location of each virtual link identifier in the virtual link number array is used by the virtual link
  • the index of the number array indicates that the index value is unique
  • the virtual link selection unit 92 is configured to acquire, according to the hash algorithm, a hash value corresponding to the service flow that needs to send the another communication device, and search and search the current virtual link number array acquired by the array obtaining unit 91.
  • the virtual link identifier corresponding to the index value with the same hash value carries the service flow by using the virtual link corresponding to the virtual link identifier.
  • the array obtaining unit 91 is specifically configured to acquire a first virtual link number according to the initialized virtual link number array when there are N virtual links between the communication device and the another communication device.
  • the first virtual link number array is an array of virtual link numbers between the current communication device and another communication device; wherein N is a positive integer greater than or equal to 1.
  • the communications device further includes a receiving unit 93 not shown in the figure;
  • the receiving unit 93 is configured to receive a first instruction for adding the M virtual links sent by the control system where the communication device is located;
  • the array obtaining unit 91 is further configured to: after the receiving unit 93 receives the first instruction, acquire a second virtual link number according to the identifier of the first virtual link number array and the added M virtual links. An array, the identifiers of the N+M virtual links in the second virtual link number array are not balanced;
  • the second virtual link number array is an array of second virtual link numbers between the current communication device and another communication device; wherein M is a positive integer greater than or equal to 1.
  • the receiving unit 93 is further configured to receive the control.
  • a first extended instruction that is sent by the system, including a spreading factor, where the first extended instruction is used to instruct the communications device to extend a length of the current virtual link number array according to the spreading factor;
  • the array obtaining unit 91 is further configured to: after the receiving unit 93 receives the first extended instruction, acquire an array of a third virtual link number according to the first extended instruction and the second virtual link number array, The identifiers of the N+M virtual links in the third virtual link number array are balanced;
  • the third virtual link number array is an array of a third virtual link number between the current communication device and the another communication device;
  • the receiving unit 93 is further configured to receive a second extended instruction sent by the control system, where the second extended instruction is used to instruct the communications device to extend a length of the current virtual link number array according to a preset spreading factor;
  • the array obtaining unit 91 is further configured to: after the receiving unit 93 receives the second extended instruction, acquire an array of fourth virtual link numbers according to the second extended instruction and the second virtual link number array, The identifiers of the N+M virtual links in the fourth virtual link number array are balanced;
  • the fourth virtual link number array is an array of fourth virtual link numbers between the current communication device and the other communication device.
  • the array obtaining unit 91 is further configured to: when the service carried on the N virtual links has a service weight factor, according to the service weight factor and the bearer of the service The product of the number of times the virtual link is used configures the distribution of the identifiers of the N+M virtual links to obtain an array of second virtual link numbers; the frequencies appearing in the array of pseudo link numbers.
  • the communication device further includes a receiving unit 93 not shown in the figure;
  • the receiving unit 93 is configured to receive a second instruction for deleting a P virtual link sent by a control system where the communication device is located;
  • the array obtaining unit 91 is configured to obtain a second according to the identifier of the first virtual link number array and the deleted P virtual link after the receiving unit 93 receives the second instruction.
  • the fifth virtual link number array is an array of fifth virtual link numbers between the current communication device and the another communication device; wherein P is a positive integer less than N.
  • the receiving unit 93 is further configured to receive, by the control system, a third extended instruction that includes an extension factor, where the third extended instruction is used to indicate that the communications device is configured according to the The expansion factor extends the length of the current virtual link number array;
  • the array obtaining unit 91 is configured to acquire an array of a sixth virtual link number according to the third extended instruction and the fifth virtual link number array, after the receiving unit 93 receives the third extended instruction, An identifier distribution of the NP virtual links in the sixth virtual link number array is equalized; the sixth virtual link number array is a sixth virtual link number between the current communication device and the another communication device Array
  • the receiving unit 93 is further configured to receive a fourth extended instruction sent by the control system, where the fourth extended instruction is used to instruct the communications device to extend a length of the current virtual link number array according to a preset spreading factor;
  • the array obtaining unit 91 is configured to obtain an array of seventh virtual link numbers according to the fourth extended instruction and the fifth virtual link number array, after the receiving unit 93 receives the fourth extended instruction, An identifier distribution of the NP virtual links in the seventh virtual link number array is equalized; the seventh virtual link number array is a seventh virtual link number between the current communication device and the another communication device Array.
  • the array obtaining unit 91 is specifically configured to: when the service carried on the N virtual links has a service weight factor, according to the service weight factor and the virtual bearer of the service The product of the number of times of use of the link configures the distribution of the identifiers of the NP strip virtual links to obtain the fifth virtual link number array; the frequency appearing in the array of pseudo link numbers.
  • the above communication device is configured to implement service flow balancing on each virtual link when transmitting a service flow.
  • each functional unit is only an example.
  • the function allocation may be completed by different functional units according to requirements, such as configuration requirements of the corresponding hardware or convenience of implementation of the software, that is, the internal structure of the communication device is divided into different functional units.
  • the corresponding functional units in this embodiment may be implemented by corresponding hardware, or may be executed by corresponding hardware to execute corresponding software.
  • the foregoing array obtaining unit may be capable of executing a corresponding computer program.
  • the foregoing receiving unit may be hardware having a function of executing the foregoing receiving unit, such as a receiver, or may be a general processing capable of executing a corresponding computer program to perform the foregoing functions. Or other hardware devices; (The various descriptions provided in this specification apply the above described principles).
  • modules in the apparatus in the embodiments may be distributed in the apparatus of the embodiment as described in the embodiments, or may be correspondingly changed in one or more apparatuses different from the embodiment.
  • the modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明提供一种实现负载均衡的方法及设备,其中,当第一节点负载过重时,选择第一节点和第二节点之间的多条虚拟链路将业务流的处理交给第二节点完成,可以使用本发明的实现负载均衡的方法在多条虚拟链路上进行有效的负载均衡,如考虑扩展因子和业务权重因子的实现有效的负载均衡。实现负载均衡的方法主要负责处理第一节点在链路增加和删除时对虚拟链路承载的业务进行负载均衡,做到增加时使用新的虚拟链路去负荷分担当前负载最重的链路,删除链路时选择负载最轻的链路去承载被删除链路承载的业务,更重要的做到在增加和删除虚拟链路时最大程度不影响原来的业务流。特别地,使用可扩展虚拟链路和业务权重因子进行基于业务的最优负载均衡。

Description

实现负载均衡的方法及设备 技术领域 本发明实施例涉及通信技术, 尤其涉及一种实现负载均衡的方法及设 备。 背景技术
在无线网络中, 信令和数据在传输过程中对时延和可靠性要求极高, 多数信息传输链路(如核心网和控制器、 控制器和基站等)在一般场景下 都配置成多条负载均衡的传输链路, 提升信息传输的可靠性, 防止某条链 路负载过重导致业务中断。
实现负载均衡的算法主要包括: 轮转法、 哈希散列法、 最少连接法、 最快响应法、 最低缺失法和加权法、 随机均衡算法等。
上述算法能解决多数网络环境负载均衡场景的需求, 这些算法与应用 较为相关, 且复杂度在 O(logn)到 O(n)区间内。 如最少连接法就是针对服 务器和客户端的 TCP连接次数做一些负载均衡, 进而选择连接次数少的 服务器为客户端服务。 上述算法对链路本身增加和删除的场景考虑得不是 特别多, 且链路状况发生变化时对业务的影响一般是不确定的。
目前, 当网络环境因为一些原因发生变化, 如链路丟失、 链路断开、 控制路径增加链路、 控制路径删除链路, 在这样的一些场景发生的时候, 链路承载的业务流也会在链路的选择上发生改变, 如被删除的链路不能再 使用后如何寻找新的链路, 新增的链路如何高效去分担原来链路的大流量 负载。 当删除和增加链路时, 如何保证在链路流量层面上达到真正的负 载均衡成为当前需要解决的技术问题。 发明内容
有鉴于此,本发明实施例提供一种实现负载均衡的方法及设备, 用于解 决现有技术中删除链路和增加链路时链路流量层面上难以实现的负载均 衡问题。 第一方面, 本发明实施例提供一种实现负载均衡的方法, 包括: 第一节点获取当前所述第一节点和第二节点之间的虚拟链路号数组, 且所述虚拟链路号数组中的每一虚拟链路的标识所分布的位置釆用所述 虚拟链路号数组的索引值表示, 所述索引值唯一;
所述第一节点根据哈希算法获取需要发送所述第二节点的业务流对 应的散列值, 在所述虚拟链路号数组中查找与散列值相同的索引值所对应 的虚拟链路标识, 釆用与所述虚拟链路标识对应的虚拟链路承载所述业务 流。
第二方面, 本发明实施例提供一种通信设备, 包括: 处理器和存储器; 所述处理器, 用于获取当前通信设备和另一通信设备之间的虚拟链路 号数组, 所述虚拟链路号数组中的每一虚拟链路标识所分布的位置釆用所 述虚拟链路号数组的索引表示, 所述索引值唯一;
所述存储器, 用于存储所述处理器获取的当前的虚拟链路号数组; 所述处理器, 还用于根据哈希算法获取需要发送所述另一通信设备的 业务流对应的散列值, 在所述存储器中存储的当前的虚拟链路号数组中查 找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述虚拟链路标 识对应的虚拟链路承载所述业务流。
第三方面, 本发明实施例提供一种通信设备, 包括:
数组获取单元, 用于获取当前通信设备和另一通信设备之间的虚拟链 路号数组, 所述虚拟链路号数组中的每一虚拟链路标识所分布的位置釆用 所述虚拟链路号数组的索引表示, 所述索引值唯一;
虚拟链路选取单元, 用于根据哈希算法获取需要发送所述另一通信设 备的业务流对应的散列值, 在所述数组获取单元所获取的当前的虚拟链路 号数组中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述 虚拟链路标识对应的虚拟链路承载所述业务流。
由上述技术方案可知, 本发明实施例的实现负载均衡的方法及设备, 通过第一节点先获取当前第一节点和第二节点之间的虚拟链路号数组, 进 而根据哈希算法获取业务流的散列值, 以使与散列值一致的索引值对应的 虚拟链路承载业务流, 由此实现第一节点和第二节点之间的每一虚拟链路 上承载的业务流均衡, 同时解决了现有技术中删除链路和增加链路时链路 流量层面上难以实现负载均衡的问题。 附图说明
为了更清楚地说明本发明的技术方案, 下面将对实施例中所需要使用的 附图作一简单地介绍, 显而易见地: 下面附图只是本发明的一些实施例的附 图, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可 以根据这些附图获得同样能实现本发明技术方案的其它附图。
图 1A为发明实施例中节点的场景图;
图 1 B为本发明一实施例提供的实现负载均衡的方法的流程示意图; 图 2为本发明另一实施例提供的实现负载均衡的方法的流程示意图; 图 3为本发明另一实施例提供的实现负载均衡的方法的流程示意图; 图 4为本发明另一实施例提供的实现负载均衡的方法的流程示意图; 图 5为本发明另一实施例提供的实现负载均衡的方法的流程示意图; 图 6为本发明另一实施例提供的实现负载均衡的方法的流程示意图; 图 7为本发明另一实施例提供的实现负载均衡的方法的流程示意图; 图 8为本发明一实施例提供的通信设备的结构示意图;
图 9为本发明另一实施例提供的通信设备的结构示意图。 具体实施方式 为使本发明的目的、 技术方案和优点更加清楚, 下面将结合本发明实 施例中的附图, 对本发明的技术方案进行清楚、 完整地描述。 显然, 下述 的各个实施例都只是本发明一部分的实施例。 基于本发明下述的各个实施 例, 本领域普通技术人员即使没有作出创造性劳动, 也可以通过等效变换 部分甚至全部的技术特征, 而获得能够解决本发明技术问题, 实现本发明 技术效果的其它实施例, 而这些变换而来的各个实施例显然并不脱离本发 明所公开的范围。
当前, 在实现负载均衡的方法中所使用的算法包括: 轮转法、 哈希散 列法、 最少连接数均衡算法、 最快响应法、 最低缺失法、 加权法和随机均 衡算法等。 该些算法能解决多数网络环境负载均衡场景的需求, 这些算法 与应用较为相关, 且复杂度在 O(logn)到 O(n)区间内。 如最少连接数均衡 算法就是针对服务器和客户端的 TCP连接次数做一些负载均衡, 对链路 本身增加和删除的场景考虑得不是特别多, 且链路状况变化时对业务的影 响一般是不确定的。
此外, 在实际应用中, 客户端的每一次服务请求在服务器停留的时间 可能会有较大的差异, 随着工作时间的延伸, 如果釆用简单的轮询或随机 均衡算法, 每一台服务器上的连接进程数目可能会产生极大的不同, 这样 实际上并没有达到真正的负载均衡。
以下简单介绍现有技术中的最少连接数均衡算法(Least Connection Scheduling):
最少连接数均衡算法对内部中需负载的每一台服务器都有一个数据 记录,记录当前该服务器正在处理的连接数量, 当有新的服务连接请求时, 将把当前请求分配给连接数最少的服务器, 使均衡更加符合实际情况, 负 载更力口均衡。
最少连接数均衡算法是一种动态调度算法, 它通过服务器当前所活跃 的连接数来估计服务器的负载情况。 调度器需要记录各个服务器已建立连 接的数目, 当一个请求被调度到某台服务器, 其连接数加一;当连接中止或 超时, 其连接数减一。
最少连接数均衡算法适合长时处理的请求服务, 如 FTP等应用。
当各个服务器有相同的处理性能时, 最少连接数均衡算法能把负载变 化大的请求分布平滑到各个服务器上, 所有处理时间比较长的请求不可能 被发送到同一台服务器上。 但是, 当各个服务器的处理能力不同时, 该算 法并不理想, 因为 TCP连接处理请求后会进入 TIME_WAIT状态, TCP 的 TIME_WAIT—般为 2分钟, 此时连接还占用服务器的资源, 所以会出 现这样情形,性能高的服务器已处理所收到的连接,连接处于 TIME_WAIT 状态, 而性能低的服务器已经忙于处理所收到的连接, 还不断地收到新的 连接请求。
最少连接数均衡算法虽然比轮转法优, 但是该最少连接数均衡算法是 根据目标服务器的负载程度在链路上进行负载均衡, 最实际链路增加和删 除的场景没有考虑, 即使可以根据服务器的负载状态进行连接数多少的均 衡, 实际上难以在链路流量层面上达到真正的负载均衡。 鉴于上述, 本发明实施例中提供一种实现负载均衡的方法, 用以在网 络中虚拟链路增加和删除时, 实现各虚拟链路的负载均衡。
为更清晰描述本方法, 以下简单介绍物理链路和虚拟链路的概念。 物理链路为两个或多个节点间的实际链路个数, 虚拟链路则是一条物 理链路中抽象出来的多条链路, 多条虚拟链路可以对应同一条物理链路。
本发明实施例中提及的可扩展虚拟链路是指在负载均衡算法中, 可以 根据实际需要将存放虚拟链路标识的数组空间按 2n ( n>0 )的倍数进行放 大, 以实现业务流在根据哈希算法的结果在数组上选择虚拟链路标识时更 加均衡的目的。
如图 1A所示, 两个节点之间有 8条物理链路, 物理链路承载的业务 虚拟链路可以为 8n条 (n大于等于 1 ), 为方便描述第一节点和第二节点之 间虚拟链路的负载如何均衡, 这里假设 n等于 1 , 既物理链路的数量与虚 拟链路的数量相等。
实施例一
图 1A示出了本发明一实施例提供的控制系统的部分结构示意图, 图 1 B 示出了本发明一实施例提供的实现负载均衡的方法的流程示意图,结合图 1A 和图 1 B所示, 本实施例中的实现负载均衡的方法如下所述。
101、 第一节点获取当前所述第一节点和第二节点之间的虚拟链路号 数组, 且所述虚拟链路号数组中的每一虚拟链路的标识所分布的位置釆用 所述虚拟链路号数组的索引值表示, 所述索引值唯一。
结合下述的表一来说, 虚拟链路号数组包括虚拟链路的标识和索引 值, 其中索引值表示所述虚拟链路的标识所在的位置。 其中, 虚拟链路的 标识在虚拟链路号数组中分布均衡, 由此, 可以实现各虚拟链路上承载的 业务流均衡。
在虚拟链路号数组的长度为 8时, 索引值釆用阿拉伯数字 0~7表示。 此外, 虚拟链路标识釆用 ID n表示, 其中 n取大于 0的整数, 如下 各种表格中的虚拟链路标识: ID 1、 ID 2、 ID 3等。
需要说明的是, 虚拟链路号数组的初始状态中索引值所表示的位置中 的内容(如表一中的 "R" ) 为无效的数值。
102、 第一节点根据哈希算法获取需要发送所述第二节点的业务流对 应的散列值即模值, 在所述虚拟链路号数组中查找与散列值相同的索引值 所对应的虚拟链路标识, 釆用与所述虚拟链路标识对应的虚拟链路承载所 述业务流。
举例来说, 第一节点可根据业务流中特定字段的值(如目的 IP ) , 结 合哈希算法获取需要发送至第二节点的业务流所对应的散列值。
又举例来说, 某一业务流可以根据哈希算法如 (目的 IP ) %8得到模 值, 进而可在当前的虚拟链路号数组中查找与模值相同的索引值所对应的 虚拟链路的标识, 釆用与虚拟链路的标识对应的虚拟链路承载所述业务 流。
结合下述的表一来说, 针对第二虚拟链路号数组 01 , 若某一业务流 根据哈希算法得到模值 2 , 则与模值 2对应的索引值 2所对应的虚拟链路 标识为 ID 1 , 进而釆用 ID 1的虚拟链路承载上述的业务流。
由上述实施例可知, 本实施例的实现负载均衡的方法, 通过第一节点 先获取当前第一节点和第二节点之间的虚拟链路号数组, 进而根据哈希算 法获取业务流的散列值, 以使与散列值一致的索引值对应的虚拟链路承载 业务流, 由此实现第一节点和第二节点之间的每一虚拟链路上承载的业务 流均衡, 同时解决了现有技术中删除链路和增加链路时链路流量层面上难 以实现负载均衡的问题。
表一
Figure imgf000008_0001
实施例二
在图 1 B所示的实施例的基础上, 步骤 101 中的 "所述第一节点获取 当前所述第一节点和第二节点之间的虚拟链路号数组" , 可包括如下的子 步骤, 如图 2所示。
101 1、 若第一节点和所述第二节点之间存在 N条虚拟链路, 则根据 初始化的虚拟链路号数组(即初始状态的虚拟链路号数组)获取第一虚拟 链路号数组, 所述第一虚拟链路号数组中 N条虚拟链路的标识分布均衡; 所述第一虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组; 其中, N为大于等于 1的正整数。
结合上述的表一来说, 若第一节点和第二节点之间存在一条虚拟链路 (如 ID 1 ) , 则根据初始化的虚拟链路号数组获取第一虚拟链路号数组, 如表一中的第一虚拟链路号数组。
结合下述的表三来说, 若第一节点和第二节点之间存在八条虚拟链路
(如 ID1 D8 ) , 则根据初始化的虚拟链路号数组获取第一虚拟链路号数 组, 如表三中的第一虚拟链路号数组。
由于第一虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组, 相应地, 上述的步骤 102可为如下内容:
第一节点根据哈希算法获取需要发送所述第二节点的业务流对应的 散列值即模值, 在所述第一虚拟链路号数组中查找与散列值相同的索引值 所对应的虚拟链路的标识, 釆用与所述虚拟链路的标识对应的虚拟链路承 载所述业务流。
由此, 本实施例的实现负载均衡的方法能够实现第一节点和第二节点 之间的每一虚拟链路上承载的业务流均衡, 同时解决了现有技术中删除链 路和增加链路时链路流量层面上难以实现负载均衡的问题。
可以理解的是, 在图 1A中, 当第一节点负载过重时, 选择第一节点 和第二节点之间的多条虚拟链路将业务流的处理交给第二节点完成, 可以 使用上述实现负载均衡的方法在多条虚拟链路上进行有效的负载均衡。
为更清楚描述业务变化和虚拟链路变化的关系, 假设初始时第一节点 配置了两条到第二节点的虚拟链路,为 Linkl (虚拟链路 ID1 )和1_^1<2 (虚 拟链路 ID2 ) , 业务运行起来后, 第一节点根据需要进行虚拟链路的增加 和删除, 此时本实施例中的实现负载均衡的方法负责处理第一节点在虚拟 链路增加和虚拟链路删除时对虚拟链路承载的业务流进行负载均衡, 做到 增加虚拟链路时使用新的虚拟链路去分担当前负载最重的虚拟链路, 删除 虚拟链路时选择当前负载最轻的链路去承载被删除的虚拟链路承载的业 务流。特别地,上述方法在增加和删除虚拟链路时很少影响原来的业务流。 如下的图 3至图 7中各实施例的描述。
实施例三
在图 2所示的实施例的基础上, 步骤 101 1 中的 "根据初始化的虚拟 链路号数组和增加的 M条虚拟链路的标识获取第一虚拟链路号数组"的步 骤之后, 上述的实现负载均衡的方法还可包括如图 3所示的步骤 1012;
1012、若所述第一节点确定接收到所述第一节点所在的控制系统发送 的增加 M条虚拟链路的第一指令,
则根据所述第一虚拟链路号数组和增加的 M条虚拟链路的标识获取 第二虚拟链路号数组, 所述第二虚拟链路号数组中 N+M条虚拟链路的标 识分布均衡;
所述第二虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组; 其中, M为大于等于 1的正整数。
可以理解的是, 在实际应用中, 虚拟链路的变化可以是动态的, 如第 一节点根据接收的控制系统的第一指令可增加一条或多条的虚拟链路, 或 者根据接收的控制系统的第二指令可删除一条或者多条的虚拟链路。 为 此, 在步骤 1012中举例说明的是, 在当前的两个节点之间增加 M条虚拟 链路的场景。
结合上述的表一来说, 若第一节点和第二节点之间有一条虚拟链路, 如 ID1 ,则在第一节点和第二节点之间再增加两条虚拟链路(即 N = 1 , M=2 如 ID5、 ID6 ) , 此时, 根据第一虚拟链路号数组获取第二虚拟链路号数 组 02。
另外, 如下述的表二中, 增加的 1条或多条虚拟链路之后, 得到的第 二虚拟链路号数组。
若 M=7, 则可以理解的是, 在第一节点和第二节点之间增加七条虚拟 链路, 此时, 原索引值 0~6对应的 ID1上承载的业务由当前的 ID2 D8 均衡分担。 如表二中的最后一行的显示。
表二 虛拟链路号数组中
的索引值
虛拟链路号数组中 初始化的虛拟链路号数組 的初始状态
第一节点和第二节点
之间具有 条虚拟链路 第一虚拟链路号数组 (虛拟链路的 为
第二虛拟链路号数组 第二虛拟链路号数组 第二虚拟链路号数组 第二虛拟链路号数组 第二虛拟链路号数组 第二虛拟链路号数组 第二虛拟链路号数组 举例来说, 根据所述第一虚拟链路号数组获取第二虚拟链路号数组的 步骤, 可包括:
查找第一虚拟链路号数组中使用次数较多的 Q条虚拟链路的标识,釆 用增加的 M条虚拟链路的标识分别替换所述使用次数较多的 Q条虚拟链 路的标识, 得到所述第二虚拟链路号数组;
其中, 所述使用次数为所述虚拟链路的标识在所述第一虚拟链路号数 组中出现的频率,例如表二中的第二虚拟链路号数组 01 ~07任一数组中虚 拟链路的标识出现的频率; Q为大于零且小于等于 M的正整数。
也就是说, 上述第一节点根据所述第一虚拟链路号数组中各虚拟链路 的使用次数, 和所述 M条虚拟链路的标识配置所述 N+M条虚拟链路标识 的分布, 获得所述第二虚拟链路号数组。
在本实施例中, 当增加一条虚拟链路时, 第一节点可查找当前负载最 重的虚拟链路, 让新增的虚拟链路去分担承载最重的虚拟链路上的业务 流。 由此, 对原有的业务的影响非常小。
在实际应用中, 虚拟链路可是在动态增加和动态删除的, 本实施例中 仅以动态增加为例进行说明, 如表二中, 从 1条增加到 8条, 业务可根据 某种哈希算法 (如目 IP%8 ) 直接选择对应的虚拟链路, 如当前虚拟链路 为 5条(对应表二第 7行) , 则模值 2对应的虚拟链路的标识为 ID2; 模 值 0对应的虚拟链路的标识为 ID5,模值 1对应的虚拟链路的标识为 ID4, 模值为 2时选择 ID2的虚拟链路承载业务流,模值为 7时选择 ID1的虚拟 链路承载业务流。 由上表二可以看出, 每增加一条链路, 对其他业务影响非常小, 如在 增加虚拟链路如 ID8时,只有负载最重的虚拟链路 ID1对应的位置使用新 增虚拟链路 ID8进行分担, 其他业务选择的虚拟链路均不发生变化。
此外, 由于第二虚拟链路号数组为当前所述第一节点和第二节点之间 的虚拟链路号数组, 相应地, 上述的步骤 102可为如下内容:
第一节点根据哈希算法获取需要发送所述第二节点的业务流对应的 散列值即模值, 在所述第二虚拟链路号数组中查找与散列值相同的索引值 所对应的虚拟链路标识, 釆用与所述虚拟链路的标识对应的虚拟链路承载 所述业务流。
由上, 可以实现实时获取当前第一节点和第二节点之间的虚拟链路号 数组(如上的第二虚拟链路号数组 01 ~07 ) , 进而在当前的虚拟链路号数 组中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与虚拟链路 标识对应的虚拟链路承载业务流。
实施例四
在图 3所示的实施例的基础上, 步骤 101 1 a中的 "根据所述第一虚拟 链路号数组和增加的 M条虚拟链路的标识获取第二虚拟链路号数组"的步 骤之后, 上述的实现负载均衡的方法还可包括如图 4所示的步骤 1013;
1013、若所述第一节点确定接收到所述控制系统发送的包括扩展因子 的第一扩展指令, 所述第一扩展指令用于指示所述第一节点根据所述扩展 因子扩展当前的虚拟链路号数组的长度,
则根据所述第一扩展指令和所述第二虚拟链路号数组获取第三虚拟 链路号数组, 所述第三虚拟链路号数组中 N+M条虚拟链路的标识分布均 衡;
所述第三虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组。
结合上述的表一来说, 如果扩展因子可为 2 , 则根据第一扩展指令, 将当前的虚拟链路号数组 (如第二虚拟链路号数组) 的长度由 8扩展为 16, 此时, 原第二虚拟链路号数组中的各虚拟链路的标识需要重新分布在 长度为 16的虚拟链路号数组中,即 N+M条虚拟链路标识重新分布在长度 为 16的虚拟链路号数组。 也就是说, 根据第一扩展指令和第二虚拟链路 号数组获取第三虚拟链路号数组, 如上述表一中的第三虚拟链路号数组。 相应地, 长度为 16的虚拟链路号数组的索引值也由 0~15表示。 由于第三虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组, 相应地, 上述的步骤 102可为如下内容:
第一节点根据哈希算法获取需要发送所述第二节点的业务流对应的 散列值即模值, 在所述第三虚拟链路号数组中查找与散列值相同的索引值 所对应的虚拟链路的标识, 釆用与所述虚拟链路的标识对应的虚拟链路承 载所述业务流。
由上, 可以实现实时获取当前第一节点和第二节点之间的虚拟链路号 数组(如上的第三虚拟链路号数组) , 进而在当前的虚拟链路号数组中查 找与散列值相同的索引值所对应的虚拟链路标识, 釆用与虚拟链路标识对 应的虚拟链路承载业务流。
在另一种可选的应用场景中,扩展因子可为节点中默认 /预设的扩展因 子, 此时, 上述的步骤 1013可为如下的图中未示出的步骤 1013'。
1013'、 若所述第一节点确定接收到所述控制系统发送的第二扩展指 令, 所述第二扩展指令用于指示所述第一节点根据预设的扩展因子扩展当 前的虚拟链路号数组的长度,
则根据所述第二扩展指令和所述第二虚拟链路号数组获取第四虚拟 链路号数组, 所述第四虚拟链路号数组中 N+M条虚拟链路的标识分布均 衡;
所述第四虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组。
举例来说, 如果默认 /预设的扩展因子为 2 , 则根据第二扩展指令, 虚 拟链路号数组的长度由 8扩展为 16; 如果默认的扩展因子为 4, 则根据第 二扩展指令, 虚拟链路号数组的长度由 8扩展为 32。 此时, 原第二虚拟 链路号数组中的各虚拟链路的标识可重新分布在长度为 16/32的虚拟链路 号数组中。
由于第四虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组, 相应地, 上述的步骤 102可为如下内容:
第一节点根据哈希算法获取需要发送所述第二节点的业务流对应的 散列值即模值, 在所述第四虚拟链路号数组中查找与散列值相同的索引值 所对应的虚拟链路的标识, 釆用与所述虚拟链路的标识对应的虚拟链路承 载所述业务流。
由上, 可以实现实时获取当前第一节点和第二节点之间的虚拟链路号 数组(如上的第四虚拟链路号数组) , 进而在当前的虚拟链路号数组中查 找与散列值相同的索引值所对应的虚拟链路标识, 釆用与虚拟链路标识对 应的虚拟链路承载业务流。
实施例五
通常, 业务权重因子记录的是链路上所承载的业务的权重 (一般,一条 虚拟链路上只承载一种业务),在本实施例中可根据业务权重因子进行负载 均衡。
在本发明实施例中, 虚拟链路的使用次数用于加速第一节点查找负载 最重的虚拟链路的查找速度, 根据索引值一次找到某条虚拟链路的使用次 数, 供虚拟链路增加和删除的动态变化场景使用。
业务权重因子用于配合基于业务的负载均衡方法加速查找。 举例来 说, 当增加虚拟链路时, 需要及时分担当前的虚拟链路号数组中承担业务 权重因子大的业务的虚拟链路上的业务流; 当删除虚拟链路时, 选择业务 权重因子小的虚拟链路去承担被删除虚拟链路上的原有业务, 避免对业务 因子大的虚拟链路上所承载的业务造成影响。
在图 3所示的实施例的基础上, 步骤 1012中的 "根据所述第一虚拟 链路号数组和增加的 M条虚拟链路的标识获取第二虚拟链路号数组"的步 骤包括如下的图中未示出的步骤 a01。
a01、 若所述 N条虚拟链路上承载的业务具有业务权重因子, 则根据 所述业务权重因子与第一虚拟链路号数组中承载所述业务的虚拟链路的 使用次数的乘积配置 N+M条虚拟链路的标识的分布, 获得第二虚拟链路 号数组; 拟链路号数组中出现的频率。
也就是说, 上述的乘积越大, 表示上述虚拟链路的负载越重, 需要新 增加的虚拟链路分担部分的乘积大的虚拟链路上的负载。 或者, 在另一应用场景中, 若所述 N条虚拟链路上承载的业务具有业 务权重因子, 则可根据所述每条虚拟链路承载的业务权重因子均值与第一 虚拟链路号数组中每条虚拟链路使用次数的乘积得到该虚拟链路的权值 (权值越大表示该链路的负载越严重) , 进而根据所述虚拟链路的权值配 置所述 N+M条虚拟链路标识的分布, 以获得所述第二虚拟链路号数组; 链路号数组中出现的频率; 业务权重因子均值可为节点内所有业务权重因 子的平均值。
结合上述表一来说, 在第二虚拟链路号数组 01 中, ID2对应的虚拟 链路使用次数为 4, ID1对应的虚拟链路使用次数为 4。 在第二虚拟链路 号数组 02中, ID5对应的虚拟链路使用次数为 3, ID6对应的虚拟链路使 用次数为 2, ID1对应的虚拟链路使用次数为 3。
应了解的是,业务权重因子可为预设的数值,业务权重因子可以取 0~1 之间, 数字越大, 数字对应的业务则越重要。 或者, 业务权重因子可以取 1 ~10之间的数字, 数字越大, 则该数字对应的业务则越重要。
进一步地, 当增加虚拟链路时,业务权重因子大的业务如果过载严重, 会导致灾难性的后果, 由此需要及时分担某一个或多个虚拟链路上承载的 业务权重因子大的业务流。
如下述的表三中标识为 ID1的虚拟链路被第一节点删除时(表三的第 三行) , 相对于 ID2来说, 标识为 ID3的虚拟链路所承载的业务权重因子 大, 故, 无法釆用 ID3的虚拟链路用来承载其他业务, 此时可以不选择标 识为 ID3的虚拟链路去填充被删除的标识为 ID1的虚拟链路在当前的虚拟 链路号数组中的位置。 在表三的第三行中, 釆用标识为 ID2的虚拟链路承 载原标识为 ID1的虚拟链路承载的业务流, 此时同样能达到负载均衡的效 果。
由上, 可以实现实时获取当前第一节点和第二节点之间的虚拟链路号 数组(如上的第二虚拟链路号数组) , 进而在当前的虚拟链路号数组中查 找与散列值相同的索引值所对应的虚拟链路标识, 釆用与虚拟链路标识对 应的虚拟链路承载业务流。
在另一种可选的应用场景中, 上述步骤 1012中的 "根据所述第一扩 展指令和所述第二虚拟链路号数组获取第三虚拟链路号数组" 的步骤可包 括如下的图中未示出的子步骤 b01:
b01、 若所述 N+M条虚拟链路上承载的业务具有预设的业务权重因 子, 则根据所述业务权重因子与承载该业务的虚拟链路的使用次数的乘 积、 所述第一扩展指令配置所述 N+M条虚拟链路标识的分布, 获得所述 第三虚拟链路号数组; 链路号数组中出现的频率。
也就是说, 若所述 N+M条虚拟链路上承载的业务具有预设的业务权 重因子, 则根据第二虚拟链路号数组中每一虚拟链路的权值和第一扩展指 令配置所述 N+M条虚拟链路标识的分布,获得所述第三虚拟链路号数组。
该处虚拟链路的权值为该虚拟链路上承载的业务的业务权重因子与 承载该业务的虚拟链路的使用次数的乘积。
通常业务流在选择虚拟链路时, 都利用某个字段(如目的 IP )加上一 个哈希算法(如最简单的取模哈希算法)得到模值, 与模值相同的索引值 进行虚拟链路的选择。
实施例六
在图 2所示的实施例的基础上, 步骤 101 1 中的 "根据初始化的虚拟 链路号数组获取第一虚拟链路号数组" 的步骤之后, 上述的实现负载均衡 的方法还可包括如图 5所示的步骤 1012";
1012"、 若所述第一节点确定接收到所述第一节点所在的控制系统发 送的删除 P条虚拟链路的第二指令,
则根据所述第一虚拟链路号数组和删除的 P条虚拟链路的标识获取 第五虚拟链路号数组,所述第五虚拟链路号数组中 N-P条虚拟链路的标识 分布均衡;
所述第五虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组; 其中, P小于 N的正整数。
可以理解的是, 在实际应用中, 虚拟链路的变化可以是动态的, 如可 以增加一条或多条的虚拟链路, 或者可以删除一条或者多条的虚拟链路。 为此, 在步骤 1012"中举例说明的是, 在当前的两个节点之间删除 P条虚 拟链路的场景。
在实际应用中, 上述 1012"中的根据所述第一虚拟链路号数组和删除 P条虚拟链路的标识获取第五虚拟链路号数组的步骤, 可具体包括:
查找第一虚拟链路号数组中使用次数较少的 R条虚拟链路的标识,釆 用 R条虚拟链路的标识分别均衡替换所述删除的 P条虚拟链路的标识, 得到所述第五虚拟链路号数组;
其中, 所述使用次数为所述虚拟链路的标识在所述第一虚拟链路号数 组中出现的频率; R为大于零且小于等于 P的正整数。
结合表三来说, 若第一节点和第二节点之间有八条虚拟链路, 如 ID1~ID8。 若 P=1 , 则可以理解的是, 在第一节点和第二节点之间删除一 条虚拟链路, 如删除虚拟链路 ID1 , 此时, 可将 ID1上承载的业务由 ID2 的虚拟链路承载, 如得到的第五虚拟链路号数组 01。
当然, 若 P=2, 则可以理解的是, 在第一节点和第二节点之间删除两 条虚拟链路, 如删除虚拟链路 ID1、 ID2, 此时, 可将 ID1上承载的业务 由 ID3的虚拟链路承载, 可将 ID2上承载的业务由 ID4的虚拟链路承载, 如得到的第五虚拟链路号数组 02。
表三
Figure imgf000017_0001
每删除一条虚拟链路, 对其他业务无影响, 不会发生大范围业务链路 的变化, 如在删除链路 ID1时, 只有虚拟链路 ID1对应的位置被负载最轻 的虚拟链路 ID2替换, 但其他业务的虚拟链路都不会做任何调整。
也就是说, 当删除一条虚拟链路时, 发现当前负载最轻的虚拟链路, 去承担被删除虚拟链路的业务传输任务。 上述方法对原来业务的影响程度 非常小。
相应地, 由于第五虚拟链路号数组为当前所述第一节点和第二节点之 间的虚拟链路号数组, 相应地, 上述的步骤 102可为如下内容:
第一节点根据哈希算法获取需要发送所述第二节点的业务流对应的 散列值即模值, 在所述第五虚拟链路号数组中查找与散列值相同的索引值 所对应的虚拟链路的标识, 釆用与所述虚拟链路的标识对应的虚拟链路承 载所述业务流。
由上, 可以实现实时获取当前第一节点和第二节点之间的虚拟链路号 数组(如上的第五虚拟链路号数组) , 进而在当前的虚拟链路号数组中查 找与散列值相同的索引值所对应的虚拟链路标识, 釆用与虚拟链路标识对 应的虚拟链路承载业务流。
实施例七
在图 5所示的实施例的基础上, 步骤 1012中的 "根据所述第一虚拟 链路号数组和删除 P条虚拟链路的标识获取第五虚拟链路号数组"的步骤 之后, 上述的实现负载均衡的方法还可包括如图 6所示的步骤 1013";
1013"、 若所述第一节点确定接收到所述控制系统发送的包括扩展因 子的第三扩展指令, 所述第三扩展指令用于指示所述第一节点根据所述扩 展因子扩展当前虚拟链路号数组的长度,
则根据所述第三扩展指令和所述第五虚拟链路号数组获取第六虚拟 链路号数组, 所述第六虚拟链路号数组中 N-P条虚拟链路的标识分布均 衡;
所述第六虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组。
举例来说, 如果扩展因子为 6, 则根据第三扩展指令, 虚拟链路号数 组的长度由 8扩展为 48, 此时, 原第六虚拟链路号数组中的各虚拟链路 的标识需要重新分布在长度为 48的虚拟链路号数组中; 如果扩展因为 8, 则根据第三扩展指令, 虚拟链路号数组的长度由 8扩展为 64, 此时, 原 第六虚拟链路号数组中的各虚拟链路标识需要重新分布在长度为 64的虚 拟链路号数组中。 由于第六虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组, 相应地, 上述的步骤 102可为如下内容:
第一节点根据哈希算法获取需要发送所述第二节点的业务流对应的 散列值即模值, 在所述第六虚拟链路号数组中查找与散列值相同的索引值 所对应的虚拟链路的标识, 釆用与虚拟链路的标识对应的虚拟链路承载所 述业务流。
由上, 可以实现实时获取当前第一节点和第二节点之间的虚拟链路号 数组(如上的第六虚拟链路号数组) , 进而在当前的虚拟链路号数组中查 找与散列值相同的索引值所对应的虚拟链路标识, 釆用与虚拟链路标识对 应的虚拟链路承载业务流。
在另一可选的应用场景中, 上述的扩展指令可以不包括扩展因子, 此 时扩展因子可为默认值, 具体如下:
1013'、 若所述第一节点确定接收到所述控制系统发送的第四扩展指 令, 所述第四扩展指令用于指示所述第一节点根据预设的扩展因子扩展当 前的虚拟链路号数组的长度,
则根据所述第四扩展指令和所述第五虚拟链路号数组获取第七虚拟 链路号数组, 所述第七虚拟链路号数组中 N-P条虚拟链路的标识分布均 衡;
所述第七虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组。
举例来说, 例如默认的扩展因子为 2 , 则根据第四扩展指令, 虚拟链 路号数组的长度由 8扩展为 16, 此时, 原第七虚拟链路号数组中的各虚 拟链路标识需要重新分布在长度为 16的虚拟链路号数组中。如下的表四。
表四 虛拟链路号数组中
的索引值
第一节点和第二节点之间具
有 条虛拟链路(虛拟链路的
第一虛拟链路号数组 为 至 ,删除 第五虛拟链路号数组 ,删除 第五虛拟链路号数组 ,删除 第五虛拟链路号数组 第一节点和第二节点之 第七虛拟链路号数组 间删除 条虛拟链路之 或者 后, 扩展因子为 第六虛拟链路号数组 扩展的虛拟链路号数组
中的索引值 实施例八
在另一可选的应用场景中, 上述步骤 1012中的 "根据所述第一虚拟 链路号数组和删除 P条虚拟链路的标识获取第五虚拟链路号数组的步骤" 可包括如下的图中未示出的步骤 S01。
S01、 若所述 N条虚拟链路上承载的业务具有业务权重因子, 则根据 所述业务权重因子与承载该业务的虚拟链路的使用次数的乘积配置所述 N-P条虚拟链路的标识的分布, 获得所述第五虚拟链路号数组; 链路号数组中出现的频率。
或者, 在其他实施例中, 若所述 N条虚拟链路上承载的业务具有业务 权重因子, 则获取所有业务权重因子的均值, 根据所述均值与承载该业务 的虚拟链路的使用次数的乘积 (乘积越大, 负载越重)配置所述 N-P条虚 拟链路的标识的分布, 获得所述第五虚拟链路号数组。
举例来说, 业务权重因子可以取 0~1之间, 数字越大, 数字对应的业 务则重要。
当然, 当删除虚拟链路时, 选择承载有业务权重因子小的业务的虚拟 链路去承担被删除的虚拟链路的原有业务, 避免对承载有业务权重因子大 的业务的虚拟链路造成影响。
在第三种可选的应用场景中, 上述步骤 1013'中的 "根据所述第四扩 展指令和所述第五虚拟链路号数组获取第七虚拟链路号数组" 的步骤, 包 括如下的图中未示出的步骤 q01:
q01、若所述 N-P条虚拟链路上承载的业务具有预设的业务权重因子, 则根据所述业务权重因子与承载该业务的虚拟链路的使用次数的乘积、 第 四扩展指令配置所述 N-P条虚拟链路的标识的分布,获得所述第七虚拟链 路号数组; 链路号数组中出现的频率。
可以理解的是, 在上述任一实施例中, 当增加一条虚拟链路时, 第一 节点可查找当前负载最重的虚拟链路, 让新增的虚拟链路去分担承载最终 的虚拟链路上的业务流。 当删除一条虚拟链路时, 发现当前负载最轻的虚 拟链路, 去承担被删除虚拟链路的业务传输任务。 上述方法的复杂度低, 可为 0(1 ), 进而在增加和删除链路的过程中, 对原来业务的影响非常小。
实施例九
图 7示出了本发明另一实施例提供的实现负载均衡的方法的流程示意 图, 结合图 7和表五所示, 本实施例中的实现负载均衡的方法如下所述。
701、 若所述第一节点和所述第二节点之间存在 N条虚拟链路, 则根 据初始化的虚拟链路号数组获取第一虚拟链路号数组, 所述第一虚拟链路 号数组中所述 N条虚拟链路标识分布均衡;
所述第一虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组; 其中, N为大于等于 1的正整数。
702、 若所述第一节点确定接收到所述第一节点所在的控制系统发送 的增加 M条虚拟链路的第一指令,
则根据所述第一虚拟链路号数组和增加的 M条虚拟链路的标识获取 第二虚拟链路号数组, 所述第二虚拟链路号数组中 N+M条虚拟链路的标 识分布均衡;
所述第二虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组; 其中, M为大于等于 1的正整数。
702'、 若所述第一节点确定接收到所述第一节点所在的控制系统发送 的删除 P条虚拟链路的第三指令,
则根据所述第二虚拟链路号数组和删除的 P条虚拟链路的标识获取 第八虚拟链路号数组, 所述第八虚拟链路号数组中 N+M-P条虚拟链路标 识分布均衡; 所述第八虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组。
703、 若所述第一节点确定接收到所述第一节点所在的控制系统发送 的删除 P条虚拟链路的第二指令,
则根据所述第一虚拟链路号数组和删除的 P条虚拟链路的标识获取 第五虚拟链路号数组,所述第五虚拟链路号数组中 N-P条虚拟链路的标识 分布均衡;
所述第五虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组; 其中, P小于 N的正整数。
703'、 若所述第一节点确定接收到所述第一节点所在的控制系统发送 的增加 M条虚拟链路的第四指令,
则根据所述第五虚拟链路号数组和增加的 M条虚拟链路的标识获取 第九虚拟链路号数组, 所述第九虚拟链路号数组中 N-P+M条虚拟链路标 识分布均衡;
所述第九虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组。
表五
Figure imgf000022_0001
表六 虛拟链路的
使用次数数组
业务权重因子
保存数组 举例来说, 初始时存放虚拟链路标识(如 R ) 的虚拟链路号数组中均 为无效值, 此时业务流选择的结果为无效值(此时, 无可用的虚拟链路), 通过上述步骤 101 1提供的方式增加一条虚拟链路后, 虚拟链路号数组中 所有的位置均为该虚拟链路的标识如 ID1 ;
在此之后, 若再增加一条新的虚拟链路 ID2后, 此时, 第一节点可查 找当前虚拟链路使用次数较多的 Q条的虚拟链路的标识, 釆用 Μ条虚拟 链路的标识替换使用次数较多的 Q条虚拟链路的标识的中的部分标识,直 到所有的虚拟链路标识在当前的虚拟链路号数组中的排列均勾, 达到负载 均衡的效果;
删除虚拟链路时与增加虚拟链路过程类似, 只是不断查找当前虚拟链 路使用次数较少的虚拟链路的标识, 并将使用次数较少的虚拟链路的标识 不断替换被删除的虚拟链路的标识, 直到所有的虚拟链路的标识在虚拟链 路号数组中的排列均匀, 达到负载均衡。
704、 第一节点根据哈希算法获取需要发送所述第二节点的业务流对 应的散列值即模值, 在当前的虚拟链路号数组中查找与散列值相同的索引 值所对应的虚拟链路标识, 釆用与虚拟链路标识对应的虚拟链路承载所述 业务流。
上述实施例中的实现负载均衡的方法可以在删除虚拟链路和增加虚 拟链路时不影响原来的业务, 只有在被删除或增加的虚拟链路标识对应的 虚拟链路上所承载的业务会受到影响, 在虚拟链路号数组中其他虚拟链路 标识对应的虚拟链路上所承载的业务不会有任何影响。
由上, 当网络虚拟链路状况发生变化时, 对虚拟链路变化范围内的其 他业务影响程度非常小, 负载分担效率高, 算法与业务耦合度低, 可扩展 性强, 可以解决众多领域的负载均衡设计。
在本实施例中,可扩展虚拟链路为业务流虚拟出 η条虚拟链路 (η为物 理链路的倍数),且同时使用表六中虚拟链路使用次数数组和业务权重因子 保存数组进行更优的负载均衡, 虚拟链路使用次数数组 (如表 2中第一虚 拟链路号数组, ID1的虚拟链路使用的次数这里为在表项空间中的统计数 值, 为 8)用于加速虚拟链路查找和选择, 虚拟链路标识的选择可以根据实 际需要, 如内存空间充裕, 可以选择较大的值, 这样哈希的散列值散列得 更加均匀, 表项空间中每一条虚拟链路被使用的概率更加均匀。
上述任一实施例中可扩展虚拟链路可以理解为就是利用数组空间保 存虚拟链路使用的次数, 虚拟链路被使用的次数越多, 承载在该虚拟链路 上的业务流比例也就越重。 如果对虚拟链路进行合理扩展, 得到的负载均 衡效果越均勾, 因为虚拟链路扩展得越多, 从概率论角度则知在实际物理 链路上负载越均衡。
上述方法可方便扩展, 虚拟链路查找的复杂度为 0(1 ), 除了很方便的 扩展虚拟链路外, 在虚拟链路增加和删除时还可以加入业务权重因子进行 最优的负载均衡。
实施例十
根据本发明实施例的另一方面, 本发明实施例还提供一种通信设备, 如图 8所述, 本实施例中的通信设备包括: 处理器 81和存储器 82;
其中, 所述处理器 81用于获取当前通信设备和另一通信设备之间的 虚拟链路号数组, 所述虚拟链路号数组中的每一虚拟链路标识所分布的位 置釆用所述虚拟链路号数组的索引表示, 所述索引值唯一;
所述存储器 82用于存储所述处理器获取的当前的虚拟链路号数组; 所述处理器 81还用于根据哈希算法获取需要发送所述另一通信设备 的业务流对应的散列值, 在所述存储器中存储的当前的虚拟链路号数组中 查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述虚拟链路 标识对应的虚拟链路承载所述业务流。
在一种可选的应用场景中, 处理器 81具体用于在所述通信设备和所 述另一通信设备之间存在 Ν条虚拟链路时,根据初始化的虚拟链路号数组 获取第一虚拟链路号数组,所述第一虚拟链路号数组中 Ν条虚拟链路的标 识分布均衡;
所述存储器 82用于存储当前所述通信设备和所述另一通信设备之间 的第一虚拟链路号数组; 其中, Ν为大于等于 1的正整数。
此时, 处理器 81还用于根据哈希算法获取需要发送所述另一通信设 备的业务流对应的散列值, 在所述存储器中存储的第一虚拟链路号数组中 查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述虚拟链路 标识对应的虚拟链路承载所述业务流。 在第二种可选的应用场景中, 所述通信设备还包括图中未示出的: 接 收器 83;
其中, 接收器 83用于接收所述通信设备所在的控制系统发送的增加 M条虚拟链路的第一指令;
所述处理器 81还用于在所述接收器 83接收所述第一指令之后,根据 所述第一虚拟链路号数组和增加的 M条虚拟链路的标识获取第二虚拟链 路号数组,所述第二虚拟链路号数组中 N+M条虚拟链路的标识均不均衡; 所述存储器 82用于存储当前所述通信设备和所述另一通信设备之间 的第二虚拟链路号数组; 其中, M为大于等于 1的正整数。
此时, 所述处理器 81还用于根据哈希算法获取需要发送所述另一通 信设备的业务流对应的散列值, 在所述存储器中存储的第二的虚拟链路号 数组中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述虚 拟链路标识对应的虚拟链路承载所述业务流。
在第三种可选的应用场景中, 通信设备还包括图中未示出的接收器 83;
其中, 所述接收器 83还用于接收所述控制系统发送的包括扩展因子 的第一扩展指令, 所述第一扩展指令用于指示所述通信设备根据所述扩展 因子扩展当前的虚拟链路号数组的长度;
所述处理器 81还用于在所述接收器 83接收所述第一扩展指令之后, 根据所述第一扩展指令和所述第二虚拟链路号数组获取第三虚拟链路号 数组, 所述第三虚拟链路号数组中 N+M条虚拟链路的标识分布均衡; 所述存储器 82用于存储当前所述通信设备和所述另一通信设备之间 的第三虚拟链路号数组;
此时, 所述处理器 81还用于根据哈希算法获取需要发送所述另一通 信设备的业务流对应的散列值, 在所述存储器中存储的第三的虚拟链路号 数组中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述虚 拟链路标识对应的虚拟链路承载所述业务流。
在第四种可选的应用场景中, 通信设备还包括图中未示出的接收器
83;
其中,所述接收器 83还用于接收所述控制系统发送的第二扩展指令, 所述第二扩展指令用于指示所述通信设备根据预设的扩展因子扩展当前 的虚拟链路号数组的长度;
所述处理器 81还用于在所述接收器 83接收所述第二扩展指令之后, 根据所述第二扩展指令和所述第二虚拟链路号数组获取第四虚拟链路号 数组, 所述第四虚拟链路号数组中 N+M条虚拟链路的标识分布均衡; 所述存储器 82用于存储当前所述通信设备和所述另一通信设备之间 的第四虚拟链路号数组。
此时, 所述处理器 81还用于根据哈希算法获取需要发送所述另一通 信设备的业务流对应的散列值, 在所述存储器 82中存储的第四虚拟链路 号数组中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述 虚拟链路标识对应的虚拟链路承载所述业务流。
在第五种可选的应用场景中, 所述处理器 81还用于在所述 N条虚拟 链路上承载的业务具有业务权重因子时, 根据所述业务权重因子与承载所 述业务的虚拟链路的使用次数的乘积、 第一虚拟链路号数组中每一虚拟链 路的使用次数配置 N+M条虚拟链路的标识的分布, 获得第二虚拟链路号 数组; 拟链路号数组中出现的频率。
在第六种可选的应用场景中, 所述通信设备还包括图中未示出的接收 器 83;
所述接收器 83用于接收所述通信设备所在的控制系统发送的删除 P 条虚拟链路的第二指令;
所述处理器 81用于在所述接收器 83接收到所述第二指令之后,根据 所述第一虚拟链路号数组和删除的 P条虚拟链路的标识获取第二虚拟链 路号数组, 所述第二虚拟链路号数组中 N-P条虚拟链路的标识分布均衡; 所述存储器 82用于存储当前所述通信设备和所述另一通信设备之间 的第五虚拟链路号数组; 其中, P为小于 N的正整数。
所述处理器 81还用于根据哈希算法获取需要发送所述另一通信设备 的业务流对应的散列值, 在所述存储器 82中存储的第五虚拟链路号数组 中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述虚拟链 路标识对应的虚拟链路承载所述业务流。
在第七种可选的应用场景中, 所述接收器 83还用于接收所述控制系 统发送的包括扩展因子的第三扩展指令, 所述第三扩展指令用于指示所述 通信设备根据所述扩展因子扩展当前的虚拟链路号数组的长度;
所述处理器 81用于在所述接收器 83接收所述第三扩展指令之后,根 据所述第三扩展指令和所述第五虚拟链路号数组获取第六虚拟链路号数 组, 所述第六虚拟链路号数组中 N-P条虚拟链路的标识分布均衡;
所述存储器 82用于存储当前所述通信设备和所述另一通信设备之间 的第六虚拟链路号数组;
此时, 所述处理器 81还用于根据哈希算法获取需要发送所述另一通 信设备的业务流对应的散列值, 在所述存储器 82中存储的第六的虚拟链 路号数组中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所 述虚拟链路标识对应的虚拟链路承载所述业务流。
或者,
所述接收器 83还用于接收所述控制系统发送的第四扩展指令, 所述 第四扩展指令用于指示所述通信设备根据预设的扩展因子扩展当前的虚 拟链路号数组的长度;
所述处理器 81用于在所述接收器 83接收所述第四扩展指令之后,根 据所述第四扩展指令和所述第五虚拟链路号数组获取第七虚拟链路号数 组, 所述第七虚拟链路号数组中 N-P条虚拟链路的标识分布均衡;
所述存储器 82用于存储当前所述通信设备和所述另一通信设备之间 的第七虚拟链路号数组。
此时, 所述处理器 81还用于根据哈希算法获取需要发送所述另一通 信设备的业务流对应的散列值, 在所述存储器 82中存储的第七的虚拟链 路号数组中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所 述虚拟链路标识对应的虚拟链路承载所述业务流。
在第八种可选的应用场景中, 所述处理器 81具体用于在所述 N条虚 拟链路上承载的业务具有业务权重因子时, 根据所述业务权重因子与承载 该业务的虚拟链路的使用次数的乘积配置所述 N-P条虚拟链路的标识的 分布, 获得所述第五虚拟链路号数组; 拟链路号数组中出现的频率。
实施例十一
根据本发明实施例的另一方面, 本发明实施例提供一种通信设备, 如 图 9所示, 本实施例的通信设备包括: 数组获取单元 91和虚拟链路选取 单元 92;
数组获取单元 91用于获取当前通信设备和另一通信设备之间的虚拟 链路号数组, 所述虚拟链路号数组中的每一虚拟链路标识所分布的位置釆 用所述虚拟链路号数组的索引表示, 所述索引值唯一;
虚拟链路选取单元 92用于根据哈希算法获取需要发送所述另一通信 设备的业务流对应的散列值, 在所述数组获取单元 91所获取的当前的虚 拟链路号数组中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用 与所述虚拟链路标识对应的虚拟链路承载所述业务流。
举例来说, 所述数组获取单元 91具体用于在所述通信设备和所述另 一通信设备之间存在 N条虚拟链路时,根据初始化的虚拟链路号数组获取 第一虚拟链路号数组,所述第一虚拟链路号数组中 N条虚拟链路的标识分 布均衡;
所述第一虚拟链路号数组为当前所述通信设备和另一通信设备之间 的虚拟链路号数组; 其中, N为大于等于 1的正整数。
在一种可选的实现场景中, 所述通信设备还包括图中未示出的接收单 元 93;
接收单元 93用于接收所述通信设备所在的控制系统发送的增加 M条 虚拟链路的第一指令;
所述数组获取单元 91还用于在所述接收单元 93接收所述第一指令之 后,根据所述第一虚拟链路号数组和增加的 M条虚拟链路的标识获取第二 虚拟链路号数组, 所述第二虚拟链路号数组中 N+M条虚拟链路的标识均 不均衡;
所述第二虚拟链路号数组为当前所述通信设备和另一通信设备之间 的第二虚拟链路号数组; 其中, M为大于等于 1的正整数。
在第二种可选的应用场景中, 上述接收单元 93还用于接收所述控制 系统发送的包括扩展因子的第一扩展指令, 所述第一扩展指令用于指示所 述通信设备根据所述扩展因子扩展当前的虚拟链路号数组的长度;
所述数组获取单元 91还用于在所述接收单元 93接收所述第一扩展指 令之后, 根据所述第一扩展指令和所述第二虚拟链路号数组获取第三虚拟 链路号数组, 所述第三虚拟链路号数组中 N+M条虚拟链路的标识分布均 衡;
所述第三虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第三虚拟链路号数组;
或者
所述接收单元 93还用于接收所述控制系统发送的第二扩展指令, 所 述第二扩展指令用于指示所述通信设备根据预设的扩展因子扩展当前的 虚拟链路号数组的长度;
所述数组获取单元 91还用于在所述接收单元 93接收所述第二扩展指 令之后, 根据所述第二扩展指令和所述第二虚拟链路号数组获取第四虚拟 链路号数组, 所述第四虚拟链路号数组中 N+M条虚拟链路的标识分布均 衡;
所述第四虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第四虚拟链路号数组。
在第三种可选的应用场景中, 所述数组获取单元 91还用于在所述 N 条虚拟链路上承载的业务具有业务权重因子时, 根据所述业务权重因子与 承载所述业务的虚拟链路的使用次数的乘积配置 N+M条虚拟链路的标识 的分布, 获得第二虚拟链路号数组; 拟链路号数组中出现的频率。
在第四种可选的应用场景中, 所述通信设备还包括图中未示出的接收 单元 93;
所述接收单元 93用于接收所述通信设备所在的控制系统发送的删除 P条虚拟链路的第二指令;
所述数组获取单元 91用于在所述接收单元 93接收到所述第二指令之 后,根据所述第一虚拟链路号数组和删除的 P条虚拟链路的标识获取第二 虚拟链路号数组,所述第二虚拟链路号数组中 N-P条虚拟链路的标识分布 均衡;
所述第五虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第五虚拟链路号数组; 其中, P为小于 N的正整数。
在第五种可选的应用场景中, 所述接收单元 93还用于接收所述控制 系统发送的包括扩展因子的第三扩展指令, 所述第三扩展指令用于指示所 述通信设备根据所述扩展因子扩展当前的虚拟链路号数组的长度;
所述数组获取单元 91用于在所述接收单元 93接收所述第三扩展指令 之后, 根据所述第三扩展指令和所述第五虚拟链路号数组获取第六虚拟链 路号数组, 所述第六虚拟链路号数组中 N-P条虚拟链路的标识分布均衡; 所述第六虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第六虚拟链路号数组;
或者,
所述接收单元 93还用于接收所述控制系统发送的第四扩展指令, 所 述第四扩展指令用于指示所述通信设备根据预设的扩展因子扩展当前的 虚拟链路号数组的长度;
所述数组获取单元 91用于在所述接收单元 93接收所述第四扩展指令 之后, 根据所述第四扩展指令和所述第五虚拟链路号数组获取第七虚拟链 路号数组, 所述第七虚拟链路号数组中 N-P条虚拟链路的标识分布均衡; 所述第七虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第七虚拟链路号数组。
在第六种可选的应用场景中, 所述数组获取单元 91具体用于在所述 N条虚拟链路上承载的业务具有业务权重因子时, 根据所述业务权重因子 与承载该业务的虚拟链路的使用次数的乘积配置所述 N-P条虚拟链路的 标识的分布, 获得所述第五虚拟链路号数组; 拟链路号数组中出现的频率。
上述通信设备用于在传输业务流时能够实现各虚拟链路上的业务流 均衡。
应了解的是, 以上通信设备的实施例中, 各功能单元的划分仅是举例 说明, 实际应用中可以根据需要, 例如相应硬件的配置要求或者软件的实 现的便利考虑, 而将上述功能分配由不同的功能单元完成, 即将所述通信 设备的内部结构划分成不同的功能单元, 以完成以上描述的全部或者部分 功能。 而且, 实际应用中, 本实施例中的相应的功能单元可以是由相应的 硬件实现, 也可以由相应的硬件执行相应的软件完成, 例如, 前述的数组 获取单元可以是能够执行相应计算机程序从而完成前述功能的一般处理 器或者其他硬件设备; 再如, 前述的接收单元, 可以是具有执行前述接收 单元功能的硬件, 例如接收器, 也可以是能够执行相应计算机程序从而完 成前述功能的一般处理器或者其他硬件设备; (本说明书提供的各个实施 例都可应用上述描述原则) 。
本领域普通技术人员可以理解: 附图只是一个实施例的示意图, 附图 中的模块或流程并不一定是实施本发明所必须的。
本领域普通技术人员可以理解: 实施例中的装置中的模块可以按照实 施例描述分布于实施例的装置中, 也可以进行相应变化位于不同于本实施 例的一个或多个装置中。 上述实施例的模块可以合并为一个模块, 也可以 进一步拆分成多个子模块。
上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步 骤可以通过程序指令相关的硬件来完成, 前述程序可以存储于一计算机可 读取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而 前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序 代码的介质。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非 对其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的 普通技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进 行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或 者替换, 并不使相应技术方案的本质脱离本发明各实施例技术方案的范 围。

Claims

权 利 要 求 书
1、 一种实现负载均衡的方法, 其特征在于, 包括:
第一节点获取当前所述第一节点和第二节点之间的虚拟链路号数组, 且所述虚拟链路号数组中的每一虚拟链路的标识所分布的位置釆用所述 虚拟链路号数组的索引值表示, 所述索引值唯一;
所述第一节点根据哈希算法获取需要发送所述第二节点的业务流对 应的散列值, 在所述虚拟链路号数组中查找与散列值相同的索引值所对应 的虚拟链路标识, 釆用与所述虚拟链路标识对应的虚拟链路承载所述业务 流。
2、 根据权利要求 1所述的方法, 其特征在于, 所述第一节点获取当 前所述第一节点和第二节点之间的虚拟链路号数组的步骤, 包括:
若所述第一节点和所述第二节点之间存在 N条虚拟链路,则根据初始 化的虚拟链路号数组获取第一虚拟链路号数组, 所述第一虚拟链路号数组 中 N条虚拟链路的标识分布均衡;
所述第一虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组;
其中, N为大于等于 1 的正整数。
3、 根据权利要求 2所述的方法, 其特征在于, 所述根据初始化的虚 拟链路号数组获取第一虚拟链路号数组的步骤之后, 包括:
若所述第一节点确定接收到所述第一节点所在的控制系统发送的增 加 M条虚拟链路的第一指令,
则根据所述第一虚拟链路号数组和增加的 M条虚拟链路的标识获取 第二虚拟链路号数组, 所述第二虚拟链路号数组中 N+M条虚拟链路的标 识分布均衡;
所述第二虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组;
其中, M为大于等于 1 的正整数。
4、 根据权利要求 3所述的方法, 其特征在于, 所述根据所述第一虚 拟链路号数组和增加的 M条虚拟链路的标识获取第二虚拟链路号数组的 步骤, 包括: 查找第一虚拟链路号数组中使用次数较多的 Q条虚拟链路的标识,釆 用增加的 M条虚拟链路的标识分别替换所述使用次数较多的 Q条虚拟链 路的标识, 得到所述第二虚拟链路号数组;
其中, 所述使用次数为所述虚拟链路的标识在所述第一虚拟链路号数 组中出现的频率;
其中, Q为大于零且小于等于 M的正整数。
5、 根据权利要求 3所述的方法, 其特征在于, 所述根据所述第一虚 拟链路号数组和增加的 M条虚拟链路的标识获取第二虚拟链路号数组的 步骤之后, 包括:
若所述第一节点确定接收到所述控制系统发送的包括扩展因子的第 一扩展指令, 所述第一扩展指令用于指示所述第一节点根据所述扩展因子 扩展当前的虚拟链路号数组的长度,
则根据所述第一扩展指令和所述第二虚拟链路号数组获取第三虚拟 链路号数组, 所述第三虚拟链路号数组中 N+M条虚拟链路的标识分布均 衡;
所述第三虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组;
或者,
若所述第一节点确定接收到所述控制系统发送的第二扩展指令, 所述 第二扩展指令用于指示所述第一节点根据预设的扩展因子扩展当前的虚 拟链路号数组的长度,
则根据所述第二扩展指令和所述第二虚拟链路号数组获取第四虚拟 链路号数组, 所述第四虚拟链路号数组中 N+M条虚拟链路的标识分布均 衡;
所述第四虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组。
6、 根据权利要求 3所述的方法, 其特征在于, 所述根据所述第一虚 拟链路号数组和增加的 M条虚拟链路的标识获取第二虚拟链路号数组的 步骤, 包括:
若所述 N条虚拟链路上承载的业务具有业务权重因子,则根据所述业 务权重因子与承载所述业务的虚拟链路的使用次数的乘积配置 N+M条虚 拟链路的标识的分布, 获得第二虚拟链路号数组; 拟链路号数组中出现的频率。
7、 根据权利要求 5所述的方法, 其特征在于, 所述根据所述第一扩 展指令和所述第二虚拟链路号数组获取第三虚拟链路号数组的步骤, 包 括:
若所述 N+M条虚拟链路上承载的业务具有预设的业务权重因子, 则 根据所述业务权重因子与承载该业务的虚拟链路的使用次数的乘积、 所述 第一扩展指令配置所述 N+M条虚拟链路标识的分布, 获得所述第三虚拟 链路号数组; 链路号数组中出现的频率。
8、 根据权利要求 2所述的方法, 其特征在于, 所述根据初始化的虚 拟链路号数组获取第一虚拟链路号数组的步骤之后, 包括:
若所述第一节点确定接收到所述第一节点所在的控制系统发送的删 除 P条虚拟链路的第二指令,
则根据所述第一虚拟链路号数组和删除的 P条虚拟链路的标识获取 第五虚拟链路号数组,所述第五虚拟链路号数组中 N-P条虚拟链路的标识 分布均衡;
所述第五虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组;
其中, P小于 N的正整数。
9、 根据权利要求 8所述的方法, 其特征在于, 所述根据所述第一虚 拟链路号数组和删除 P条虚拟链路的标识获取第五虚拟链路号数组的步 骤, 包括:
查找第一虚拟链路号数组中使用次数较少的 R条虚拟链路的标识,釆 用 R条虚拟链路的标识分别均衡替换所述删除的 P条虚拟链路的标识, 得到所述第五虚拟链路号数组;
其中, 所述使用次数为所述虚拟链路的标识在所述第一虚拟链路号数 组中出现的频率;
R为大于零且小于等于 P的正整数。
10、 根据权利要求 8所述的方法, 其特征在于, 所述根据所述第一虚 拟链路号数组和删除 P条虚拟链路的标识获取第五虚拟链路号数组的步 骤之后, 包括:
若所述第一节点确定接收到所述控制系统发送的包括扩展因子的第 三扩展指令, 所述第三扩展指令用于指示所述第一节点根据所述扩展因子 扩展当前虚拟链路号数组的长度,
则根据所述第三扩展指令和所述第五虚拟链路号数组获取第六虚拟 链路号数组, 所述第六虚拟链路号数组中 N-P条虚拟链路的标识分布均 衡;
所述第六虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组;
或者,
若所述第一节点确定接收到所述控制系统发送的第四扩展指令, 所述 第四扩展指令用于指示所述第一节点根据预设的扩展因子扩展当前的虚 拟链路号数组的长度,
则根据所述第四扩展指令和所述第五虚拟链路号数组获取第七虚拟 链路号数组, 所述第七虚拟链路号数组中 N-P条虚拟链路的标识分布均 衡;
所述第七虚拟链路号数组为当前所述第一节点和第二节点之间的虚 拟链路号数组。
1 1、 根据权利要求 8所述的方法, 其特征在于, 根据所述第一虚拟链 路号数组和删除 P条虚拟链路的标识获取第五虚拟链路号数组的步骤, 包 括:
若所述 N条虚拟链路上承载的业务具有业务权重因子,则根据所述业 务权重因子与承载该业务的虚拟链路的使用次数的乘积配置所述 N -P条 虚拟链路的标识的分布, 获得所述第五虚拟链路号数组; 拟链路号数组中出现的频率。
12、 根据权利要求 10所述的方法, 其特征在于, 所述根据所述第四 扩展指令和所述第五虚拟链路号数组获取第七虚拟链路号数组的步骤, 包 括:
若所述 N-P条虚拟链路上承载的业务具有预设的业务权重因子,则根 据所述业务权重因子与承载该业务的虚拟链路的使用次数的乘积和第四 扩展指令配置所述 N-P条虚拟链路标识的分布,获得所述第七虚拟链路号 数组; 链路号数组中出现的频率。
13、 一种通信设备, 其特征在于, 包括: 处理器和存储器;
所述处理器, 用于获取当前通信设备和另一通信设备之间的虚拟链路 号数组, 所述虚拟链路号数组中的每一虚拟链路标识所分布的位置釆用所 述虚拟链路号数组的索引表示, 所述索引值唯一;
所述存储器, 用于存储所述处理器获取的当前的虚拟链路号数组; 所述处理器, 还用于根据哈希算法获取需要发送所述另一通信设备的 业务流对应的散列值, 在所述存储器中存储的当前的虚拟链路号数组中查 找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述虚拟链路标 识对应的虚拟链路承载所述业务流。
14、 根据权利要求 13所述的设备, 其特征在于,
所述处理器, 具体用于在所述通信设备和所述另一通信设备之间存在
N条虚拟链路时,根据初始化的虚拟链路号数组获取第一虚拟链路号数组, 所述第一虚拟链路号数组中 N条虚拟链路的标识分布均衡;
所述存储器, 用于存储当前所述通信设备和所述另一通信设备之间的 第一虚拟链路号数组;
其中, N为大于等于 1的正整数。
15、 根据权利要求 14所述的通信设备, 其特征在于, 所述通信设备 还包括:
接收器,用于接收所述通信设备所在的控制系统发送的增加 M条虚拟 链路的第一指令;
所述处理器, 还用于在所述接收器接收所述第一指令之后, 根据所述 第一虚拟链路号数组和增加的 M条虚拟链路的标识获取第二虚拟链路号 数组, 所述第二虚拟链路号数组中 N+M条虚拟链路的标识均不均衡; 所述存储器, 用于存储当前所述通信设备和所述另一通信设备之间的 第二虚拟链路号数组;
其中, M为大于等于 1的正整数。
16、 根据权利要求 15所述的通信设备, 其特征在于,
所述接收器, 还用于接收所述控制系统发送的包括扩展因子的第一扩 展指令, 所述第一扩展指令用于指示所述通信设备根据所述扩展因子扩展 当前的虚拟链路号数组的长度;
所述处理器, 还用于在所述接收器接收所述第一扩展指令之后, 根据 所述第一扩展指令和所述第二虚拟链路号数组获取第三虚拟链路号数组, 所述第三虚拟链路号数组中 N+M条虚拟链路的标识分布均衡;
所述存储器, 用于存储当前所述通信设备和所述另一通信设备之间的 第三虚拟链路号数组;
或者
所述接收器, 还用于接收所述控制系统发送的第二扩展指令, 所述第 二扩展指令用于指示所述通信设备根据预设的扩展因子扩展当前的虚拟 链路号数组的长度;
所述处理器, 还用于在所述接收器接收所述第二扩展指令之后, 根据 所述第二扩展指令和所述第二虚拟链路号数组获取第四虚拟链路号数组, 所述第四虚拟链路号数组中 N+M条虚拟链路的标识分布均衡;
所述存储器, 用于存储当前所述通信设备和所述另一通信设备之间的 第四虚拟链路号数组。
17、 根据权利要求 15所述的通信设备, 其特征在于, 所述处理器, 还用于在所述 N条虚拟链路上承载的业务具有业务权重因子时,根据所述 业务权重因子与承载所述业务的虚拟链路的使用次数的乘积、 第一虚拟链 路号数组中每一虚拟链路的使用次数配置 N+M条虚拟链路的标识的分 布, 获得第二虚拟链路号数组; 拟链路号数组中出现的频率。
18、 根据权利要求 14所述的通信设备, 其特征在于, 所述通信设备 还包括: 接收器;
所述接收器,用于接收所述通信设备所在的控制系统发送的删除 P条 虚拟链路的第二指令;
所述处理器, 用于在所述接收器接收到所述第二指令之后, 根据所述 第一虚拟链路号数组和删除的 P条虚拟链路的标识获取第二虚拟链路号 数组, 所述第二虚拟链路号数组中 N-P条虚拟链路的标识分布均衡; 所述存储器, 用于存储当前所述通信设备和所述另一通信设备之间的 第五虚拟链路号数组;
其中, P为小于 N的正整数。
19、 根据权利要求 18所述的通信设备, 其特征在于, 所述接收器, 还用于接收所述控制系统发送的包括扩展因子的第三扩展指令, 所述第三 扩展指令用于指示所述通信设备根据所述扩展因子扩展当前的虚拟链路 号数组的长度;
所述处理器, 用于在所述接收器接收所述第三扩展指令之后, 根据所 述第三扩展指令和所述第五虚拟链路号数组获取第六虚拟链路号数组, 所 述第六虚拟链路号数组中 N-P条虚拟链路的标识分布均衡;
所述存储器, 用于存储当前所述通信设备和所述另一通信设备之间的 第六虚拟链路号数组;
或者,
所述接收器, 还用于接收所述控制系统发送的第四扩展指令, 所述第 四扩展指令用于指示所述通信设备根据预设的扩展因子扩展当前的虚拟 链路号数组的长度;
所述处理器, 用于在所述接收器接收所述第四扩展指令之后, 根据所 述第四扩展指令和所述第五虚拟链路号数组获取第七虚拟链路号数组, 所 述第七虚拟链路号数组中 N-P条虚拟链路的标识分布均衡;
所述存储器, 用于存储当前所述通信设备和所述另一通信设备之间的 第七虚拟链路号数组。
20、 根据权利要求 18所述的通信设备, 其特征在于, 所述处理器, 具体用于, 在所述 N条虚拟链路上承载的业务具有业务权重因子时, 根据 所述业务权重因子与承载该业务的虚拟链路的使用次数的乘积配置所述
N-P条虚拟链路的标识的分布, 获得所述第五虚拟链路号数组; 拟链路号数组中出现的频率。
21、 一种通信设备, 其特征在于, 包括:
数组获取单元, 用于获取当前通信设备和另一通信设备之间的虚拟链 路号数组, 所述虚拟链路号数组中的每一虚拟链路标识所分布的位置釆用 所述虚拟链路号数组的索引表示, 所述索引值唯一;
虚拟链路选取单元, 用于根据哈希算法获取需要发送所述另一通信设 备的业务流对应的散列值, 在所述数组获取单元所获取的当前的虚拟链路 号数组中查找与散列值相同的索引值所对应的虚拟链路标识, 釆用与所述 虚拟链路标识对应的虚拟链路承载所述业务流。
22、 根据权利要求 21所述的设备, 其特征在于,
所述数组获取单元, 具体用于在所述通信设备和所述另一通信设备之 间存在 N条虚拟链路时,根据初始化的虚拟链路号数组获取第一虚拟链路 号数组, 所述第一虚拟链路号数组中 N条虚拟链路的标识分布均衡; 所述第一虚拟链路号数组为当前所述通信设备和另一通信设备之间 的虚拟链路号数组;
其中, N为大于等于 1的正整数。
23、 根据权利要求 22所述的通信设备, 其特征在于, 所述通信设备 还包括:
接收单元,用于接收所述通信设备所在的控制系统发送的增加 M条虚 拟链路的第一指令;
所述数组获取单元, 还用于在所述接收单元接收所述第一指令之后, 根据所述第一虚拟链路号数组和增加的 M条虚拟链路的标识获取第二虚 拟链路号数组, 所述第二虚拟链路号数组中 N+M条虚拟链路的标识均不 均衡;
所述第二虚拟链路号数组为当前所述通信设备和另一通信设备之间 的第二虚拟链路号数组; 其中, M为大于等于 1的正整数。
24、 根据权利要求 23所述的通信设备, 其特征在于,
所述接收单元, 还用于接收所述控制系统发送的包括扩展因子的第一 扩展指令, 所述第一扩展指令用于指示所述通信设备根据所述扩展因子扩 展当前的虚拟链路号数组的长度;
所述数组获取单元, 还用于在所述接收单元接收所述第一扩展指令之 后, 根据所述第一扩展指令和所述第二虚拟链路号数组获取第三虚拟链路 号数组, 所述第三虚拟链路号数组中 N+M条虚拟链路的标识分布均衡; 所述第三虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第三虚拟链路号数组;
或者
所述接收单元, 还用于接收所述控制系统发送的第二扩展指令, 所述 第二扩展指令用于指示所述通信设备根据预设的扩展因子扩展当前的虚 拟链路号数组的长度;
所述数组获取单元, 还用于在所述接收单元接收所述第二扩展指令之 后, 根据所述第二扩展指令和所述第二虚拟链路号数组获取第四虚拟链路 号数组, 所述第四虚拟链路号数组中 N+M条虚拟链路的标识分布均衡; 所述第四虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第四虚拟链路号数组。
25、 根据权利要求 23所述的通信设备, 其特征在于, 所述数组获取 单元, 还用于在所述 N条虚拟链路上承载的业务具有业务权重因子时, 根 据所述业务权重因子与承载所述业务的虚拟链路的使用次数的乘积配置 N+M条虚拟链路的标识的分布, 获得第二虚拟链路号数组; 拟链路号数组中出现的频率。
26、 根据权利要求 22所述的通信设备, 其特征在于, 所述通信设备 还包括: 接收单元;
所述接收单元, 用于接收所述通信设备所在的控制系统发送的删除 P 条虚拟链路的第二指令;
所述数组获取单元, 用于在所述接收单元接收到所述第二指令之后, 根据所述第一虚拟链路号数组和删除的 P条虚拟链路的标识获取第二虚 拟链路号数组,所述第二虚拟链路号数组中 N-P条虚拟链路的标识分布均 衡;
所述第五虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第五虚拟链路号数组;
其中, P为小于 N的正整数。
27、 根据权利要求 26所述的通信设备, 其特征在于, 所述接收单元, 还用于接收所述控制系统发送的包括扩展因子的第三扩展指令, 所述第三 扩展指令用于指示所述通信设备根据所述扩展因子扩展当前的虚拟链路 号数组的长度;
所述数组获取单元, 用于在所述接收单元接收所述第三扩展指令之 后, 根据所述第三扩展指令和所述第五虚拟链路号数组获取第六虚拟链路 号数组, 所述第六虚拟链路号数组中 N-P条虚拟链路的标识分布均衡; 所述第六虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第六虚拟链路号数组;
或者,
所述接收单元, 还用于接收所述控制系统发送的第四扩展指令, 所述 第四扩展指令用于指示所述通信设备根据预设的扩展因子扩展当前的虚 拟链路号数组的长度;
所述数组获取单元, 用于在所述接收单元接收所述第四扩展指令之 后, 根据所述第四扩展指令和所述第五虚拟链路号数组获取第七虚拟链路 号数组, 所述第七虚拟链路号数组中 N-P条虚拟链路的标识分布均衡; 所述第七虚拟链路号数组为当前所述通信设备和所述另一通信设备 之间的第七虚拟链路号数组。
28、 根据权利要求 26所述的通信设备, 其特征在于, 所述数组获取 单元,具体用于,在所述 N条虚拟链路上承载的业务具有业务权重因子时, 根据所述业务权重因子与承载该业务的虚拟链路的使用次数的乘积配置 所述 N-P条虚拟链路的标识的分布, 获得所述第五虚拟链路号数组; 拟链路号数组中出现的频率。
PCT/CN2012/085560 2012-11-29 2012-11-29 实现负载均衡的方法及设备 WO2014082259A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201280004550.XA CN103534996B (zh) 2012-11-29 2012-11-29 实现负载均衡的方法及设备
PCT/CN2012/085560 WO2014082259A1 (zh) 2012-11-29 2012-11-29 实现负载均衡的方法及设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/085560 WO2014082259A1 (zh) 2012-11-29 2012-11-29 实现负载均衡的方法及设备

Publications (1)

Publication Number Publication Date
WO2014082259A1 true WO2014082259A1 (zh) 2014-06-05

Family

ID=49935415

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/085560 WO2014082259A1 (zh) 2012-11-29 2012-11-29 实现负载均衡的方法及设备

Country Status (2)

Country Link
CN (1) CN103534996B (zh)
WO (1) WO2014082259A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103929492B (zh) * 2014-04-28 2017-08-29 华为技术有限公司 业务链负载均衡方法及其装置、系统
US9671960B2 (en) * 2014-09-12 2017-06-06 Netapp, Inc. Rate matching technique for balancing segment cleaning and I/O workload
CN106411555B (zh) * 2015-08-03 2020-02-14 阿里巴巴集团控股有限公司 通信链路配置方法、装置及相关系统
CN109450808A (zh) * 2018-11-07 2019-03-08 盛科网络(苏州)有限公司 使ecmp组中ecmp成员链路分布均衡的方法
CN112860431B (zh) * 2021-01-20 2024-03-15 重庆六花网络科技有限公司 微服务节点的连接方法、系统、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101051939A (zh) * 2006-06-15 2007-10-10 华为技术有限公司 一种实现网络流量负载分担的方法及装置
US20110051735A1 (en) * 2009-08-27 2011-03-03 Broadcom Corporation Dynamic load balancing using virtual link credit accounting
CN102025563A (zh) * 2010-11-30 2011-04-20 东南大学 基于哈希冲突补偿的网络大流识别方法
CN102571558A (zh) * 2010-11-30 2012-07-11 马维尔以色列(M.I.S.L.)有限公司 用于网络交换机的负载平衡哈希计算
CN102752226A (zh) * 2012-08-01 2012-10-24 杭州迪普科技有限公司 一种链路负载均衡装置及管理服务器

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101051939A (zh) * 2006-06-15 2007-10-10 华为技术有限公司 一种实现网络流量负载分担的方法及装置
US20110051735A1 (en) * 2009-08-27 2011-03-03 Broadcom Corporation Dynamic load balancing using virtual link credit accounting
CN102025563A (zh) * 2010-11-30 2011-04-20 东南大学 基于哈希冲突补偿的网络大流识别方法
CN102571558A (zh) * 2010-11-30 2012-07-11 马维尔以色列(M.I.S.L.)有限公司 用于网络交换机的负载平衡哈希计算
CN102752226A (zh) * 2012-08-01 2012-10-24 杭州迪普科技有限公司 一种链路负载均衡装置及管理服务器

Also Published As

Publication number Publication date
CN103534996A (zh) 2014-01-22
CN103534996B (zh) 2016-06-08

Similar Documents

Publication Publication Date Title
US9509614B2 (en) Hierarchical load balancing in a network environment
EP2705645B1 (en) Name-based neighbor discovery and multi-hop service discovery in information-centric networks
US9998529B2 (en) Method and system for load balancing anycast data traffic
US8825867B2 (en) Two level packet distribution with stateless first level packet distribution to a group of servers and stateful second level packet distribution to a server within the group
CN102726021B (zh) 灵活的数据中心网络体系结构
CN106201356B (zh) 一种基于链路可用带宽状态的动态数据调度方法
WO2022222550A1 (zh) 算力资源的通告方法及装置、存储介质、电子装置
CN107925681A (zh) 用于分布式软件定义网络分组核心系统中的负载平衡的系统和方法
US20120331160A1 (en) Multi-path transmission control protocol proxy service
Wang et al. Implementation of multipath network virtualization with SDN and NFV
WO2014082259A1 (zh) 实现负载均衡的方法及设备
CN109413211B (zh) 一种eos区块链超级节点的架构及其实现方法
JP2018191290A (ja) 負荷分散を実現するための方法、装置、およびネットワークシステム
WO2016177191A1 (zh) 一种报文的处理方法及装置
WO2016180188A1 (zh) 分发建链方法、装置和系统
CN106375355B (zh) 负载均衡处理方法及装置
US20130304867A1 (en) Methods and systems to efficiently retrieve a data element
CN116633934A (zh) 负载均衡方法、装置、节点及存储介质
CN112087382B (zh) 一种服务路由方法及装置
CN106686060A (zh) 一种内容扩散的方法及系统
CN110324265B (zh) 流量分发方法、路由方法、设备及网络系统
Ammar et al. Dynamic SDN controllers-switches mapping for load balancing and controller failure handling
US20150127799A1 (en) Hierarchical distribution of control information in a massively scalable network server
Saifullah et al. Open flow-based server load balancing using improved server health reports
US20080298366A1 (en) Agnostic Network Architecture

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12889145

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12889145

Country of ref document: EP

Kind code of ref document: A1