Topology-Aware Routing in Structured Peer-To-Peer Overlay Networks
Total Page:16
File Type:pdf, Size:1020Kb
Topology-aware routing in structured peer-to-peer overlay networks ¡ ¢ Miguel Castro Peter Druschel Y. Charlie Hu Antony Rowstron Microsoft Research, 7 J J Thomson Close, Cambridge, CB3 0FB, UK. ¡ Rice University, 6100 Main Street, MS-132, Houston, TX 77005, USA. ¢ Purdue University, 1285 EE Building, West Lafayette, IN 47907, USA. Abstract tant distinction lies in the approach they take to consider- ing and exploiting proximity in the underlying Internet. Structured peer-to-peer (p2p) overlay networks like Chord in its original design, for instance, does not con- CAN, Chord, Pastry and Tapestry offer a novel platform sider network proximity at all. As a result, its protocol for a variety of scalable and decentralized distributed ap- for maintaining the overlay network is very light-weight, plications. They provide efficient and fault-tolerant rout- but messages may travel arbitrarily long distances in the ing, object location and load balancing within a self- Internet in each routing hop. organizing overlay network. One important aspect of In a version of CAN, each node measures its network these systems is how they exploit network proximity in delay to a set of landmark nodes, in an effort to deter- the underlying Internet. We present a study of topology- mine its relative position in the Internet and to construct aware routing approaches in p2p overlays, identify prox- an Internet topology-aware overlay. Tapestry and Pastry imity neigbor selection as the most promising technique, construct a topology-aware overlay by choosing nearby and present an improved design in Pastry. Results ob- nodes for inclusion in their routing tables. Early results tained via analysis and via simulation of two large-scale for the resulting locality properties are promising. How- topology models indicate that it is possible to efficiently ever, these results come at the expense of a significanly exploit network proximity in self-organizing p2p sub- more expensive overlay maintenance protocol, relative to strates. Proximity neighbor selection incurs only a mod- Chord. Also, proximity based routing may compromise est additional overhead for organizing and maintaining the load balance in the p2p overlay network. Moreover, the overlay network. The resulting locality properties im- it remains unclear to what extent the locality properties prove application performance and reduce network us- hold in the actual Internet, with its complex, dynamic, age in the Internet substantially. Finally, we show that and non-uniform topology. As a result, the cost and ef- the impact of proximity neighbor selection on the load fectiveness of proximity based routing in these p2p over- balancing in the p2p overlay is minimal. lays remain unclear. This paper presents a study of proximity based routing in structured p2p overlay networks, and presents results 1 Introduction of an analysis and of simulations based on two large- scale Internet topology models. The specific contribu- Several recent systems (e.g., CAN, Chord, Pastry and tions of this paper include Tapestry [7, 13, 10, 16, 6]) provide a self-organizing sub- strate for large-scale peer-to-peer applications. Among other uses, these systems can implement a scalable, fault- £ a comparison of approaches to proximity based tolerant distributed hash table, in which any item can be routing in structured p2p overlay networks, which located within a bounded number of routing hops, using identifies proximity neighbor selection in prefix- a small per-node routing table. While there are algorith- based protocols like Tapestry and Pastry as the most mic similarities among each of these systems, one impor- promising technique; 1 £ improved node join and overlay maintenance pro- identifier space. Given a 128-bit key, Pastry routes an tocols for proximity neighbor selection in Pastry, associated message towards the live node whose nodeId which significancly reduce the overhead of creating is numerically closest to the key. Moreover, each Pastry and maintaining a topology-aware overlay; node keeps track of its neighboring nodes in the names- pace and notifies applications of changes in the set. £ a study of the costs and benefits of proximity neigh- Node state: For the purpose of routing, nodeIds and bor selection via analysis and simulation based on ¤¦¥ keys are thought of as a sequence of digits in base two large-scale Internet topology models; ( § is a configuration parameter with typical value 4). A ¥ ¥ ¤ © ¦¤ ¤ £ a study of the impact of proximity neighbor selec- node’s routing table is organized into ¨ rows and ¤¦¥ tion on the load balancing in the p2p overlay based columns. The entries in row of the routing table con- on simulations on a large-scale topology model. tain the IP addresses of nodes whose nodeIds share the ¨ first digits with the present node’s nodeId; the th Compared to the original Pastry paper [10], this work nodeId digit of the node in column of row equals . adds a comparison with other proposed approaches to The column in row that corresponds to the value of the topology-aware routing, new node join and overlay main- ¨ ’s digits of the local node’s nodeId remains empty. tenance protocols that dramatically reduce the cost of Figure 1 depicts a sample routing table. overlay construction and maintenance, a new protocol to A routing table entry is left empty if no node with the locate a nearby contact node, results of a formal analysis appropriate nodeId prefix is known. The uniform random of Pastry’s routing properties and extensive simulation distribution of nodeIds ensures an even population of the ¡ results on two different network topology models. nodeId space; thus, on average only levels are The rest of this paper is organized as follows. Pre- populated in the routing table. Each node also maintains vious work on structured p2p overlays is discussed in a leaf set. The leaf set is the set of nodes with nodeIds Section 2. Approaches to topology-aware routing in p2p that are numerically closest to the present node’s nodeId, ¦¤ ¦¤ overlays are presented in Section 3. Section 4 presents with larger and smaller nodeIds than the current ©"! Pastry’s implementation of proximity neighbor selection, node’s id. A typical value for is approximately %$ & including new efficient protocols for node join and over- # . The leaf set ensures reliable message delivery lay maintenance. An analysis of Pastry’s locality proper- and is used to store replicas of application objects. ties follow in Section 5. Section 6 presents experimental Message routing: At each routing step, a node seeks to results, and we conclude in Section 7. forward the message to a node whose nodeId shares with the key a prefix that is at least one digit (or § bits) longer 2 Background and prior work than the current node’s shared prefix. If no such node can be found in the routing table, the message is forwarded In this section, we present some background on struc- to a node whose nodeId shares a prefix with the key as tured p2p overlay protocols like CAN, Chord, Tapestry long as the current node, but is numerically closer to the and Pastry. (We do not consider unstructured p2p over- key than the present node’s id. Several such nodes can lays like Gnutella and Freenet in this paper [1, 2]). Space normally be found in the routing table; moreover, such limitations prevent us from a detailed discussion of each a node is guaranteed to exist in the leaf set unless the protocol. Instead, we give a more detailed description of message has already arrived at the node with numerically closest nodeId or its immediate neighbor. And, unless all Pastry, as an example of a structured p2p overlay net- ¦¤ work, and then point out relevant differences with the nodes in one half of the leaf set have failed simulta- other protocols. neously, at least one of those nodes must be live. The Pastry routing procedure is shown in Figure 3. 2.1 Pastry Figure 2 shows the path of an example message. Analy- sis shows that the expected number of forwarding hops is ¡'& Pastry is a scalable, fault resilient, and self-organizing slightly below # , with a distribution that is tight peer-to-peer substrate. Each Pastry node has a unique, around the mean. Moreover, simulation shows that the uniform randomly assigned nodeId in a circular 128-bit routing is highly resilient to node failures. 2 P Q . 0 2 ) + , * / 1 0 1 2 3 4 5 7 8 9 - a b c d e f O 2128 - 1 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( x x x x x x x x x x x x x x x @ O A N 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 d471f1 @ B N . 0 2 ) + , D / 1 0 1 2 3 4 6 7 8 9 - a b c d e f @ B d467cK 4 C ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( x x x x x x x x x x x x x x x d462ba @ B A D d46C a1c @ 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 L * * * * * * * * * * * * * * * d4213f 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 . 0 2 3 4 ) 5 + , * 1 0 1 2 3 4 5 6 7 8 9 b / c d e f ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( x x x x x x x x x x x x x x x @ B J 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 I G @ @ L L E H C D F * * * * * * * * * * * * * * * 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 Route(d46a1c) d13dC a3 - - - - - - - - - - - - - - - a a a a a a a a a a a a a a a . 0 2 ) + , * / 1 0 2 3 4 5 6 7 8 9 - a b c d e f ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( x x x x x x x x x x x x x x x B M D 65C a1fc Figure 1: Routing table of a Pastry node Figure 2: Routing a message from node §=<?> 6 7¦8R¨TSVU W >X6¦89¨YU with nodeId 6 7¦89¨;: , .