BitTorrent采用基于速率的Tit-For-Tat(Rate-based TFT)阻塞算法和乐观激活(Optimistic Unchoke,OU)算法为节点选择策略:上传节点采用Rate-based TFT算法选择为自身提供文件块上传速度最快的4个请求节点为下载节点,采用OU算法随机选择其他1个请求节点为下载节点。BitTorrent中Rate-based TFT算法只考虑邻居为上传节点所上传的文件块数即直接贡献,资源利用率不高,不能有效保证上传/下载之间的公平性。提出一种基于全局贡献的节点选择策略(Contribution-based TFT),从直接贡献和间接贡献(即对其他节点所上传的文件块)两方面来考虑某段时间内节点的全局贡献,贡献越多,获取下载服务的优先权限越高。模拟实验表明,基于全局贡献的节点选择策略提高了上传配额利用率,减少了文件下载时间,并保证了公平性。
The BitTorrent peer-to-peer content distribution system adopts the Rate-based Tit-For-Tat(Rate-based TFT) choke algorithm and Optimistic Unchoke(OU) algorithm as a peer selection strategy:Each upload peer employs the Rate-based TFT algorithm to preferentially choose four requesting peers with the highest blocks uploading rates for itself and employs the OU algorithm to randomly choose another requesting peer as its download peers.However,the upload peer which uses the rate-based Tit-For-Tat choke algorithm only considers neighbor's direct contribution that is the number of uploading blocks for itself.The strategy restriction not only has low resource utilization rate but also can't effectively ensure fairness between download and upload.In order to solve the problems above,this paper proposes a global Contribution-based(Contribution-based TFT)peer selection strategy:Peer's global contribution is calculated in a period of time from both direct contribution and indirect contribution(That is the number of uploading blocks for other peers).In reality,more contribution is equal to higher priority to download blocks.Experimental results show that the contribution-based peer selection strategy can improve the resource utility ratio of upload slice and decrease the time consumption for completely downloading the whole file and ensure the fairness in BitTorrent.