Abstract
Request patterns in peer-to-peer networks are not uniform, and the cost of communication depends on the traffic flows among peers. This paper illustrates how processes in an overlay network can use the information about traffic flow pattern and spontaneously adjust the topology to minimize their communication costs. Four different selfoptimization protocols are presented. The selfish protocols allow peers to modify their routing tables to suit their individual needs, and are easy to implement, but the improvements are limited. Compared to this, the altruistic protocols that allow peers to adjust the routing tables based on the needs of other processes, promise a better performance. Since selfish peers may not comply, a penalty mechanism is proposed to discourage selfishness.