Abstract:Based on the characteristics of IP address, this paper proposes an algorithm which can statically measure inter-peer distance. And considering these factors such as coherence of peer contents, the locality of peer, stability and transmission capacity, we propose an algorithm of choosing service node based on the characteristic of data transmission delay of inter-peer. Simulation results show that our algorithm can enhance performance of P2P system and optimize the routing of P2P system.