Patent Description:
High-scale stateful load balancing is an important part of many network functions and an active field of academic and practical research. The use of load balancing is part of many different layers in networking functionalities, including but not limited to: Link-aggregation traffic distribution, ECMP / WCMP (Equal Cost Multi-Path, Weighted Cost Multi-Path), L4-L7 Session Load Balancing, Distributed Data-base implementation, Mobility EPC (Evolved Packet Core) functions, NAT (Network Address Translations) functions, and the like.

Classical non stateful (Link-aggregation, ECMP / ECMP) or stateful (L4-L7 Session Load Balancing, etc.) are all revolving around the way to choose the destination or eventual server / micro-service which should handle a traffic item. The way in which the existing destinations are obtained, managed, accounted for or being classified are beyond the scope of this disclosure, so are the exact ways by which load parameters / abilities of these destinations are conveyed to the load balancing device / devices (which can be based on out-of-band communication or in-band communication using special streams or piggi-bagging existing ones, where problems are more complicated in case of a distributed load-balancing architecture).

Maenpaa et al. describe in their paper "A Topology Plug-in for Resource Location And Discovery, draft-maenpaa-p2psip-topologyplugin-<NUM>", a peer-to-peer signaling protocol (RELOAD) that can be used to maintain an overlay network, and to store data in and retrieve data from the overlay. The document defines a new topology plug-in for RELOAD that is more appropriate for real world large scale overlays.

<CIT> relates to entropy in routing tables that may be increased to perform packet forwarding. Hash tables that store forwarding routes may be divided into multiple hash table segments and forwarding routes may be stored across the hash table segments in different route segments.

The invention is defined by referring to the appended claims.

It is an object of the present disclosure to provide a novel and improved method that allows affecting changes in a communication network comprising a plurality of network processing units and/or clusters thereof, while adding/removing/overcoming a failure of a network processing unit.

It is another object to provide a novel method that enables obtaining an improved load balancing performance.

It is another object to provide a novel method that enables obtaining an improved scaling up of existing networks that comprise a vast number of network processing units.

It is yet another object to provide a novel and improved method for utilizing different load-balancing groups in conveying communications in a communication network.

Other objects will become apparent from the following description.

According to a first example of the there is provided a method for use in a communication network, wherein the method comprises the steps of:.

By yet another example, the search resolution for a consistent hashing is conducted based on searching for a packet destination ID using a key built from said packet's meta-data. Optionally, the packet's meta-data is derived from the packet's networking headers.

According to still another example, the search resolution for a consistent hashing is done by retrieving a respective destination ID while using a Ternary Content-Addressable Memory (TCAM) algorithm.

In accordance with another embodiment, the method provided further comprises a step of composing a route space of the networking subnets and/or prefixes, and wherein the search function is based on a Longest Prefix Match (LPM) algorithm.

According to yet another embodiment, the same search function (LPM) is preserved, and the space is built by using possible virtual identifications as prefixes.

By still another embodiment of the present disclosure, the method provided further comprises a step of utilizing different load-balancing groups as VRF (Virtual Routing and Forwarding) tables, which in turn are used as a parameter while carrying out the LPM algorithm search, thereby generating a dedicated consistent hashing space for use as a route space for conveying traffic in the communication network.

The accompanying drawing, which is incorporated herein and constitute a part of this specification, illustrates an embodiment of the disclosure and, together with the description, serve to explain the principles of the embodiments disclosed herein.

Some of the specific details and values in the following detailed description refer to certain examples of the disclosure. However, this description is provided only by way of example and is not intended to limit the scope of the invention in any way. As will be appreciated by those skilled in the art, the claimed distributed routing system may be implemented by using other devices that are known in the art per se. The scope of the invention can be summarized by referring to the appended claims.

With the rise of distributed architectures, consistent hashing became a major player. The term "hashing" refers to a process to map data of arbitrary size to fixed-size values. Hashing has many applications in computer science, such as for example, checksum. In order to verify the integrity of a dataset, a server hashes a dataset and indicates the hash value to a client. Then, the client hashes its version of the dataset and compares the hash values. If the two are equal, the integrity is is likely to be verified (e.g., a problem may arise when two distinct pieces of data have the same hash value (a collision)).

One of the challenges associated with this methodology is spreading the values across a domain. Load distribution is therefore the process of spreading load across network processing units.

The term "network processing unit" as used herein throughout the specification and claims is used to denote any number of the group that comprises a node, a server, a computation unit, and the like. Load balancing is one example of load distribution. It is used in distributing a set of tasks over a set of resources. For example, load balancing may be used to distribute API requests among web server instances.

However, when dealing with data, we the term sharding may be used. A database shard is a horizontal partition of data in a database. A typical example is a database partitioned in three shards where each shard has a subset out of the total data.

Load balancing and sharding share some common challenges. Spreading data evenly is used for example to guarantee that a node is not overloaded compared to the others. In some cases, load balancing and sharding also need to associate tasks or data to the same node.

The principle of mod-n hashing is the following. The load needs to be distributed among the nodes based on key identifiers. Each key is hashed using a hashing function to transform an input into an integer. Then, a modulo based on the number of nodes is performed. If sharding is implemented and data is distributed based on the mod-n strategy, in a case where the number of nodes should be scaled, one would need to perform a rebalancing operation.

Now, if vast numbers (millions or even billions) of data have been stored and it is now required to rebalance a substantial part thereof, the rebalancing should preferably be a process wherein: the distribution remain as uniform as possible based on the new number of nodes, and the number of keys that need to be migrated should be limited. This is the purpose of consistent hashing algorithms, algorithms that maintain the key consistent until a certain point in order to keep the distribution uniform.

A ring consistent hashing algorithm is an algorithm that is based on a ring (an end-to-end connected array), and the first operation is to create the ring. A ring has a fixed-length and it may be partitioned into a predetermined number of partitions, and the network processing units (nodes in this example) are located in these partitions.

In general, a load-balancing device requires a function F(K), which is configured to match a key (e.g., network headers, data-base keys, and the like) with a node ID.

in which {K} is a set of available keys, and {N} is the set of active and available nodes.

Most systems use a naive but very scalable implementation, whereby a hash function (H) is used: <MAT>.

In the above equation H is a Hash function which translates any arbitrary key into a number, while N is the number of current active and available nodes. Now, let us assume that H in reality is configured to operate on a known key set, and has a bounded run-time complexity, such that F(K) is considered O(<NUM>).

Next, the problem is what happens when N (the number of available and active network processing units, e.g., nodes) changes due to an addition, removal or failure of a network element. In such a case, the problem that arises is that the entire mapping logic which is defined by F, changes. Consequently, a complete traffic shuffling to all destinations occurs, regardless of the fact whether the actual item was originally destined to a changed node (resulting, in many changes within the system, large blast radius and a need to move content between places).

Mathematically the result stems from the use of the modulo operator (%). When the number of nodes N changes to N', <MAT> for every H(K)>=N'.

To mitigate the problem without increasing memory footprint, yet while taking into account different node processing capabilities (in terms of memory, CPU, networking bandwidth and delay, etc.), one may use the function M(K), by implementing the following steps:.

The above method can be implemented effectively using a software wherein O(log<NUM>N) run-time complexity and O(N) space complexity, using a binary search or tree structures.

This implementation may be regarded as a geometrical representation of a circle, in which points comprised in the circle are the various VID's. It is no longer sensitive to a change in N, since F(K) does not use the modulo operation. A node addition, removal or failure would mark the relevant VID's as inactive and the search will return the next available item (in a clockwise direction) resulting in a different resolution for items destined only to it - which simplifies the change and consequently, results on average in only [K/N] items being changed.

<FIG> demonstrates an example of the above methodology which depicts a software consistent hashing space creation, construed in accordance with an embodiment of the present invention. The representation depicts four physical nodes designated A, B, C and D and replicas of nodes A and D. This configuration is then used for creating a consistent hashing space. For every active and available node of the six entities depicted in this representation, <NUM> to <NUM>, a virtual node ID was created (VID), and an ordered list L of the hash values of the VID's, established.

<FIG> illustrates the network presented in <FIG>, wherein an example of a search resolution for a software consistent hashing is depicted, using an arbitrary key K.

<FIG> depicts an example of the search resolution for the software consistent hashing on an arbitrary key K shown in <FIG>, after a failure of the node C,<NUM>. Obviously, as would be appreciated by those skilled in the art, such a process as the one in <FIG> and <FIG>, mutates mutandis may be carried out for each of the nodes which experiences a change (addition, removal, multiple failures).

In view of the above, the present invention seeks to provide a solution for additional cases which aim to effectively implement a scalable version of the algorithm using an NPU (Network Processing Unit) so that a single NCP or even clusters of NCPs working together, can operate accordingly. Solving these problems has a number of obvious advantages. To name but few, a better overall scaling (from servers which can handle tens of Gb/s to small 1hundreds of Gb/s, up to NCPs which can handle 4Tb's to many hundreds of Tb/s at a line-rate); a better overall space, and power efficiency; a better Search performance (O(<NUM>) hardware search); a better overall load-balancing performance (processing packets using hardware); and a better overall failure / change mitigation rate.

In order to reach a solution to the above challenge, the following two issues must be addressed. First, how to represent the consistent hashing space in an NPU, and second, how to implement the Search function in an NPU.

The solution found was implementing a packet forwarding based on searching for the destination ID (the next node) using a key built from the packet's meta-data (mainly the networking headers). Searching is done for that key inside a fast search memory (physical or algorithmic TCAM [a Content Addressable Memory]), resulting in a respective destination ID.

The possible route space is composed of the networking subnets / prefixes (being de-facto an ordered list) while the search function is based on an LPM (Longest Prefix Match). Thus, one of the advantages of the present invention is that it provides a logical linkage between a search for the next closest consistent-hashing ring member and the operation of the Longest Prefix Matching (LPM).

However, in a consistent hashing case, as the case with the problem which this embodiment of the present invention seeks to solve, the solution proposed is to ensure that the same search function (LPM) is preserved, but the space is built differently, namely, by using the possible VID's as prefixes.

Adopting this approach, allows implementing a general packet-processing mechanism to solve the problem, by achieving all the aforementioned issues without a need to employ any special hardware mechanism. The search of NID is done immediately by hardware at a line-rate for all possible node ID's.

In order to mitigate a failure, every VID entry results in a primary (i.e., the node itself) and backup VID entry. This is handled by using a hardware, similar to implementation of an FRR (Fast Re-Route) mechanisms. Removal or addition of nodes are handled as addition or removal (atomic operations) of nodes in a route. In other words, one may consider the mechanism described hereinabove as a non-trivial use of FRR (fast re-route) mechanism to implement the treatment of node in which a change has occurred. To do that, a primary destination pointer and backup destination pointer are used, and once the primary destination pointer goes down, the backup destination pointer is used to point (i.e., identify) to the next valid member of the ring.

In a way similar to <FIG>, <FIG> demonstrates an example of a network representation of network comprising network processing units (NPUs), for a software consistent hashing space creation, construed in accordance with an embodiment of the present invention. The representation comprises four physical NPUs designated A, B, C and D and respective replicas of NPUs A and D, for creating a consistent hashing space. For every TCAM entry of an NPU/replica depicted in this representation, <NUM> to <NUM>, a primary virtual node ID and a backup virtual node ID were created (VID). An ordered list L of the hash values of the primary VID's and the backup VID's is shown in this figure.

<FIG> illustrates the network presented in <FIG>, wherein an example of a search resolution for an NPU assisted consistent hashing is depicted, using an arbitrary key K.

<FIG> depicts an example of the search resolution for the NPU assisted consistent hashing on an arbitrary key K present in <FIG>, after a failure of the NPU C,<NUM>.

According to another embodiment of the present disclosure illustrated in <FIG>, the method provided further comprises a step of implementing a plurality of different load-balancing groups as VRF (Virtual Routing and Forwarding) tables, which in turn are used as a parameter while carrying out the LPM algorithm search, thereby creating a dedicated consistent hashing space for use as a route space for conveying traffic in the communication network. The term "load-balancing group" as used herein throughout the specification and claims, is used to denote a set of specific destinations for a certain subset of the keys. Preferably, this is step is carried out by implementing the above-described technique (i.e., generating a consistent hashing ring structure) for each of these load-balancing groups.

<FIG> exemplifies a search resolution for a software consistent hashing. After affecting a packet classification, the different load-balancing groups are used as VRF (Virtual Routing and Forwarding) tables while carrying out an LPM algorithm search. The results of the LPM algorithm search are used in creating a dedicated consistent hashing space that in turn may be used as a route space for conveying traffic in the communication network.

One of the advantages of this aspect of the invention is that load-balancing groups are implemented in a software after determining what is the communication packet (i.e., packet classification), and then selecting the appropriate ring and searching thereat. If a packet destination is shared among more than one ring, in case of failure of the node which is the shared destination, all rings will have to be updated regarding the change that took place in order to overcome that node failure (which next hope was selected).

Using the novel NPU's network described hereinabove, the packet classification is carried out by using hardware (HW), and immediately thereafter, while still using the same memory (as the packet classification enables obtaining the respective VRF parameter), the appropriate entry is derived from the suitable VRF / load-balancing group. If a destination NPU that is shared by more than one ring fails, the HW mechanism will update every entry that includes that NPU with the NPU that is the backup NPU for the failing NPU.

The present invention has been described using detailed descriptions of embodiments thereof that are provided by way of example and are not intended to limit the scope of the invention in any way.

Claim 1:
A method for use in a communication network, wherein said method comprises the steps of:
(i) providing a plurality of network processing units, NPUs, (A-D) comprised in said communication network;
and wherein said method is characterized in that it further comprises the following steps:
(ii) establishing a replication of at least one of said plurality of network processing units (A,<NUM> D,<NUM>);
(iii) arranging the plurality of network processing units and the at least one replication, in a virtual ring configuration;
(iv) associating a unique primary virtual identification and a corresponding unique backup virtual identification with each active and available network processing unit (H(A,<NUM>), H(B,<NUM>), H(C,<NUM>), H(D,<NUM>)) and the at least one replication (H(A,<NUM>), H(D,<NUM>));
(v) establishing a list of hash values, associated with the primary virtual identifications of said active and available network processing units and hash values associated with the backup virtual identification of corresponding active and available network processing units (H(A,<NUM>), (H(D,<NUM>), H(A,<NUM>), H(C,<NUM>), H(D,<NUM>), H(B,<NUM>));
(vi) implementing a ring consistent hashing algorithm for carrying out a search resolution for a consistent hashing (K, H(K)); and
(vii) in a case of a change in at least one of the active and available network processing units having a certain unique primary virtual identification (H(C,<NUM>)) (<NUM>,<NUM>), using the corresponding backup virtual identification (H(D,<NUM>)) to maintain the ring continuity.