Bottleneck Discovery and Overlay Management in Network Coded Peer-to-Peer Systems

M. Jafarisiavoshani, C. Fragouli, S. Diggavi, C. Gkantsidis EPFL EPFL EPFL Labs

Abstract such as rings, or meshes of multicast trees, and route infor- mation on them. Such approaches have the disadvantages The performance of peer-to-peer (P2P) networks depends of imposing topological constraints on the bandwidth usage, critically on the good connectivity of the overlay topology. e.g., embedding trees in the existing network structure. Such In this paper we study P2P networks for content distribu- a problem is hard to optimally solve even with perfect cen- tion (such as Avalanche) that use randomized network cod- tralized control. ing techniques. The basic idea of such systems is that peers An alternate design philosophy is embodied in network randomly combine and exchange linear combinations of the coded P2P systems such as Avalanche [2,3]. Avalanche em- source packets. A header appended to each packet specifies ploys randomized network coding, where peers randomly the linear combination that the packet carries. In this pa- combine their received packets and propagate such linear per we show that the linear combinations a node receives combinations to their neighbors. A peer receiving a suffi- from its neighbors reveal structural information about the cient number of linear combinations solves a system of lin- network. We propose algorithms to utilize this observation ear equations and retrieves the source packets. Thus peers for topology management to avoid bottlenecks and cluster- no longer collect packets routed through pre-specified paths ing in network-coded P2P systems. Our approach is decen- from the source, but instead attempt to collect and propagate tralized, inherently adapts to the network topology, and re- “degrees of freedom” (linear combinations). This approach duces substantially the number of topology rewirings that are dispenses with the need of creating and preserving specific necessary to maintain a well connected overlay. Moreover, routing structures. In fact it can be shown that the opti- this is done passively during the normal content distribution. mal routing problem becomes polynomial-time. Moreover, This work demonstrates another value of using network cod- there is potential for significant gains in network throughput ing and complements previous work that showed network making network coding a very promising paradigm for P2P coding achieves high utilization of the network resources. systems as has been demonstrated in the Avalanche system. However, to optimize the use of these resources, we still need to build a network topology that allows the fastest possible 1 Introduction dissemination of information in a scalable manner. Peer-to-peer (P2P) networks have proved a very successful In both systems, the task of topology management is hin- distributed architecture for content distribution. The design dered by the fact that, the peers need to form overlay network philosophy of such systems is to delegate the distribution connections using underlying physical links whose available task to the participants nodes (peers) themselves, rather than bandwidth are hard to estimate. In this paper we will ar- concentrating it to a low number of servers with limited re- gue that for P2P networks employing randomized network sources. Therefore, such a P2P non-hierarchical approach coding, such as Avalanche, we can use the structure of the is inherently scalable, since it exploits the computing power exchanged packets to passively infer physical link bottle- and bandwidth of all the participants. necks. In particular, the coded packets a node observes from Having addressed the problem of ensuring sufficient net- its neighbors implicitly contain information about the under- work resources, P2P systems still face the challenge of how lying physical link bandwidths. The specific application of to efficiently utilize these resources while maintaining a de- this observation is to use such information to break clusters, centralized operation. Central to this is the challenging prob- using the minimum number of topology rewirings. To this lem of management of the overlay network connecting the end, we propose algorithms that (i) identify and re-connect peers which ensures the fastest possible information dissem- only nodes whose re-wiring leads to breaking of clusters, (ii) ination. The goal is to create a network topology that ef- use a variable number of reconnections, adapting (without ficiently uses the available bandwidth with minimal or no centralized knowledge) to the requirements of the network centralized coordination, and is scalable in the network size. topology, and (iii) are peer-initiated and scalable. The main P2P network solutions (e.g., , , In Section 2 we briefly describe Avalanche, illustrate our , BitTorrent) effectively build complex topologies, proposed approach through a simple example, and position

1 S S our work in the framework of the literature. We then pursue our idea by developing a theoretical framework and algo- (a) (b) rithms in Section 3 and by performing simulation results in Section 4. Section 5 concludes the paper. B B

A C A C 2 Description and Motivation

We start by first briefly reviewing randomized network cod- D D ing, and describing how Avalanche builds the overlay topol- ogy employed for content distribution. We then motivate our Figure 1: The source S distributes packets to the peers A, B, work through an example, and discuss related work. C and D over the overlay network (a), that uses the underly- ing physical network (b). 2.1 Randomized Network Coding Consider a source with n packets to be distributed to a set and reconnect to a new one, asking the registrat to randomly of nodes. In randomized network coding [4], each packet is select the new neighbor from the active peers list. The randomized rewiring Avalanche employs results in a assumed to consist of L symbols over a finite field Fq. This simply means that, for q = 2m, a packet of length mL bits is fixed average number of reconnections per node indepen- dently of how good or bad is the formed network topol- considered to contain L symbols over F2m , where sets of of ogy. Thus to achieve a good, on the average, performance m bits are treated as one symbol over F2m . Nodes in the net- in terms of breaking clusters, it entails a much larger number work perform operations over Fq. The source sends “coded packets”, each packet consisting of a uniform at random cho- of rewiring and requests to the registrat than required, and unnecessary topology changes. sen linear combination of the n packets over Fq. Each packet Clearly the registrat, since it allocates to each peer its has an appended coding vector of size n symbols over Fq, that specifies which linear combination each coded packet neighbors, could keep some structural information, i.e., keep carries. Note that for large L (mL bit packets), the overhead track of the current network topology, and use it to make of n symbols (nm bits) can be made very small. Interme- more educated choices of neighbor allocations. However, the diate nodes in the network recursively and uniformly at ran- information the registrat can collect only reflects the overlay dom combine their collected packets and create new coded network topology, and is oblivious to bandwidth constraints packets that they propagate through the network. Note that from the underlying physical links. Acquiring bandwidth in- the coding vectors a node can create have to belong in the formation for the underlying physical links at the registrat span1 of the coding vectors it has already collected. Once requires costly estimation techniques over large and hetero- a node has collected a set of coding vectors that spans the geneous networks, and steers towards a centralized network n-dimensional space, it has