The Routing Performance of Logarithmic-Hop Structured P2P Overlay
Total Page:16
File Type:pdf, Size:1020Kb
View metadata, citation and similar2011 papers IEEE Conference at core.ac.uk on Open Systems (ICOS2011), September 25?28, 2011, Langkawi, Malaysia brought to you by CORE provided by UM Digital Repository The Routing Performance of Logarithmic-hop Structured P2P Overlay Saiful Khan Abdullah Gani Mahesh Sreekandath Faculty of Computer Science and Faculty of Computer Science and Qualcomm India Pvt. Ltd., Information Technology, University Information Technology, University Hyderabad, of Malaya, Kuala Lumpur, Malaysia. of Malaya, Kuala Lumpur, Malaysia. [email protected] [email protected] [email protected] Abstract— This paper presents an analysis on performance of uses XOR based closeness algorithm to calculate the closest logarithmic degree structured P2P (peer-to-peer) overlay peers and sends parallel lookup messages to multiple buckets. networks. P2P network consist of highly transient peers, where Kademlia routes the messages at complexity of Olog N, peers join and leave the network randomly also known as where N is total number of peers and b is system parameter. dynamic environment. It is, therefore difficult to measure the Kademlia peer employs maintenance algorithm which performance of the parameters in real environment. The design periodically checks the routing buckets through which there of structured overlay networks is fragmented and due to various has not been a lookup since last stabilization. In order to do so designs few simulations have been conducted to compare the Kademlia performs lookup for each bucket’s binary prefix. protocols in dynamic environment. The outcome of the analysis Kademlia only ensures that at least one entry in each bucket is helps the decision in choosing and designing better structured overlay protocol for P2P network. In order to evaluate the alive since last stabilization, where as Chord and Pastry ensures routing performance, this work simulates logarithmic-hop all routing entries are alive and up to date. overlays - Chord, Pastry and Kademlia. The result shows that Structured overlays use its corresponding routing algorithm among Chord, Pastry and Kademlia protocols, performance of and the routing table to route the messages to the destination Kademlia is better than Chord and Pastry with 94.2 - 99% peer. The P2P system consists of peers, where peers join and routing efficiency. Hence, Kademlia architecture is better choice leaves the network continuously. The random join and leave of to implement structured P2P network. peers causes the routing table incorrect and out of date. As a Keywords- Chord, Pastry, Kademlia, DHT and P2P result, the routing timeout and eventually lookup failure occurs. The rate of failure is dependent on the rate of peer join and I. INTRODUCTION leave or mean life time of the peers. On the other hand each structured overlay uses the maintenance algorithm to keep the The popularity of P2P system is increasing rapidly. There is routing table up to date. The correctness of the routing table research focused to design better structured overlay algorithms depends on how frequently the routing table is maintained. for P2P systems, especially Distributed Hash Tables (DHT). In Therefore, the routing performance increases with the increase DHT based systems identifier (Id) for each peer and item is in frequency of maintenance. The asymptotic analysis of generated using hashing technique. DHT maps large set of routing performance of the structured overlay protocols - identifiers into set of peers of the structured overlay in Chord, Pastry and Kademlia are logarithmic. The main distributed fashion; this function is called routing or lookup. challenge is to evaluate the performance in a real environment The structured overlay protocols Chord, Pastry, Kademlia etc. where peers join and leave randomly. A good analysis will use DHT. Chord uses consistent hashing and hashes each peer enable to decide in choosing and designing better structured and key into m-bit circular identifier (Id) space, where m is a overlay for P2P network. In this paper the simulation of Chord, system parameter [1-2]. During lookup Chord peer uses routing Pastry and Kademlia is presented in order to evaluate the table to route the lookup message to the destination peer. The routing performance in P2P network. routing is processed in Olog N complexity, where N is total number of peers. In P2P network the routing table of the peers II. ARCHITECTURE OF THE PROTOCOLS becomes incorrect due to random peers arrival, departure and failure in the network. In Chord peers use periodic stabilization A. Chord mechanism to correct the routing table periodically. Pastry Chord is the first structured P2P overlay protocol which is organizes the peers in 128-bit circular Id space [3]. Pastry uses based on DHT. Chord protocol uses consistent hashing prefix matching to route the messages and ensures that routing technique to map each peer and item (key) to an m -bit of a message is resolved in Olog N complexity, where N is identifier circle [2]. The Ids are drawn from the range 0 total number peers and b is a system parameter. Routing table 2. As shown in Figure 1, the successor of a key and peer of Pastry peer is maintained periodically by exchanging keep- is the immediate next peer in the identifier circle towards alive messages between the neighboring peers. Kademlia clockwise direction. The predecessor of a key and peer is the assigns 160-bit Id to each peer and each Kademlia peer immediate next peer in the identifier circle towards anti- contains list of entries called routing buckets [4]. Kademlia clockwise direction. 978-1-61284-930-0/11/$26.00 ©2011 IEEE 155 2011 IEEE Conference on Open Systems (ICOS2011), September 25?28, 2011, Langkawi, Malaysia Routing table of Chord peer is divided into two parts. The first table completely. Stabilization protocol has two major part consists of its predecessor peer and the second part functions described below: th consists of successor peers. The i entry of routing table of a • peer n contains the address of the peer whose Id is closest to stabilize( ): This function is periodically executed n2 in clock-wise direction. Thus the first entry of routing by each peer to learn about newly joined peers in table of any peer is the address of the successor of that peer. the chord network and update the routing table When a peer issues a key lookup, the lookup message is routed accordingly. through the identifier circle. The peer first checks if the value • fix_fingers(): This function is periodically of the key Id is between its own peer Id and its successor’s peer executed by each peer to correct the polluted Id. If the value of the key Id falls between, the successor is routing table (finger table) caused due to peer returned as the destination peer. Otherwise the lookup message departure from the network. is routed to the numerically closest peer of its routing table. The routing of the lookup message proceeds iteratively or B. Pastry recursively until the destination peer is discovered. Chord takes In Pastry routing table of each peer is organized in Olog N number of steps to route a message to destination proximity metric which uses prefix based matching algorithm peer, where N is the total number peers. Peer failure or to route the messages. Pastry organizes the peers into a 128-bit departure affects the routing correctness. The departure of a circular Id space. Peer Id is generated by hashing the IP address L L peer causes its predecessor peer’s successor pointer invalid, so of the peer. Each peer has leaf set containing successor and this problem is addressed by maintaining a successor list. The predecessors. A peer also has neighborhood set which keeps successor list is stabilized using periodic stabilization track of M peers that are close according to metric other than mechanism. Figure 1 shows an example of routing scenario in the Id space (e.g. network delay). Neighborhood set is used for Chord, where a peer 8 issues a lookup for key-54. Peer 8 maintaining locality properties. Routing table of Pastry peer is invokes the find successor method for this key, this returns the organized into two dimensions with log N rows and 2 1 address of the successor of key-4, and here it is peer 56. Newly joined Chord peer first generates peer Id using consistent entries per row. The 2 1 entries at row n of the routing table refer to a peer whose peer Id shares the present peer’s Id hashing technique. Then the new peer contacts a bootstrapping th peer (an existing peer in Chord network) and issues a lookup. in the first n digits, but whose n 1 digit has one of the th The result of the lookup is the Id of its successor peer. Peer 2 1 possible values other than the n 1 digit in the uses periodic stabilization mechanism to correct its routing present peer’s Id. Upon receiving a key lookup a peer first checks the numerically closest peer of the key Id. Then the peer routes the lookup to the numerically closest peer within log N hops. The routing process has two main steps. At first the peer received the key lookup checks whether the key is within the range of its leaf set. If the key is within the range of its leaf set the message is sent directly to the destination peer. Otherwise, in second step the message is forwarded to the peer that shares a common prefix with the key by at least one more digit. An example lookup scenario of Pastry network is presented in Figure 2. The peer 859fdc looks for a key d57b2d . From routing table, the peer gets d13a14 , where the peer d13a14 and key d57b2d shares one digit common prefix.