Data-plane network traffic monitoring
The method addresses inefficiencies in existing network-wide top-k flow detection by using a distributed state management system to aggregate and merge local top-k tables in programmable switches, ensuring accurate and efficient detection without centralized controllers.
Patent Information
- Application Number
- PCT/IL2026/050432
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-23
- Filing Date
- 2026-05-20
- Publication Date
- 2026-11-26
AI Technical Summary
Existing solutions for finding network-wide top-k flows in programmable switches are inefficient due to memory and processing constraints, and require centralized controllers, leading to high overhead and inaccuracies, especially for time-sensitive measurements and split heavy flows.
A method for detecting global top-k flows entirely within the data plane using a distributed state management system that maintains local top-k tables in each switch, aggregates information through data-plane packet exchange, and merges tables without recirculation, employing a snapshot and sum table structure to ensure accurate global counter aggregation.
Achieves over 95% recall rate with less than 300KB per switch, enabling efficient and accurate detection of network-wide top-k flows without a centralized controller, suitable for high-speed network hardware.
Smart Images

Figure IL2026050432_26112026_PF_FP_ABST
Abstract
Description
DATA-PLANE NETWORK TRAFFIC MONITORING TECHNOLOGICAL FIELD
[0001] The present disclosure generally relates to the field of computer networks, and particularly to distributed state management for network functions implemented in programmable data-plane switches.BACKGROUND ART
[0002] References considered to be relevant as background to the presently disclosed subject matter are listed below:
[0003] L. Zeno et al “{SwiSh}: Distributed shared state abstractions for programmable switches,” in NSDI, 2022, pp. 171-191.
[0004] T. Benson et al, “Sounding the bell for improving internet (of things) security,” in Workshop on Internet of Things Security and Privacy, 2017, pp. 77-82.
[0005] S. Agarwal et al, “Traffic engineering in software defined networks,” in IEEE INFOCOM, 2013, pp. 2211-2219.
[0006] Y. Chen et al, “Understanding tcp incast and its implications for big data workloads,” University of California at Berkeley, Tech. Rep, 2012.
[0007] R. B. Basat et al, “Network-wide routing-oblivious heavy hitters,” in ANCS, 2018, pp.66-73.
[0008] A. Shaikh et al, “Load-sensitive routing of long-lived ip flows,” ACM SIGCOMM Computer Communication Review, vol. 29, no. 4, pp. 215-226, 1999.
[0009] R. B. Basat et al, “Randomized admission policy for efficient top-k, frequency, and volume estimation,” IEEE / ACM Transactions on Networking, vol. 27, no. 4, pp. 1432- 1445, 2019.
[0010] Ran B. et al "Designing Heavy-Hitter Detection Algorithms for Programmable Switches" IEEE / ACM Transactions on Networking, Volume: 28 Issue: 3 (2020).BACKGROUND
[0011] This section intends to provide background information concerning the present application, which is not necessarily prior art.
[0012] Monitoring network traffic is crucial for most network tasks, such as identifying and blocking attacks, pinpointing failures and engineering and rerouting heavy traffic to maintain high throughput. One important metric when monitoring the traffic is finding the top-k heavyflows i.e., the k heaviest flows in the traffic, which can be useful in routing decisions (e.g. to improve routing of heavy flows and alleviate congestion and increase network throughput) and detecting and mitigating volumetric attacks such as DDoS. Programmable networks allow performing advanced network analysis right in the data plane. In recent years, various solutions have been proposed for efficiently finding the top-k heavy flows within a single switch, however, there is also a raising need to find the global top-k flows in network(s).
[0013] Existing solutions for global top-k detection use a centralized controller that collects and aggregates the measurements performed in each of the switches. Yet, the process of sending information to the control plane and then having the collector send back the information to the switches can be very lengthy. In order to be able to detect and mitigate shortlived events, solutions that work completely within the data plane are needed.
[0014] With the advancement of programmable networks, many solutions have been developed for performing network monitoring right inside the data plane. Finding top-k flows in a programmable switch is challenging due to the harsh constraints on memory and processing. Yet, there are existing solutions for finding top-k flows that can be deployed on a programmable switch. However, these solutions are only suitable for a single switch, whereas some tasks require finding the network-wide top-k flows.
[0015] In existing solutions, in order to find network-wide top-k flows, each switch processes the traffic that it sees, and then additional processing needs to be performed collectively. Some solutions use samples that are either collected in the switch or sent to the collector individually. Due to the high overhead incurred by collecting these samples, often only a limited amount of packets are sampled (e.g., 1 in 30K), which reduces the accuracy of the measurement. In other solutions, in order to avoid sampling, some processing is performed in the data plane to identify the locally heavy flows. The processed information is then sent to a centralized controller that aggregates the data and then passes the information of the network-wide top-k flows back to the switches as needed. This solution is also not optimal, since the interaction with the controller may take a long time, and thus it is not suitable for time-sensitive measurements, such as short-lived bursts. Furthermore, having each switch calculate the top-k flows locally can miss network wide heavy flows that spread across the network and are ‘small’ in some or all individual switches. Looking for such smaller flows locally will incur significant overhead in either switch resources or communication or both.
[0016] In order to find top-k flows only within the data plane, switches need a mechanism for sharing information. Swish [L. Zeno et al 2022] is a shared state management system in the data plane, replicating and sending data between switches without having to rely on a centralcontroller. Swish guarantees that all packets will be delivered successfully without duplicates. Swish can also handle failures, and in order to do so, it must send the data from a static source, so it can re-send the information if necessary. It is shown that Swish can be used to maintain a distributed Count-Min Sketch (CMS - G. Cormode et al, “An improved data stream summary: the count-min sketch and its applications'" Journal of Algorithms, vol. 55, no. 1, pp. 58-75, 2005). Each switch maintains a local CMS, and the Swish framework distributes the information from each local CMS to all other switches. Each switch then merges the sketches locally to get a combined network-wide CMS. In this manner Swish enables finding networkwide heavy hitter flows completely in the data plane. Swish has been shown to achieve better speed by an order of magnitude compared to using a centralized controller to obtain the combined sketches. However, this mechanism is not suited for finding top-k flows. CMS only maintains counters, and not flow IDs. Furthermore, flow IDs are required to extract the flow count estimation from the sketch. Thus, a different solution is needed for finding network-wide top-k flows.
[0017] For network hardware to process packets at line rate (e.g., terabits per second - Tbps speed), they must impose harsh restrictions on both the memory resources and the computation done in packet processing. Programmable switches (such as the PISA that can run multiple instances of different P4 codes, P. Bosshart et al “Forwarding metamorphosis: Fast programmable match-action processing in hardware for sdn" ACM SIGCOMM Computer Communication Review, vol. 43, no. 4, pp. 99-110, 2013) have a feed-forward packet processing pipeline comprised of a sequence of a small number of stages. Each stage has its own limited amount of unique memory, to enable stateful computations. Access to this memory (read / write operation) must be done when the packet is being processed by each stage. For example: a packet cannot access the memory of stage i while being processed in a different stage j. Additionally, the amount of memory that can be accessed in any stage while processing the packet is very limited. If additional processing on the packet is required, the packet may be recirculated to the beginning of the pipeline, but performing too many recirculations can affect throughput as it requires the switch to process the packet again.
[0018] Space Saving (A. Metwally et al “Efficient computation of frequent and top-k elements in data streams" in Database Theory-ICDT 2005, 2005, pp. 398-412) is a well-known technique that maintains a subset of the items in the stream and a counter for each member of the subset. When a new packet with ID x is processed, if x is in the subset, its associated counter is incremented by 1. If x is not saved in the subset, the algorithm finds the member with the smallest counter (i.e.,MinCounf) in the subset and replaces that member with x and incrementsits counter by 1. Although Space Saving succeeds in finding heavy flows (if their frequency is high enough compared to the size of the stream), it may over-estimate the frequency. This is especially significant in small flows that may be given a very high frequency estimation.
[0019] Random Admission Policy (RAP, R. Ben-Basat el al “ Randomized admission policy for efficient top-kand frequency estimation" in IEEE INFOCOM, 2017, pp. 1-9) is a solution that expands on the same idea but, upon seeing an ID that is not in the subset, instead of always replacing the entry with the lowest counter, it will only replace it with a certain probability (the exact probability is / (MinCount + 1)). This cancels some of the noise (excess counter increases) by low frequency flows and thus reduces the flow count overestimation.
[0020] Both Space Saving and RAP find top-k flows but they cannot work within the restrictions of the data plane. The main obstacle is obtaining the smallest counter. In order to find this counter, we must sort the items or access all of the counters to find the minimum. This would require many more memory accesses than are available. Furthermore, after finding the minimum counter the proper stage where it is stored should be accessed to change the corresponding ID.
[0021] HashPipe (V. Sivaraman el al “Heavy-hitter detection entirely in the data plane" in SoSR, 2017, pp. 164-176) was the first solution for finding top-k flows in the data plane. To avoid looking for the minimum across all counters, HashPipe uses a table that is divided into d separate vectors, each with its own hash table, placed in separate stages, which are used to create a rolling minimum. For each vector, the packet will be hashed into a single location based on the packet ID. If the ID in the vector matches the packet’ s ID, the counter in the vector is incremented. Each packet will also maintain an additional ID and counter in packet metadata, which will be used to maintain the minimum. That is, if the IDs in the packet and vector don’t match, the counters are compared. If the counter in the packet is larger than the counter in the vector, the algorithm replaces the values in the vector with the ID and counter carried by the packet and continues processing the packet with the ID of the smaller flow and its counter, so that the minimum values will eventually ’roll’ out of the table.
[0022] HashPipe however suffers from one main issue; it does not meet the requirements to run on programmable switches since it requires both accessing the ID before the counter to decide whether to increment the counter, and also requires to access counters before IDs to compare the counters to decide whether to switch the packet ID and the saved ID.
[0023] In order to create a top-k algorithm that can run on programmable switches, the Precision (Ran B. et al "Designing heavy-hitter detection algorithms for programmable switches" IEEE / ACM Transactions on Networking, Volume: 28 Issue: 3, 2020) solution buildson both RAP and HashPipe by using a similar structure to HashPipe' s table while handling packets similarly to RAP. When each packet reaches the hash table in the / -th vector, it is hashed (just like in HashPipe) to check if its ID matches the ID in the vector. If the IDs match, the associated counter is incremented. If a match is not found in any of the vectors it will recirculate to replace the smallest observed counter with probability RMinCount + 1). This way there are no excessive recirculations. Precision can run on programmable switches since it always first checks the ID and only then handles the counter.
[0024] Flow Radar (Y. Li el al 'Flowradar: A better netflow for data centers" in USENIX NSDI, 2016, pp. 311-32) is a known controller based algorithm for finding network-wide heavy hitters. FlowRadar maintains a Bloom filter and an array of encoded flows. When a new packet arrives, it checks the bloom filter to see if it is a new flow or not. If the flow is new, it encodes the flow ID into several array locations via hashing. The encoding result is a XOR of the existing value in the array with the packet’s flow ID. Then it increments the counters saved in those slots. If the flow is not new, it only increments the counters in the hashed cells. FlowRadar sends this array frequently to the controller which decodes the flows and sends back network- wide information. Due to FlowRadar' s implementation and frequent controller updates, it is likely to find all flows, and especially heavy flows as long as it has enough memory.
[0025] There are solutions that require sharing data between switches in the network. Most solutions either share only a limited amount of data, or use the control plane for assistance. That is, they communicate information from switches to the controller which processes it and sends relevant information to other switches. Sharing large amounts of data between switches completely in the data plane is more challenging as it requires both communicating the information in the face of errors and processing the information with the limited resources of the data plane.
[0026] US11362925 discloses methods and system for supporting multiple management interfaces using a network analytics engine. The network analytics engine can run on a core switch for performing data collection and monitoring of network traffic through the switch. The switch can receive a first list including a first set of network packet parameters for monitoring network traffic using certain monitoring criteria. Then, the switch can receive a second list including a second set of network packet parameters for monitoring network traffic in accordance using different monitoring criteria. The switch can generate a concatenated list including the first list and the single list to form a single set of packet parameters. Concatenation may be consistent with a determined sequential order and priorities assigned tothe lists. The switch can be programmed with the concatenated list such that network monitoring is accomplished using both monitoring criteria, while only implemented a single concatenated list.GENERAL DESCRIPTION
[0027] The following disclosure provides network-wide top-k detection techniques that operate exclusively in the data plane, in order to create the table faster than other known solutions e.g., Swish, centralized controller. The term 'switch' is generally used herein to refer to programmable high-speed network hardware devices (e.g., Tbps-capable programmable switches, ASICs and / or FPGAs) capable of data-plane packet processing at line rate.
[0028] Embodiments disclosed herein allow the switches to aggregate information from all other switches in the network, and ensures that eventually all switches hold an identical global top-k table. The inventors hereof demonstrated that the techniques disclosed herein manage to detect global top-k flows on both synthetic and real traces, with a recall rate of over 95% while using less than 300KB per switch.
[0029] In order to create a global top-k detection algorithm in the data plane, each switch in the network needs to first identify the locally heavy flows, and then merge this information with the heavy flows identified by each of the other switches in the network. However, there are some significant challenges in achieving this in the data plane, which will be now described.
[0030] A straightforward solution for merging the network- wide information, would be to have each switch broadcast its local top-k table to all other switches. Each switch would then store all of the tables and then process them all together. However, programmable switches are very limited in memory and computational abilities, such that each switch cannot simultaneously hold all of the received data from all the other switches and process all of the data at once. Instead, each switch needs to process the information from other switches, as it is received, in a streaming fashion.
[0031] To overcome this issue, in embodiments hereof, switches filter smaller flows from top-k tables e.g., each switch filters smaller flows using top-k table(s) received from at least one other switch. For example, in embodiments hereof, each switch is configured / programmed to compute a local top-k table, and then send the its local top-k table to at least one other switch, or to all other switches. The switch is further configured / programmed such that when it receives a packet that comes from a local top-k table of another switch, that holds a flow ID and its respective counter, it compares the packet’s flow ID to IDs stored in its own top-stable. If they match, the switch will add the packet’s counter from the received packet to the counter storedin its local top-k table with that same ID. If the packet’s ID is not found in the switch's local top-k table, and the packet’s counter is larger than the smallest counter in the local top-k table (or the smallest counter that can be found within the memory access restrictions), then the ID and counter of the smallest item stored in the switch's local top-k table is replaced with the packet’s ID and counter, such that the switch will store the heavier flow of the two.
[0032] However, since a heavy flow could be split across the network into small pieces, such a heavy flow may be missed with this solution. When attempting to merge the global information, if the flow isn’t saved in the local top-k switch table, each small piece of the flow could be considered as a small flow and be discarded in favor of flows that appear to be heavier. For example, if there are 10 switches, each holding 5 flows in their respective local top-k tables, where the first switch holds flows with counters ranging from 200 to 300 in tis local top-stable, and does not hold some flow x, while every switch except the first holds flow x in its local top-k table with counter 100. When the first switch receives information about flow x from the other switches, each received packet will hold a counter of only 100, which is smaller than counters already saved in the local top-k table of the first switch, so it will disregard it even though the global counter of flow x is 900 (z.e., if aggregated from all other switches), which is much heavier than the flows held in the local top-k table of the first switch. Thus, with this approach heavy flows can be completely missed.
[0033] Another issue with the above solution is that, similarly to HashPipe, it requires both checking the ID first to find out if the ID is in the table, and thereafter checking the counters, in order to determine if the counter in the received packet is larger than the counter locally stored for the same ID in the local top-k table, which requires accessing the IDs earlier in the pipeline, before handling the counters to aggregate their counts if the IDs match. However, if there is a need to remove flows with a low count from the local top-k table (e.g., to replace a saved flow with counter 100 by a packet with counter 1000), it will require to first compare counts and only then handle the IDs. But if the IDs come before the counters in the pipeline, as the above solution, when proceeding to handle the counters the IDs can’t be accessed without re-circulation.
[0034] It is noted that if re-circulation is to be used, changes might happen to the local top-k table of the switch (by other updates from other switches) while a packet recirculates. For example, if a switch holds a small flow x with counter 100 in its local top-k table, and a packet received from another switch holds a flow y with count 500, and there is no corresponding entry the flowy in the switch's local top-k table. The packet with flowy notes flow x as the smallest flow in the local top-k table of the switch, and it is decided to recirculate the packet inorder to replace the x flow entry in the local top-k table of the switch with packet's y flow data. While the packet recirculates, another packet may be received by the switch from another switch with flow x and count 1000, this packet finds a matching flow ID and increments the counter in the switch's local top-k table to 1100. When the packet with flow y finishes recirculating, it is received in the switch and replaces the x flow entry in the switch's local top-k, it now replaces a flow with a larger counter (x with 1100 compared to y with 500), but it cannot know that without checking the counter, which will be done after already replacing the stored ID in the table and setting it to
[0035] It is noted that Precision does use recirculation for similar purposes, however it does not suffer from this drawback since each increment done is by at most 1, which means the smallest counter cannot change drastically while a packet recirculates and is likely to remain one of the smallest if not the smallest counter in the table.
[0036] In one aspect there is provided a method for detecting global top-k heavy flows in a data network (without a centralized controller). The method comprising, in each switch of the network: (a) continuously maintaining a local top-k table recording, for each of a plurality of locally heavy flows detected in incoming packets of the switch, a flow identifier and a respective packet counter; (b) copying the local top-k table into a snapshot table that remains static during a current detection cycle; (c - an aggregation round) broadcasting entries of the snapshot table to other switches of the network via data-plane packet exchange, and for each entry received from a snapshot table of another switch, if the received flow identifier matches a flow identifier stored in the snapshot table of the receiving switch, adding the received counter to a corresponding counter in a sum table of the receiving switch; and (d - a consolidation round) broadcasting entries of the sum table to all switches of the network via data-plane packet exchange, and for each entry received from a sum table of another switch, hashing the received flow identifier to locate a position in a global top-k table (also referred to herein as consolidation table) of the receiving switch, and replacing a stored entry at the position with the received flow identifier and counter if the received counter exceeds the stored counter at the position, wherein in the global top-stable, counters are stored at earlier pipeline stages than flow identifiers, enabling the counter comparison and conditional flow identifier replacement of step (d) to be performed in a single forward pipeline pass without packet recirculation.
[0037] The method can comprise one or more of the following: copying the local top-k table to the snapshot table at the initiation of each detection cycle while the local top-k table continues to be updated; initializing the sum table as a copy of the snapshot table; and / or at each switch, clearing the global top-k table before the broadcasting of the entries of the sumtable by the switches, and updating the global top-k table using the sum tables broadcasts from all of the switches in the network.
[0038] The method can further comprise copying, upon completion of step (d), the global top-k table into a static query table that is maintained as a reference for top-k flow queries until a next detection cycle completes. The local top-k table can be continuously updated during the next detection cycle concurrently with serving queries from the static query table.
[0039] In some embodiments, the local top-stable, the snapshot table, the sum table, and the global top-k table all employ identical hash functions, such that any given flow identifier maps to the same table position in each of the tables.
[0040] Step (d) of the method can further comprise, upon determining that the received counter equals the stored counter at the position, comparing the received flow identifier with the stored flow identifier and replacing the stored flow identifier with the received flow identifier if the received flow identifier is larger.
[0041] The snapshot table is maintained in some embodiments as a static retransmission source enabling re-sending of snapshot table entries to other switches in the event of packet loss during step (c). Each entry received from another switch during the steps (c) and (d) of the method can be processed in a single forward pipeline pass. Each of the local top-k table, the snapshot table, the sum table, and the global top-k table can comprise a plurality of vectors, each vector comprising a respective hash table storing a plurality of flow identifier and counter pairs, and wherein corresponding vectors across all tables share the same hash function.
[0042] The broadcasting entries of the snapshot table in step (c) and the broadcasting entries of the sum table in step (d) can be performed using a data-plane state sharing mechanism that guarantees delivery of each entry to all other switches without controller involvement.
[0043] This method can be used for finding heavy flows in a computer / data network based on data-plane analysis performed by switches of the network, without requiring packet recirculating or a centralized controller to aggregate count data from the switches. In a simplified configuration the method comprising managing in each switch: a local top-k table of heavy flows detected in incoming packets of the switch; and an aggregation table aggregating counters of flows from the local top-k table of the switch with counters of flows from the local top-k table of at least one other switch in the network having matching IDs. The method may further comprise managing in each switch a consolidation table for holding the higher counts of flows obtained by comparing each entry of the local aggregation top-k table of the switch with a corresponding entry of an aggregation top-k table of at least one other switch in the network. An order of columns of the consolidation table is inversed in someembodiments with respect to the other tables. The method may further comprise recording in each switch the entries of the local aggregation table once the global top-k flows have been identified in a global top-k snapshot table for carrying out queries.
[0044] In another aspect there is provided a system for detecting global top-k heavy flows in a data network. The system comprising a plurality of programmable switches each configured to: continuously maintain a local top-k table recording flow identifiers and respective packet counters of locally heavy flows detected in incoming packets of the switch; create a static snapshot table as a copy of the local top-k table at the initiation of each detection cycle, while the local top-k table continues to be updated; broadcast entries of the snapshot table to other switches of the system via data-plane packet exchange, and update a sum table by adding received counters to counters of matching flow identifiers; and broadcast entries of the sum table to all switches of the system via data-plane packet exchange, and update a global top-k table by replacing stored entries with received entries having larger counters at the hashed position of the received flow identifier, wherein the global top-k table stores counters before flow identifiers in the processing pipeline, enabling single-pass counter comparison and flow identifier replacement without packet recirculation.
[0045] The system can operate entirely in the data plane without packet recirculation.
[0046] In some embodiment each of the switches carries out one or more of the following: update its local top-k table upon arrival of each incoming packet independently of and concurrently with the broadcast of the entries of the snapshot and sum tables; initializes its sum table as a copy of its snapshot table; and / or empties its global top-k table before the broadcasting of the entries of the sum table by the switches, and wherein each switch updates its global top-k table using the sum tables broadcasts from all of the switches in the network.
[0047] The plurality of the switches can be organized into a plurality of clusters, each cluster independently performing steps (a) through (d) to produce a cluster-level global top-k table, and wherein a representative switch of each cluster subsequently participates in a network-wide detection cycle using the cluster-level global top-stable as its local top-k table for the network-wide detection cycle.
[0048] In yet another aspect there is provided a non-transitory computer-readable medium storing instructions that, when executed by a programmable switch in a data network, cause the switch to perform the method of embodiments hereof.
[0049] Functionality of features and component disclosed herein can be carried out utilizing circuitry or processing circuitry including all kinds of processors, integrated circuits (ICs), application specific integrated circuits (ASICs), or field-programmable gated arrays (FPGAs),and / or combinations thereof which are configured or programmed to perform the disclosed functionality. Processors and / or processing circuitries, including transistors and other circuitry, are hardware units programmed to perform various functionalities disclosed herein.BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to understand the invention and to see how it may be carried out in practice, embodiments will now be described, by way of non-limiting example only, with reference to the accompanying drawings. Features shown in the drawings are meant to be illustrative of only some embodiments of the invention, unless otherwise implicitly indicated. In the drawings same reference signs are used to indicate members (configural elements) having identical or corresponding functions and / or structures, and in which:
[0051] Fig. 1 schematically illustrates a system configured according to possible embodiments to find global top-k flows completely in a data plane of a network;
[0052] Fig. 2 demonstrates the operation of the system shown in Fig. 1;
[0053] Fig. 3 depicts results obtained on various traces; and
[0054] Fig. 4 is a flowchart illustrating a process for finding global top-k flows entirely within the data plane, according to some embodiments.DETAILED DESCRIPTION OF EMBODIMENTS
[0055] One or more specific and / or alternative embodiments of the present disclosure will be described below with reference to the drawings, which are to be considered in all aspects as illustrative only and not restrictive in any manner. It shall be apparent to one skilled in the art that these embodiments may be practiced without such specific details. In an effort to provide a concise description of these embodiments, not all features or details of an actual implementation are described at length in the specification. Elements illustrated in the drawings are not necessarily to scale, or in correct proportional relationships, which are not critical. Emphasis instead being placed upon clearly illustrating the principles of the invention such that persons skilled in the art will be able to implement and use embodiments hereof, once they understand the principles of the subject matter disclosed herein. This invention may be provided in other specific forms and embodiments without departing from the essential characteristics described herein.
[0056] The solution of embodiments hereof (also referred to as NODE - Network wide tOp-in the Data planE) can be used to implement systems for finding network-wide top-k flows completely in the data plane of a data network. In embodiments hereof the local top-k flowsare determined and maintained in each switch, and they are then both distributed and aggregated in the data plane, without controller assistance. More specifically, in order to find the network-wide (z.e., global) top-k flows, the system performs three main tasks: 1) it creates a local top-k table in each switch independently; 2) its utilizes Swish tool(s) to share the local top-k tables from each of the switches among all the other switches in the network, in order to find the global counters of local flows; and 3) in each switch, the system merges the information found in all of the local top-k tables, to eventually form a global top-k table in every switch in the network. In embodiments hereof this process is carried out entirely within the data plane and does not require a central controller or collector to aggregate the information. Furthermore, the disclosed embodiments were implemented on a simulated testbed and in P4 code for the Intel Tofino Wedge-100 programmable switch, to evaluate the effect of various parameters on performance and compare it to controller-based solutions.
[0057] In order to solve the above challenges, a deterministic approach is adopted in some embodiments to split the process into three parts:1) Creating a local top-k table - each switch processes the incoming packets to create a local top-k table thereof;2) Global counter aggregation - each switch sends the contents of its local top-k table to all other switches. Each switch then aggregates the counters only for flow IDs that are already found in its local top-stable to find their global counters. In this way, the switch finds and sets the global counts of the top-k flows in its own table; and3) Consolidation of all tables - each switch then sends the contents of its local top-k table, with the aggregated counts to all other switches. Each switch filters the flows with smaller counters, such that only the flows with the higher counters remain in the table. Once this process is completed, each switch holds a global top-stable.
[0058] In embodiments hereof, information sharing between switches is carried out completely in the data plane, using the Swish framework. Thus, the entire process does not require any controller interaction and is performed completely within the data plane.
[0059] The challenges described above can be addressed as follows:- Memory constraints: embodiments disclosed herein don’t require saving all the information from every switch. Instead, in each switch, each packet that arrives from another switch is processed in a streaming fashion (z.e., in a single pass).- Handling split flows: by performing global counter aggregation and then consolidating the tables, the global information is used to calculate the global counter of each flow in order to identify the top-k flows. Accordingly, when the consolidation round betweenthe switches (step 3 above) is conducted, each packet will hold a flow ID and its global counter. Therefore, when the tables consolidation is carried out the entire flow count is considered, and therefore there is no need to worry about making decisions with only partial information.Order of accessing IDs and counters. As will described hereinbelow, different table formats are used in the disclosed embodiments for each stage of information sharing (steps 2 and 3). For global counter aggregation, the ID is placed before the counts in the pipeline, and for table consolidation, the counts are placed before the IDs. By doing so, when calculating global counters for local flows, the ID is accessed first to search for matching flows and thereafter the counter to increment is accessed, if the IDs match. Afterwards, when receiving packets with global counters, a separate table is used wherein the counters are stored before the IDs, so it first compares counters and modifies the ID in the table only thereafter, if the stored counter is smaller than the packet's counter. In the disclosed embodiments, packets recirculation is not carried out at all for packets received from other switches and therefore, there is no need to address issues that arise from using re-circulation.
[0060] For an overview of several example features, process stages, and principles of the invention, the examples embodiments illustrated schematically and diagrammatically in the figures are intended for programmable switches. These programmable switches are shown as one example implementation that demonstrates a number of features, processes, and principles used to find a global top-k flows completely in the data plane, but they are also useful for other applications and can be made in different variations. Therefore, this description will proceed with reference to the shown examples, but with the understanding that the invention recited in the claims below can also be implemented in myriad other ways, once the principles are understood from the descriptions, explanations, and drawings herein. All such variations, as well as any other modifications apparent to one of ordinary skill in the art and useful in network management / monitoring applications may be suitably employed, and are intended to fall within the scope of this disclosure.
[0061] Fig. 1 schematically illustrates a system 10 configured to find a global (e.g., network-wide) top-k flows completely in the data plane. The system 10 utilizes five tables Tl, Tp, Ts, Tg and Tq, that are maintained in each switch la, lb, ...,1M. All of the tables Tl, Tp, Ts, Tg and Tq, can use the same hash functions, such that a packet with ID x will get hashed to the same table location in every one of these tables. The tables maintained in each switch la, lb . I are as follows:• L-lop-k (Tl) table: local top-k table of the switch, whose entries are locally produced by the switch as new packets are received via its respective regular packets stream 4a, 4b,• Snapshot table (Tp): snapshot of local top-k table. Once a local top-k table has been created, its content is sent by packets to all of the other switches in the system (e.g., network) 10. Yet, in order to allow failure handling when sending table information to other switches, the system 10 must maintain a static source of the local top-stable in its Tp table, that is used in the global top-k detection process.• Sum (Ts) table: local top-k table with global counters. In each switch la, lb, ...,1M, this table maintains the global count of the flows found in its local top-k table. This table (Ts) thus aggregates the network-wide counts of the flows that were locally heavy and are found in the local top-k table (Tl).• G-top-k (Tg) table: this is a global top-k table that maintains the global top-k flows across all flows in the system 10 z.e., using the top-k flows information received from the sum-tables Ts across the entire network to determine which flows are globally heavy (whether they were found in the local top-k table or not) and maintains them in this table (Tg).• Query (Tq) table: a global top-k snapshot. Once the global top-k flows have been identified, this information is maintained so that information about the global top-k flows may be used during regular packet processing. This is a static table, that is maintained until a new global top-k table is computed.
[0062] The system 10 can be configured to record the following as parameters:(1) The number of vectors (sub-tables) d, i.e., the number of vectors of (ID, count) pairs in each NODE table. Each vector has a hash table, thus d indicates the number of hash-tables used for each one of NODEs tables. It is noted that d can be identical in every NODE table, and the hash functions used for each vector are identical in all of NODEs tables. That is at any vector z all NODE tables share the same hash function;(2) The size 5 of each vector z.e., the number of (ID, count) pairs saved in each vector. It is noted that 5 can be identical in all vectors and in all tables.
[0063] Operating these tables (Tl, Tp, Ts, Tg and Tq) to find the global top-k flows will be now exemplified with reference to Fig. 2, showing each of the tables and how it interacts with the flows passing through its respective switch. It is noted that Fig. 2 has a single vector per table for simplicity. In practice, each table may have multiple vectors, each holding a number of pairs of IDs and counters.
[0064] (z) Creating a local top-k T1 table: NODE first finds the local top-k flows of each switch. The local top-k table T1 maintains the local top-k flows of packets that traverse the switch z.e., regular packet stream 4a. Accordingly, every packet that traverses the switch is processed by the local top-k process / algorithm (e.g., Precision, which can run on programmable switches and create the same table format that NODE uses), and the flow ID is inserted into this table accordingly. This table (Tl) continuously maintains the top-k flows. In the non-limiting example shown in Fig. 2, 'Switch T la has flows fl,f2,f5 in its local top-k table (Tl), while 'Switch 2' lb has fl,f3,f4 in its local top-stable (Tl).
[0065] (zz) Global counter aggregation: In each switch la, lb,..., In, NODE sends the local top-k information to all other switches (referred to herein as aggregation-round). NODE first copies the contents of the local top-k Tl table into the local snapshot table Tp of the switch. This table will thereafter remain static throughout the process of finding the global top-k flows. There are two main reasons for maintaining the snapshot table Tp static. First, NODE cannot send the entire snapshot table Tp at once to all of the switches. The snapshot table Tp is sent in parts and therefore needs to remain static to avoid inconsistencies in the data sent to other switches. Second, packets can get lost on the way to the other switches. Therefore, NODE requires maintaining a static snapshot table Tp copy to support potential information sharing failures. Since the local top-k Tl table is continuously updated with every new packet that enters the switch in its respective packet steam 4a, 4b,..., , it cannot support these operations (e.g., sending information to other switches, because this information keeps changing), and thus a second table is used to maintain information sent to other switches.
[0066] The local top-k table (Tl) is updated continuously and independently upon arrival of each incoming packet, concurrently with and regardless of the aggregation and consolidation stages. This continuous updating is the reason the local top-k table (Tl) cannot itself be used as the source for inter-switch sharing, necessitating the static snapshot table (Tp).
[0067] As seen in Fig. 2, the snapshot table Tp in each switch la, lb,...,ln, is an exact copy of the local top-k Tl table right before an aggregation-round is performed. In order to sum up the global counters of local flows, NODE (once again) cannot use the local top-k table Tl that is being modified as new packets arrive in the switch, and it cannot change the snapshot table Tp since it may need to resend the information in case of failure. Therefore, the third table Ts, called the sum table, is used. In Figs. 1 and 2, the sum table Ts is separated from the snapshot table Tp for clarity, but to save space, it can share the same exact IDs of the snapshot table Tp (without changing them) while having its own count values for each flow ID x, which will eventually become the global count of x.
[0068] In order to aggregate the global counts of the local top-k flows, the sum table Ts is initialized to be a copy of the local snapshot table Tp. When an ID and count from another switch are received in the switch, it will check whether the received packet's ID matches an ID that is currently saved in the snapshot table Tp (or in the sum table Ts). If the ID is in the snapshot table Tp (or in the sum table Ts), it will add the received counter to the counter currently held in the sum table Ts. For example, 'Switch 1' la has flow fl with a count of 2000 in the snapshot Tp table. In the aggregation-round it will send this information to 'Switch 2' lb. Since 'Switch 2' lb also has fl entry in the snapshot table Tp, it will add the count that is received (z.e., 2000) to its own count such that the sum table Ts now has a count of 2300 for fl. If the ID is not in the snapshot table Tp (or in the sum table Ts), nothing is done. For example, flow f4 is only found in 'Switch 2' lb. When the information about f4 reaches 'Switch 1' la in the first round, it is disregarded.
[0069] Once all packets from the aggregation-round have been received from all switches la, lb,. ..,1M, the sum table Ts becomes a static table. This means that the sum table Ts itself can be used to send data to other switches without having to create a copy of it. However, this also means that changes cannot be made to the sum table Ts at this stage, because information of the sum tables Ts is received from other switches. It is noted that at this point the sum table Ts holds the global counter for each local flow, as seen in Fig. 2.
[0070] (Hi Consolidation of all tables: once all counters of each of the flows have been aggregated in tables Ts of the switches la, lb, ...,1M, NODE is ready to consolidate the Ts tables and determine which flows are the global heavy flows. In each switch la, lb,..., IM, NODE sends the data from the sum table Ts to all other switches. This step is called the consolidation-round. NODE uses the fourth table for this process, the g-top-k Tg. As seen in Fig. 2, the Tg table is structured differently from the other tables as its counters are placed before its IDs. This allows NODE to first compare the counters and only thereafter to handle the IDs. The g-top-k table Tg starts as an empty table, it does not copy the local sum table Ts values, but instead treats them as if they were input packets arriving from another switch.
[0071] When processing a packet containing information from a sum table Ts, from other switches, or from the switch itself, it uses the flow ID to find the location it is hashed to (like it would do in other tables), and then compares the packet's counter with the respective counter saved in its g-top-k table Tg. If the packet's counter is larger than the counter in the g-top-k table Tg, the packet will replace the flow ID and count values in the g-top-k table with its own value. Since in the g-top-k table Tg the counter is located before the ID in the pipeline, the packet will first replace the counter and then replace the ID. The packet can then maintain theID and counter that were removed from the sum table Ts and use those in the next vector in the table (using the new ID for the hash function and comparing counters using the new counter).
[0072] Proceeding with the non-limiting example shown in Fig. 2, assuming that for each switch, the g-top-k table Tg starts as a copy of the sum table Ts (z.e., the values from its own sum table Ts were processed first and populated the g-top-k table Tg, and only then it starts processing Ts packets from other switches), it is seen that in the second slot of 'Switch 1' la (which f4 and 12 are hashed into), because the counter of flow f4 from the sum table Ts of 'Switch 2' lb, is larger than the respective counter in the Tg table of 'Switch 1' la, it replaces the values of the ID and the counter, so the Tg table of 'Switch 1' la holds (f4, 600) in its ID and counter values. It is noted that if the number of vectors d > 1 (unlike Fig. 2, in which d = 1), the packet will continue to the next vector of the table with the values (12, 500) (this also means it uses 12 for the hash table in the next vector).
[0073] Similarly, in 'Switch 2' lb, flow f5 from the sum table Ts of 'Switch 1' la replaces the flow 13 stored in the third slot of the Tg table of 'Switch 2' lb, their IDs are both hashed to, and the packet continues processing in 'Switch 2' lb with (13, 100). If the packet's counter is smaller than the viewed counter, it will not change the counter nor the ID, which in the example of Fig.2, where in 'Switch 1' la, 13 of the sum table Ts of 'Switch 2' lb does not change f5 of the Tg table of 'Switch 2' lb, and in 'Switch 2' lb, 12 of the sum table Ts of 'Switch 1' la does not change f5 of the table Tg of 'Switch 2' lb.
[0074] In order to get identical global top-k in every switch la, lb,..., In, in the system 10, in some embodiments NODE does an additional comparison of the IDs. If the counters are identical NODE will compare the packet's ID with the saved ID. If the packet's ID is larger, it will switch the IDs. If the IDs are identical, the packet will stop processing to avoid replacing other counters in the table in different vectors and creating multiple copies of the same heavy flow. As seen in Fig. 2, both switches la, lb hold fl in their respective sum tables Ts, and thus a copy of fl will be received (with the same global counter) from each of these switches. At the end of the Consolidation round it is expected that each switch holds the global top-k heavy flows in its g-top-k table Tg.
[0075] It is noted that even though low frequency IDs are filtered in g-kop-k table Tg, they are filtered according to the locations they are hashed to. In Fig. 2, even though 12 has a larger counter compared to f5, they are hashed to different locations and are compared to different flows, which results in f5 remaining in the table in the example while 12 is filtered. However heavy flows are less likely to be filtered with large enough tables with additional vectors.
[0076] It can be proved that at the end of the consolidation-round all switches hold an identical global top-k flows in their Tg table (as demonstrated in Fig. 2), by proving that all packets received with the same ID in the consolidation round will always hold the same count, and also that at the end of the consolidation round, each (ID, counf) saved in the g-top-k table Tg could not have been saved in a different vector in the table. It can be thereafter concluded that all switches hold an identical global top-k flows table Tg. The proof is omitted herein for the sake brevity.
[0077] Lastly, NODE needs to maintain a table of the global top-k table Tg that may be queried as needed. Thus, the fifth query table Tq is needed, which is a snapshot of the g-top-k table Tg at the end of a complete NODE cycle. Once NODE finishes one iteration of creating a global top-k table Tg, it starts another iteration to keep the tables up to date. Since the information sharing process in embodiments hereof is based on Swish, it can identify when an information sharing round ended, at which time it starts the next round of determining the global top-k flows. NODE uses the same process and similarly uses it to decide when to switch from the aggregation-round to the consolidation round, as well as after finishing the consolidation-round and starting the next iteration of NODE (aggregation-round of the next iteration).
[0078] Fig. 4 is a flowchart illustrating the NODE process for finding global top-k flows entirely within the data plane, according to some embodiments. In step si, a regular packet stream arrives at the switches of the network. In step s2, each switch builds and continuously maintains a local top-k table (Tl) from its incoming packet stream, recording, for each of a plurality of locally heavy flows detected in the incoming packet stream of the switch, a flow (ID) and a respective counter for the locally heaviest flows e.g., using the Precision algorithm, or another algorithm complying with the feed-forward pipeline constraints of programmable switches. In embodiments hereof, the local top-k table (Tl) is updated upon arrival of each incoming packet continuously and in parallel with all other steps si, and s3 through s8, of the NODE process.
[0079] In step s3, each switch copies its current local top-k table (Tl) into a snapshot table (Tp). The snapshot table (Tp) remains static throughout steps s4-s7 of the current NODE iteration / cycle. Maintaining a static snapshot table (Tp) in each switch serves two purposes: (1) it ensures consistency of the data transmitted in parts to other switches during the aggregation round / stage, since the local top-stable (Tl) continues to be updated by incoming packets during transmission; and (2) it provides a reliable static source for potential retransmission in the event of packet loss during data-plane sharing. As indicated by the feedback arrow in Fig. 4, step s3 is the entry point for each new NODE detectioniteration / cycle, and may be after step s7, once the consolidation round / stage of a previous cycle has completed.
[0080] Steps s4 and s5 together constitute the aggregation round / stage. In step s4, each switch broadcasts the contents of its snapshot table (Tp) to all other switches in the network via data-plane packet exchange e.g., using the Swish data-plane sharing framework z.e., without any controller involvement. In step s5, each switch processes the received entries from the snapshot tables (Tp) of other switches to update its sum table (Ts). The sum table (Ts) is initialized as a copy of the snapshot table (Tp), sharing the same flow identifiers while maintaining its own counter values. For each received (flow ID, counter) pair, the receiving switch checks whether the received flow identifier (ID) matches a flow identifier stored in its own snapshot table (Tp).If a matching flow ID is found, the received counter is added to the corresponding counter in the sum table (Ts). If no match is found, the received entry is discarded. Upon completion of the aggregation round / stage, the sum table (Ts) of each switch holds the global counter for each flow that was locally heavy in that switch.
[0081] Steps s6 and s7 together constitute the consolidation round / stage, also performed entirely in the data plane without controller involvement. A key feature of the consolidation round / stage is that the global top-k table (7g) stores counters at earlier pipeline stages than flow identifiers (IDs) i.e. , an inverted column order relative to the other tables, enabling each switch to first compare counters and only thereafter handle flow IDs. In step s6, each switch broadcasts the contents of its sum table (Ts) to all other switches of the network via data-plane packet exchange e.g., using the Swish data-plane sharing framework. In step s7, each switch processes entries received from the sum tables (Ts) of other switches to update its global top-stable (Tg).
[0082] For each received (flow ID, counter) pair, the receiving switch uses the received flow ID to locate the corresponding position in the global top-k table (Tg) via the shared hash function, and compares the received counter with the counter stored at that position in the global top-k table (Tg). If the received counter is larger, the switch replaces the stored entry (first replacing the counter, then replacing the flow ID, in accordance with the inverted column order of the global top-k table Tg) with the received values. If the received counter is equal or smaller, the stored entry is retained. In some embodiments, if the received and stored counters are identical, the flow IDs are additionally compared (e.g., numerically), and the larger flow ID prevails. If the flow IDs are also identical, the packet can stop processing to avoid creating multiple copies of the same flow in different vectors of the table. This additional comparison ensures that all switches converge to an identical global top-k table (Tg) at the end of the consolidation round.
[0083] In (optional) step s8, each switch copies the final contents of its global top-k table (Tg) into a query snapshot table (Tq), which remains static and serves as the reference for responding to global top-k queries until the next NODE iteration / cycle completes. Step s3 of the next detection cycle may be initiated concurrently with step s8. Following (optional) step s8, the process returns to step s3 to commence the next NODE iteration / cycle, ensuring continuous refreshing of the global top-k information.
[0084] For the sake of clarity, it is noted that step s2 is carried out continuously and in parallel with the other steps, si, and s3 through s8. Accordingly, the local top-k table (Tl) is continuously updated by incoming packets regardless of and concurrently with all other steps of the NODE process. Steps s3 through s8 are performed sequentially within each detection cycle (steps s3-s8), with each switch advancing from one step to the next upon receiving the required data from other switches of the network. Step s3 of a new detection cycle (s3-s8) may be initiated after the previous cycle finished step s7 z.e., once the consolidation round of the previous cycle has completed
[0085] Evaluation of NODE had been performed for various performance metrics, and compare NODE to controller based approaches. It was shown that NODE achieves a recall rate of over 95% of the top-k flows with at most 288KB of memory for NODE'S tables. NODE was implemented in P4 code for the Intel Tofino Wedge- 100 programmable switch, using ~ 2000 lines of code, showing the resource usage of switch resources.
[0086] A network of up to 100 switches had been simulated using python and C++ to simulate NODE'S operation. The local top-k algorithm used by NODE in all evaluations is Precision, which has been implemented and incorporated into NODE. All of NODE'S tables were comprised of two vectors (d = 2) with a varying vector size 5. The size of these vectors was identical network-wide. The associated hash tables were also identical between different tables in NODE'S run (L-top-k Tl table, G-top-k Tg table, etc.). d= 2 vectors were used for each of NODE'S tables due to results in [R. B. Basat el al “Randomized admission policy for efficient top-k, frequency, and volume estimation" IEEE / ACM Transactions on Networking, vol. 27, no.4, pp. 1432-1445, 2019] showing that Precision does well with only 2 vectors, in addition to memory concerns. K = 128 (the size of the table, assuming that 128 heavy flows are to be found) was chosen for all tests, while other parameters had been varies.
[0087] Two types of traces were used:1) synthesized traces with different Zipfian distributions, each containing 100M packets and 10M unique flows. The distributions used to generate the traces were a=0.6, 0.8 and 1.0 (Figs.3A, 3B and 3C, respectively).2) A trace of real traffic, namely the CAIDA UCSD Anonymized Internet Traces - 2018, 2019 (Fig.3D). In order to simulate large networks merged consecutive CAIDA traces were merged to create larger traces.
[0088] In order to challenge NODE the stream between the switches was split in the following fashion: the top 128 flows were split uniformly across all switches, meaning whenever a packet that belongs to the top-k flows arrives it can go to any switch with an equal chance. The rest of the flows have dedicated switches, meaning all their packets reach the same switch. Such a split is harder for NODE since it would increase the chances of missing the larger flows in some of the local top-k tables, making it harder for NODE to identify them as heavy flows. Additional flow affinities (e.g., 50% or 80% flow affinity to a certain switch) were tested, and it was found that NODE behaves better with higher affinity as the local top-k tables are able to provide a more accurate estimate of the flow counts and the aggregation process is less significant.
[0089] A key observation in the evaluations was that larger network sizes generally have worse results than smaller network sizes, however, given a large enough table size (ie., larger 5) NODE performs well. In some cases, the larger network actually performs better, which may be due to the fact that the overall saved information across the entire network is larger, enabling NODE to monitor more flows and thus get better results. Figs.3A-F show the results on various traces. It is noted that NODE on a single switch is simply running Precision on one switch, since there is no network-wide information to merge. In comparison, even with a lot more switches (and thus a more harsh split of the top-k flows), NODE can achieve a good result. It is assumed that due to how NODE operates, more switches result in a ‘larger’ network-wide table that is used to store more flows, so while ‘losing’ data due to the split, there is also more network-wide ‘memory’ to store more data in.
[0090] Furthermore, as results are being observed with increasing Zipfian (Zipf) distributions, it is seen that NODE doesn’t need a large table to reach a high recall with Zipfian distribution of 1.0 (Fig.3C). In Fig.3 there are also results of an attempt to use a clustering option to reduce the number of NODE messages in the network, where NODE is first run in sub-networks (clusters) and then it is run again using cluster representatives. An extended analysis of clustering is omitted for the sake brevity.
[0091] NODE has been compared with a straw-man approach, wherein each switch maintains a local top-k table, and periodically sends this information to the controller (or the controller retrieves the information from the switch). The controller gathers all the information from all of the switches and then computes a network-wide top-k table Tg, which it then sends back toeach switch la, lb, ...,1M. The controller implementation is not limited in memory or computation and may thus maintain all of the information from all of the switches and process them in a nonstreaming manner. The comparison of how well they identify global top-k is shown in Figs. 3E-3F. As sees, NODE achieves a recall that is very close to that achieved by the controller despite the fact that it functions within the confined resources and processing capabilities of the data plane.
[0092] It is also wished to compare NODE to the controller based solution of FlowRadar (Y. Li el al 2016). Instead of attempting to emulate FlowRadar and potentially making a weaker version of it, NODE was compared to the results shown in the FlowRadar paper. FlowRadar shows that even with perfect hash tables with no collisions FlowRadar requires more than 2MB in each switch to support 100k unique flows. It further shows that FlowRadar requires over 20MB in each switch to support IM unique flows.
[0093] On the other hand, when looking at NODE'S memory usage, the largest table size used in the evaluation performed is 8192 cells in a single table (two vectors with 5 = 4096 cells each). Each cell has two parts: one for the flow ID and one for the counter, each of them using 4 bytes. This means that each table needs 64KB of memory. Since a total of five tables is used in some NODE embodiments, 4 of them use a full table of 64KB, and the turn table Ts uses only 32KB (since it does not store flow IDs, and instead uses the flow IDs maintained in the snapshot table Tp), the total memory size used per switch for NODE'S tables is 288KB. For the synthetic streams 10M different flows were used, and in the merged Caida dataset there are almost 6M different flow IDs. In both, NODE was able to achieve good results with only 288KB memory in every switch, which is significantly less memory than that required by FlowRadar.
[0094] NODE was implemented in P4 code for the Intel Tofino Wedge-100 programmable switch. The P4 prototype uses d= 2 vectors in each table with 8192 cells each (5 = 4096 cells in each vector) to match the simulation’s variables. The main resource usage of NODE is as follows: The implementation used all 12 stages available in the switch, that is due to the multiple tables used. The tables also need to be placed in a specific order to enable the functionality of NODE (i.e., snapshot table Tp in later stages then local top-k table Tl).Similarly, ALUs (arithmetic logic units) are heavily used and meter ALU usage averages at 64.6%. SRAM usage averaged at 12.1%, it increases to 28.1% if 8 times more cells are used in each vector (5 = 32768). Hash Distance Unit averaged at 33.3%. It is noted that the same hash functions are used across all of the tables, therefore limiting the amount of hash units needed.
[0095] Overall, Meter ALUs are heavily used, yet for other switch resources no more than 34% is used. It is important to note that this resource usage includes all of the NODE functionality, including any relevant components of Precision or Swish.
[0096] It should be understood that throughout this disclosure, where a process or method is shown or described, the steps / acts of the method may be performed in any order and / or simultaneously, and / or with other steps / acts not-illustrated / described herein, unless it is clear from the context that one step depends on another being performed first (e.g., as for steps s3 through s8 of the NODE process, which are performed sequentially within each detection cycle). In possible embodiments not all of the illustrated / described steps / acts are required to carry out the method.
[0097] Features of the system and method disclosed herein can be implemented in primarily software or in hardware using, for example, hardware components such as application specific integrated circuits (ASICs) or field-programmable gated arrays (FPGAs). In yet another embodiment, features of the invention can be implemented using a combination of both hardware and software.
[0098] As described hereinabove and shown in the associated figures, the present invention provides techniques for determining top-k flows entirely within the switches' data plane. While particular embodiments of the invention have been described, it will be understood, however, that the invention is not limited by the embodiments as shown in the drawings and / or as described in the specification, since these are given by way of example only and not by way of limitation, and since modifications may be made by those skilled in the art, particularly in light of the foregoing teachings.
Claims
CLAIMS:
1. A method for detecting global top-k heavy flows in a data network, the method comprising, in each switch: (a) continuously maintaining a local top-stable recording, for each of a plurality of locally heavy flows detected in incoming packets of the switch, a flow identifier and a respective packet counter; (b) copying the local top-k table into a snapshot table that remains static during a current detection cycle; (c) broadcasting entries of the snapshot table to other switches of the network via data-plane packet exchange, and for each entry received from a snapshot table of another switch, if the received flow identifier matches a flow identifier stored in the snapshot table of the receiving switch, adding the received counter to a corresponding counter in a sum table of the receiving switch; and (d) broadcasting entries of the sum table to all switches of the network via data-plane packet exchange, and for each entry received from a sum table of another switch, hashing the received flow identifier to locate a position in a global top-k table of the receiving switch, and replacing a stored entry at said position with the received flow identifier and counter if the received counter exceeds the stored counter at said position, wherein in the global top-stable, counters are stored at earlier pipeline stages than flow identifiers, enabling the counter comparison and conditional flow identifier replacement of step (d) to be performed in a single forward pipeline pass without packet recirculation.
2. The method of claim 1, comprising updating the local top-k table upon arrival of each incoming packet continuously and in parallel with steps (b) through (d).
3. The method of claim 1 or 2, comprising copying the local top-k table to the snapshot table at the initiation of each detection cycle while the local top-k table continues to be updated.
4. The method of claim of any one of the preceding claims, comprising initializing the sum table as a copy of the snapshot table.
5. The method of claim of any one of the preceding claims comprising, at each switch, clearing the global top-k table before the broadcasting of the entries of the sum table by the switches, and updating the global top-k table using the sum tables broadcasts from all of the switches in the network.
6. The method of claim of any one of the preceding claims, further comprising copying, upon completion of step (d), the global top-k table into a static query table that is maintained as a reference for top-k flow queries until a next detection cycle completes7. The method of claim of claim 6, wherein the local top-k table continues to be updated during the next detection cycle concurrently with serving queries from the static query table.
8. The method of any one of the preceding claims, wherein the local top-k table, the snapshot table, the sum table, and the global top-k table all employ identical hash functions, such that any given flow identifier maps to the same table position in each of said tables.
9. The method of any one of the preceding claims, wherein the step (d) further comprises, upon determining that the received counter equals the stored counter at said position, comparing the received flow identifier with the stored flow identifier and replacing the stored flow identifier with the received flow identifier if the received flow identifier is larger.
10. The method of any one of the preceding claims, wherein the snapshot table is maintained as a static retransmission source enabling re-sending of snapshot table entries to other switches in the event of packet loss during step (c).
11. The method of any one of the preceding claims, wherein each entry received from another switch during steps (c) and (d) is processed in a single forward pipeline pass.
12. The method of any one of the preceding claims, wherein each of the local top-k table, the snapshot table, the sum table, and the global top-k table comprises a plurality of vectors, each vector comprising a respective hash table storing a plurality of flow identifier and counter pairs, and wherein corresponding vectors across all tables share the same hash function.
13. The method of any one of the preceding claims, wherein broadcasting entries of the snapshot table in step (c) and broadcasting entries of the sum table in step (d) are performed using a data-plane state sharing mechanism that guarantees delivery of each entry to all other switches without controller involvement.
14. The method of any one of the preceding claims, wherein the plurality of switches is organized into a plurality of clusters, each cluster independently performing steps (a) through (d) to produce a cluster-level global top-k table, and wherein a representative switch of each cluster subsequently participates in a network-wide detection cycle using the cluster-level global top-k table as its local top-k table for said network- wide detection cycle.
15. A system for detecting global top-k heavy flows in a data network, the system comprising a plurality of programmable switches each configured to:continuously maintain a local top-k table recording flow identifiers and respective packet counters of locally heavy flows detected in incoming packets of the switch;create a static snapshot table as a copy of the local top-k table at the initiation of each detection cycle, while the local top-k table continues to be updated;broadcast entries of the snapshot table to other switches of the system via data-plane packet exchange, and update a sum table by adding received counters to counters of matching flow identifiers; andbroadcast entries of the sum table to all switches of the system via data-plane packet exchange, and update a global top-k table by replacing stored entries with received entries having larger counters at the hashed position of the received flow identifier,wherein the global top-k table stores counters before flow identifiers in the processing pipeline, enabling single-pass counter comparison and flow identifier replacement without packet recirculation.
16. The system of claim 15, wherein the system operates entirely in the data plane without packet recirculation.
17. The system of claim 15 or 16, wherein each of the switches updates its local top-stable upon arrival of each incoming packet independently of and concurrently with the broadcast of the entries of the snapshot and sum tables.
18. The system of any one of claims 15 to 17, wherein each of the switches initializes its sum table as a copy of its snapshot table.
19. The system of any one of claims 15 to 17, wherein each of the switches empties its global top-k table before the broadcasting of the entries of the sum table by the switches, and wherein each switch updates its global top-k table using the sum tables broadcasts from all of the switches in the network.
20. A non-transitory computer-readable medium storing instructions that, when executed by a programmable switch in a data network, cause the switch to perform the method of any one of claims 1 to 14.
