Prior work on the provisioning required for a P2P streaming server has been very lim-ited. The simulations conducted by GridMedia [69] show that the server bandwidth of 3 times the rate of the stream is sufficient. BarGossip [34] requires that a server
has enough bandwidth to send each update to 5% of the user population, which could mean a lot of bandwidth for a large user population. Neither of these works considers the server bandwidth required to deal with free-riders or malicious users that do not forward updates. FairStream, on the other hand, defines an absolute minimum bound of server bandwidth required for a given percentage of free-riding or malicious users.
FairStream also implements a heuristic that allows a server with limited resources to send more targeted updates to the users. We show that with a small server over-provisioning above this minimum bound FairStream is able to deliver a good quality stream to contributing users.
FairTorrent Algorithm for Peer-to-Peer File-sharing
In this chapter, we present the FairTorrent algorithm that achieves fair data exchange in a P2P file-sharing network. The algorithm runs in a fully distributed manner without the requirement of any global service that directs the data exchange among the participating peers. The algorithm is resilient against malicious peers such as free-riders. FairTorrent requires no protocol overhead beyond the overhead incurred by standard file-sharing systems. Moreover, FairTorrent achieves fairness on a very small time scale, allowing a newly joining peer to achieve a fair data exchange very quickly upon joining the network.
3.1 Definition of Fairness
In a P2P network, the available bandwidth can be categorized into two main com-ponents: altruistic and non-altruistic. The altruistic bandwidth is the bandwidth donated by certain peers for free to other peers, without expectation of reciprocation.
This may occur, for example, when a given peer has already finished downloading a file, and may linger in the system uploading the file to other peers, but receiving nothing in return. The altruistic bandwidth may also come from servers, that were provisioned in the system, to increase the amount of available upload bandwidth.
The non-altruistic upload bandwidth may be given by a peer in the hope of being rewarded by the network with some amount of download bandwidth in return. For example, in BitTorrent [13] a peer constantly searches for better peers by allocating a portion of its upload bandwidth to new peers in the hope of finding peers who will reciprocate at a faster rate.
Typically a peer’s allocation of its upload bandwidth may have little or no effect on the amount of altruistic or free download bandwidth it receives from the network.
However, by carefully selecting the peers it uploads to and carefully selecting the allocation of its upload bandwidth to each neighbor a peer may change the amount of the non-altruistic download bandwidth that it received in return [49].
The problem with BitTorrent’s approach is that the exchange of the non-altruistic bandwidth is unfair. For a high-uploading peer, for example, it may take a long time to discover a subset of other like-uploading peers inside a BitTorrent network to ex-change data with [49]. At the same time, free-riding peers, peers that contribute little or no upload bandwidth, can often receive the same amount of download bandwidth as high-uploading peers [39]. Finally, a BitTorrent peer is often willing to reciprocate to a neighbor at a higher rate than what it receives, a weakness that is exploited by BitTyrant [49].
FairTorrent addresses exactly the problem of allocation and sharing of the non-altruistic bandwidth and makes sure that the allocation of the non-non-altruistic band-width is fair. By fair allocation, we mean that a peer receives the non-altruistic bandwidth equal to the rate at which it contributes non-altruistic bandwidth to other
peers. Moreover, this fairness is achieved on a small time-scale granularity, allowing a peer to achieve a very fast convergence, or a matching download rate, upon its entry into the system. FairTorrent avoids long discovery times, and even a high-uploading peer can begin receiving a download rate of non-altruistic bandwidth almost immedi-ately, assuming that there is a subset of other peers, which in combination can match its high-uploading rate.
We formalize this notion as follows. Let µi be the upload rate of peer i. If the peer i is still downloading a file we assume that it contributes all of its upload bandwidth non-altruistically in the hope of being rewarded with more download bandwidth in order to increase its download speed. The download rate of peer i, diwill consist of two components: the download rate due to altruistic sources, dai and the download rate due to non-altruistic sources, dni, where di = dai + dni. The FairTorrent algorithm makes sure that the download rate component due to the non-altruistic sources, dni, quickly convergence to the peer’s upload rate, µi.
Under the FairTorrent algorithm, peers who contribute altruistic bandwidth split this free bandwidth evenly among their neighbors. If there is a total of n peers downloading a file, and the total amount of altruistic bandwidth available in the system is Ba, then on average the altruistic bandwidth component, dai = Ba/n for peer i. Thus, the total download rate of peer i converge to the following quantity:
di = dni+ dai = µi+ Ba
n (3.1)
We assume that a peer’s link is asymmetric, with download bandwidth capacity much higher than its upload capacity. More specifically, the download capacity is sufficient to be able to absorb an additional dai of the altruistic bandwidth compo-nent. This assumption is in line with bandwidth contracted from most ISP(s), where
the download capacity provided by an ISP is typically two to five times the upload capacity.
There may be a number of ways that fairness could be defined depending on the objective, and there may be a number of ways in which both the altruistic and non-altruistic bandwidth to be allocated. For example, [18] splits all of the down-load bandwidth evenly among participants, to ensure that everyone attains the same average download time regardless of the peers’ contribution. Early BitTorrent and Azureus implementations would allocate more altruistic bandwidth to the peers with higher download rate. It was believed that such peers could help distribute the down-loaded data faster. [11] allocates more altruistic bandwidth to freshly joining peers in order to infuse them with some data that they could immediately start trading with other peers. One could also imagine a scheme where the combined altruistic and non-altruistic bandwidth is split in proportion to a peer’s contribution.
We do not presume to offer an ultimate definition of fairness in P2P file-sharing networks. However, FairTorrent offers a new and elegant solution for the incentives of the non-altruistic bandwidth contribution, and allows each peer to receive a match-ing non-altruistic reciprocation for its contribution. FairTorrent specifically tackles the problem of the non-altruistic bandwidth allocation, because this has been a very hard problem in P2P file-sharing systems. By guaranteeing a very fast convergence of the non-altruistic download bandwidth received by a peer to the peer’s upload contribution, FairTorrent provides very strong incentives for a peer to maximize the upload contribution to the network, and therefore maximizing, dni, its own download rate due to the non-altruistic contributions. It is logical to assume, that as FairTor-rent client sees wider adoption peers will want to increase their upload capacity in order to increase their download rate, by increasing the non-altruistic download rate component.
As will be discussed in Section 3.2.2, FairTorrent chooses to allocate the altruistic bandwidth evenly among all peers, as the altruistic peers, or seeds, send data blocks in a round-robin to all of the peers they are connected to. This type of allocation allows newly-joining peers to obtain at least some blocks very quickly and enables them to begin trading with other peers. We argue, that since the altruistic bandwidth is given freely, not in response to peers’ contributions, it is fair to split the altruistic bandwidth evenly.