Abstract
BitTorrent is a popular file distribution system based on peer-to-peer networking model. Files are partitioned into pieces which can be downloaded from multiple peers in parallel so as not to contend for limited server resources. A peer uploads pieces to other peers while it simultaneously retrieves incomplete pieces from other peers at the same time. However, the heterogeneous of peer capacities and optimistic unchoking algorithm of BitTorrent results into unfairness problem regarding the volume of data that each peer serves, thus discouraging users to share their resources. In this thesis, we suggest to ensure fairness by keeping peers with similar capacity to cooperate and restricting the use of unbalanced optimistic unchoking. Instead of aggressively hunting for better peers, a peer tries to find similar peers and keeps cooperating with those peers as long as they have pieces to reciprocate each other. Optimistic unchoking is restricted to be used only when a peer predicts the unavailability of cooperating peers. Ensuring a peer to cooperate with similar peers easily achieves fairness and provides incentives for a peer to open resources in order to cooperate with better peers. Simulation results show that the proposed scheme effectively achieves fairness among peers in terms of upload and download ratio, while maintaining equivalent download performance as original BitTorrent.