Docsity

Scaling and Improvements in CAN (Content-Addressable Network) Algorithm, Papers of Creative writing

Toggle sidebar
bg1
A Scalable Content-Addressable Network
Sylvia Ratnasamy

Paul Francis
Mark Handley
Richard Karp

Scott Shenker
Dept. of Electrical Eng. & Comp. Sci.
ACIRI
University of California, Berkeley AT&TCenter for Internet Research at ICSI
Berkeley, CA, USA Berkeley, CA,USA
Abstract
Hash tables – which map “keys” onto “values” – are an essential build-
ing block in modern software systems. We believe a similar functionality
would be equally valuable to large distributed systems. In this paper, we
introduce the concept of a Content-Addressable Network (CAN) as a dis-
tributed infrastructure that provides hash table-like functionality on Internet-
like scales. The CAN design is scalable, fault-tolerant and completely self-
organizing, and we demonstrate its scalability, robustness and low-latency
properties through simulation.
1 Introduction
A hash table is a data structure that efficiently maps “keys” onto
“values” and serves as a core building block in the implementa-
tion of software systems. We conjecture that many large-scale dis-
tributed systems could likewise benefit from hash table functional-
ity. We use the term Content-Addressable Network (CAN) to de-
scribe such a distributed, Internet-scale, hash table.
Perhaps the best example of current Internet systems that could
potentially be improved by a CAN are the recently introduced peer-
to-peer file sharing systems such as Napster [20] and Gnutella [11].
In these systems, files are stored at the end user machines (peers)
rather than at a central server and, as opposed to the traditional
client-server model, files are transferred directly between peers.
These peer-to-peer systems have become quite popular. Napster
was introduced in mid-1999 and, as of December 2000, the soft-
ware has been downloaded by 50 million users, making it the fastest
growing application on the Web. New file sharing systems such as
Scour, FreeNet, Ohaha, Jungle Monkey, and MojoNation have all
been introduced within the last year.
While there remains some (quite justified) skepticism about the
business potential of these file sharing systems, we believe their
rapid and wide-spread deployment suggests that there are important
advantages to peer-to-peer systems. Peer-to-peer designs harness
huge amounts of resources - the content advertised through Nap-
ster has been observed to exceed 7 TBof storage on a single day1,
without requiring centralized planning or huge investments inhard-
ware, bandwidth, or rack space. As such, peer-to-peer file sharing
may lead to new content distribution models for applications such
as software distribution, file sharing, and static web content deliv-
ery.
Unfortunately, most of the current peer-to-peer designs are not
scalable. For example, in Napster a central server stores the in-
dex of all the files available within the Napster user community.
To retrieve a file, a user queries this central server using the de-
sired file’s well known name and obtains the IP address of a user
1Private communication with YinZhang and Vern Paxson
machine storing the requested file. The file is then down-loaded di-
rectly from this user machine. Thus, although Napster uses a peer-
to-peer communication model for the actual file transfer, the pro-
cess of locating a file is still very much centralized. This makes it
both expensive (to scale the central directory) and vulnerable (since
there is a single point of failure). Gnutella goes a step further and
de-centralizes the file location process as well. Users in a Gnutella
network self-organize into an application-level mesh on which re-
quests for a file are flooded with a certain scope. Flooding on every
request is clearly not scalable [12] and, because the flooding has to
be curtailed at some point, may fail to find content that is actually
in the system.
We started our investigation with the question: could one make
a scalable peer-to-peer file distribution system? We soon recog-
nized that central to any peer-to-peer system is the indexing scheme
used to map file names (whether well known or discovered through
some external mechanism) to their location in the system. That is,
the peer-to-peer file transfer process is inherently scalable, but the
hard part is finding the peer from whom to retrieve the file. Thus,
a scalable peer-to-peer system requires, at the very least, a scal-
able indexing mechanism. We call such indexing systems Content-
Addressable Networks and, in this paper, propose a particular CAN
design.
However, the applicability ofCANs is not limited to peer-to-peer
systems. CANs could also be used in large scale storage manage-
ment systems such as OceanStore [15], Farsite [3], and Publius
[18]. These systems all require efficient insertion and retrieval of
content in a large distributed storage infrastructure, and a scalable
indexing mechanism is an essential component. In fact, as we dis-
cuss in Section 5, the OceanStore system already includes a CAN in
its core design (although the OceanStore CAN, based on Plaxton’s
algorithm[21], is somewhat different from what we propose here).
Another potential application for CANs is in the construction of
wide-area name resolution services that (unlike the DNS) decou-
ple the naming scheme from the name resolution process thereby
enabling arbitrary, location-independent naming schemes.
Our interest in CANs is based on the belief that a hash table-
like abstraction would give Internet system developers a powerful
design tool that could enable new applications and communication
models. However, in this paper our focus is not on the use of CANs
but on their design. In [1], we describe, in some detail, one possi-
ble application, which we call a “grass-roots” content distribution
system, that leverages our CAN work.
As we have said, CANs resemble a hash table; the basic oper-
ations performed on a CAN are the insertion, lookup and deletion
of (key,value) pairs. In our design, the CAN is composed of many
individual nodes. Each CAN node stores a chunk (called a zone) of
the entire hash table. In addition, a node holds information about
a small number of “adjacent” zones in the table. Requests (insert,
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Scaling and Improvements in CAN (Content-Addressable Network) Algorithm and more Papers Creative writing in PDF only on Docsity!

A Scalable Content-Addressable Network

Sylvia Ratnasamy

 

Paul Francis



Mark Handley



Richard Karp

 

Scott Shenker



 Dept. of Electrical Eng. & Comp. Sci.

 ACIRI University of California, Berkeley AT&T Center for Internet Research at ICSI Berkeley, CA, USA Berkeley, CA, USA

Abstract

Hash tables – which map “keys” onto “values” – are an essential build- ing block in modern software systems. We believe a similar functionality would be equally valuable to large distributed systems. In this paper, we introduce the concept of a Content-Addressable Network (CAN) as a dis- tributed infrastructure that provides hash table-like functionality on Internet- like scales. The CAN design is scalable, fault-tolerant and completely self- organizing, and we demonstrate its scalability, robustness and low-latency properties through simulation.

1 Introduction

A hash table is a data structure that efficiently maps “keys” onto “values” and serves as a core building block in the implementa- tion of software systems. We conjecture that many large-scale dis- tributed systems could likewise benefit from hash table functional- ity. We use the term Content-Addressable Network (CAN) to de- scribe such a distributed, Internet-scale, hash table. Perhaps the best example of current Internet systems that could potentially be improved by a CAN are the recently introduced peer- to-peer file sharing systems such as Napster [20] and Gnutella [11]. In these systems, files are stored at the end user machines (peers) rather than at a central server and, as opposed to the traditional client-server model, files are transferred directly between peers. These peer-to-peer systems have become quite popular. Napster was introduced in mid-1999 and, as of December 2000, the soft- ware has been downloaded by 50 million users, making it the fastest growing application on the Web. New file sharing systems such as Scour, FreeNet, Ohaha, Jungle Monkey, and MojoNation have all been introduced within the last year. While there remains some (quite justified) skepticism about the business potential of these file sharing systems, we believe their rapid and wide-spread deployment suggests that there are important advantages to peer-to-peer systems. Peer-to-peer designs harness huge amounts of resources - the content advertised through Nap- ster has been observed to exceed 7 TB of storage on a single day^1 , without requiring centralized planning or huge investments in hard- ware, bandwidth, or rack space. As such, peer-to-peer file sharing may lead to new content distribution models for applications such as software distribution, file sharing, and static web content deliv- ery. Unfortunately, most of the current peer-to-peer designs are not scalable. For example, in Napster a central server stores the in- dex of all the files available within the Napster user community. To retrieve a file, a user queries this central server using the de- sired file’s well known name and obtains the IP address of a user

(^1) Private communication with Yin Zhang and Vern Paxson

machine storing the requested file. The file is then down-loaded di- rectly from this user machine. Thus, although Napster uses a peer- to-peer communication model for the actual file transfer, the pro- cess of locating a file is still very much centralized. This makes it both expensive (to scale the central directory) and vulnerable (since there is a single point of failure). Gnutella goes a step further and de-centralizes the file location process as well. Users in a Gnutella network self-organize into an application-level mesh on which re- quests for a file are flooded with a certain scope. Flooding on every request is clearly not scalable [12] and, because the flooding has to be curtailed at some point, may fail to find content that is actually in the system. We started our investigation with the question: could one make a scalable peer-to-peer file distribution system? We soon recog- nized that central to any peer-to-peer system is the indexing scheme used to map file names (whether well known or discovered through some external mechanism) to their location in the system. That is, the peer-to-peer file transfer process is inherently scalable, but the hard part is finding the peer from whom to retrieve the file. Thus, a scalable peer-to-peer system requires, at the very least, a scal- able indexing mechanism. We call such indexing systems Content- Addressable Networks and, in this paper, propose a particular CAN design. However, the applicability of CANs is not limited to peer-to-peer systems. CANs could also be used in large scale storage manage- ment systems such as OceanStore [15], Farsite [3], and Publius [18]. These systems all require efficient insertion and retrieval of content in a large distributed storage infrastructure, and a scalable indexing mechanism is an essential component. In fact, as we dis- cuss in Section 5, the OceanStore system already includes a CAN in its core design (although the OceanStore CAN, based on Plaxton’s algorithm[21], is somewhat different from what we propose here). Another potential application for CANs is in the construction of wide-area name resolution services that (unlike the DNS) decou- ple the naming scheme from the name resolution process thereby enabling arbitrary, location-independent naming schemes. Our interest in CANs is based on the belief that a hash table- like abstraction would give Internet system developers a powerful design tool that could enable new applications and communication models. However, in this paper our focus is not on the use of CANs but on their design. In [1], we describe, in some detail, one possi- ble application, which we call a “grass-roots” content distribution system, that leverages our CAN work. As we have said, CANs resemble a hash table; the basic oper- ations performed on a CAN are the insertion, lookup and deletion of (key,value) pairs. In our design, the CAN is composed of many individual nodes. Each CAN node stores a chunk (called a zone ) of the entire hash table. In addition, a node holds information about a small number of “adjacent” zones in the table. Requests (insert,

lookup, or delete) for a particular key are routed by intermediate CAN nodes towards the CAN node whose zone contains that key. Our CAN design is completely distributed (it requires no form of centralized control, coordination or configuration), scalable (nodes maintain only a small amount of control state that is independent of the number of nodes in the system), and fault-tolerant (nodes can route around failures). Unlike systems such as the DNS or IP routing, our design does not impose any form of rigid hierarchical naming structure to achieve scalability. Finally, our design can be implemented entirely at the application level. In what follows, we describe our basic design for a CAN in Sec- tion 2, describe and evaluate this design in more detail in Section 3 and discuss our results in Section 4. We discuss related work in Section 5, directions for future work in Section 6.

2 Design

First we will describe our Content Addressable Network in its most basic form; in Section 3 we will add additional design features that improve system performance. Our design centers around a virtual

-dimensional Cartesian co- ordinate space on a

-torus^2. This coordinate space is completely logical and bears no relation to any physical coordinate system. At any point in time, the entire coordinate space is dynamically par- titioned among all the nodes in the system such that every node “owns” its individual, distinct zone within the overall space. For

example, Figure 1 shows a 2-dimensional   coordinate

space partitioned between 5 CAN nodes. This virtual coordinate space is used to store (key,value) pairs

as follows: to store a pair ( , ), key  is deterministically

mapped onto a point  in the coordinate space using a uniform

hash function. The corresponding key-value pair is then stored at

the node that owns the zone within which the point  lies. To re-

trieve an entry corresponding to key , any node can apply the

same deterministic hash function to map onto point  and then

retrieve the corresponding value from the point . If the point 

is not owned by the requesting node or its immediate neighbors, the request must be routed through the CAN infrastructure until it

reaches the node in whose zone  lies. Efficient routing is therefore

a critical aspect of our CAN. Nodes in the CAN self-organize into an overlay network that rep- resents this virtual coordinate space. A node learns and maintains as its set of neighbors the IP addresses of those nodes that hold coordinate zones adjoining its own zone. This set of immediate neighbors serves as a coordinate routing table that enables routing between arbitrary points in the coordinate space. We will first describe the three most basic pieces of our de- sign: CAN routing, construction of the CAN coordinate overlay, and maintenance of the CAN overlay. We will then, in Section 3, discuss additional design pieces that greatly enhance system perfor- mance and robustness.

2.1 Routing in a CAN

Intuitively, routing in a Content Addressable Network works by following the straight line path through the Cartesian space from source to destination coordinates. A CAN node maintains a coordinate routing table that holds the IP address and virtual coordinate zone of each of its neighbors in the

(^2) For simplicity, the illustrations in this paper do not show a torus, so the reader must remember that the coordinate space wraps

coordinate space. In a

-dimensional coordinate space, two nodes are neighbors if their coordinate spans overlap along

dimen- sions and abut along one dimension. For example, in Figure 2, node 5 is a neighbor of node 1 because its coordinate zone overlaps with 1’s along the Y axis and abuts along the X-axis. On the other hand, node 6 is not a neighbor of 1 because their coordinate zones abut along both the X and Y axes. This purely local neighbor state is suf- ficient to route between two arbitrary points in the space: A CAN message includes the destination coordinates. Using its neighbor coordinate set, a node routes a message towards its destination by simple greedy forwarding to the neighbor with coordinates closest to the destination coordinates. Figure 2 shows a sample routing path. For a

dimensional space partitioned into  equal zones, the

average routing path length is thus 



and individual

nodes maintain 

neighbors. 3 These scaling results mean that for a

dimensional space, we can grow the number of nodes (and hence zones) without increasing per node state while the path length

grows as  



Note that many different paths exist between two points in the space and so, even if one or more of a node’s neighbors were to crash, a node would automatically route along the next best avail- able path. If however, a node loses all its neighbors in a certain direction, and the repair mechanisms described in Section 2.3 have not yet rebuilt the void in the coordinate space, then greedy forwarding may temporarily fail. In this case, a node may use an expanding ring search to locate a node that is closer to the destination than itself. The message is then forwarded to this closer node, from which greedy forwarding is resumed.

2.2 CAN construction

As described above, the entire CAN space is divided amongst the nodes currently in the system. To allow the CAN to grow incre- mentally, a new node that joins the system must be allocated its own portion of the coordinate space. This is done by an existing node splitting its allocated zone in half, retaining half and handing the other half to the new node. The process takes three steps:

  1. First the new node must find a node already in the CAN.
  2. Next, using the CAN routing mechanisms, it must find a node whose zone will be split.
  3. Finally, the neighbors of the split zone must be notified so that routing can include the new node.

Bootstrap

A new CAN node first discovers the IP address of any node cur- rently in the system. The functioning of a CAN does not depend on the details of how this is done, but we use the same bootstrap mechanism as Yallcast and YOID [8]. As in [8] we assume that a CAN has an associated DNS domain name, and that this resolves to the IP address of one or more CAN bootstrap nodes. A bootstrap node maintains a partial list of CAN (^3) Several recently proposed routing algorithms for location services [21, 5] route in

!#"%$ &')(* hops with each node maintaining !+"%$ &,')( *neighbors. Notice that were we

to select the number of dimensions d = "%$^ &'.-/(*10^ , we could achieve the same scaling

properties.We choose to hold d fixed independent of n , since we envision applying CANs to very large systems with frequent topology changes. In such systems, it is important to keep the number of neighbors independent of the system size

for the CAN state to become inconsistent. In such cases, prior to triggering the repair mechanism, the node performs an expanding ring search for any nodes residing beyond the failure region and hence it eventually rebuilds sufficient neighbor state to initiate a takeover safely. Finally, both the normal leaving procedure and the immediate takeover algorithm can result in a node holding more than one zone. To prevent repeated further fragmentation of the space, a back- ground zone-reassignment algorithm, which we describe in Ap- pendix A, runs to ensure that the CAN tends back towards one zone per node.

3 Design Improvements

Our basic CAN algorithm as described in the previous section pro-

vides a balance between low per-node state ( 

for a

dimen-

sional space) and short path lengths with  



hops for

di-

mensions and  nodes. This bound applies to the number of hops in

the CAN path. These are application level hops, not IP-level hops, and the latency of each hop might be substantial; recall that nodes that are adjacent in the CAN might be many miles (and many IP hops) away from each other. The average total latency of a lookup is the average number of CAN hops times the average latency of each CAN hop. We would like to achieve a lookup latency that is comparable (within a small factor) to the underlying IP path laten- cies (between the requester and the CAN node holding the key). In this section, we describe a number of design techniques whose primary goal is to reduce the latency of CAN routing. Not uninten- tionally, many of these techniques offer the additional advantage of improved CAN robustness both in terms of routing and data avail- ability. In a nutshell, our strategy in attempting to reduce path la- tency is to reduce either the path length or the per-hop latency be- cause the overall CAN path latency depends directly on the path length ( i.e. number of hops) and the latency of each hop along the path. A final improvement we make to our basic design is to add simple load balancing mechanisms (described in Sections 3.7 and 3.8). First, we describe and evaluate each design feature individually and then, in Section 4, discuss how together they affect the overall performance. These added features yield significant improvements but come at the cost of increased per-node state (although per-node state still remains independent of the number of nodes in the sys- tem) and somewhat increased complexity. The extent to which the following techniques are applied (if at all) involves a trade-off be- tween improved routing performance and system robustness on the one hand and increased per-node state and system complexity on the other. Until we have greater deployment experience, and know the application requirements better, we are not prepared to decide on these tradeoffs. We simulated our CAN design on Transit-Stub (TS) topologies using the GT-ITM topology generator [26]. TS topologies model networks using a 2-level hierarchy of routing domains with transit domains that interconnect lower level stub domains.

3.1 Multi-dimensioned Coordinate Spaces

The first observation is that our design does not restrict the dimen- sionality of the coordinate space. Increasing the dimensions of the CAN coordinate space reduces the routing path length, and hence the path latency, for a small increase in the size of the coordinate routing table.

Figure 4 measures this effect of increasing dimensions on routing path length. We plot the path length for increasing numbers of CAN nodes for coordinate spaces with different dimensions. For a system

with  nodes and

dimensions, we see that the path length scales

as  



in keeping with the analytical results for perfectly partitioned coordinate spaces. Because increasing the number of dimensions implies that a node has more neighbors, the routing fault tolerance also improves as a node now has more potential next hop nodes along which messages can be routed in the event that one or more neighboring nodes crash.

3.2 Realities: multiple coordinate spaces

The second observation is that we can maintain multiple, indepen- dent coordinate spaces with each node in the system being assigned a different zone in each coordinate space. We call each such coor- dinate space a “reality”. Hence, for a CAN with  realities, a single node is assigned  coordinate zones, one on every reality and holds  independent neighbor sets. The contents of the hash table are replicated on every reality. This replication improves data availability. For example, say a pointer to a particular file is to be stored at the coordinate loca- tion (x,y,z). With three independent realities, this pointer would be stored at 3 different nodes corresponding to the coordinates (x,y,z) on each reality and hence it is unavailable only when all three nodes are unavailable. Further, because the contents of the hash table are replicated on every reality, routing to location (x,y,z) translates to reaching (x,y,z) on any reality. A given node owns one zone per reality each of which is at a distinct, and possibly distant, location in the coordi- nate space. Thus, an individual node has the ability to, in a single hop, reach distant portions of the coordinate space thereby greatly reducing the average path length. To forward a message, a node now checks all its neighbors on each reality and forwards the mes- sage to that neighbor with coordinates closest to the destination. Figure 5 plots the path length for increasing numbers of nodes for different numbers of realities. From the graph, we see that realities greatly reduce path length. Thus, using multiple realities reduces the path length and hence the overall CAN path latency. Finally, multiple realities improve routing fault tolerance, because in the case of a routing breakdown on one reality, messages can continue to be routed using the remaining realities.

Multiple dimensions versus multiple realities

Increasing either the number of dimensions or realities results in shorter path lengths and higher per-node state. Here we compare the relative improvements caused by each of these features. Figure 6 plots the path length versus the average number of neighbors maintained per node for increasing numbers of dimen- sions and realities. We see that for the same number of neigh- bors, increasing the dimensions of the space yields shorter path lengths than increasing the number of realities. One should not, however, conclude from these tests that multiple dimensions are more valuable than multiple realities because multiple realities of- fer other benefits such as improved data availability and fault- tolerance. Rather, the point to take away is that if one were willing to incur an increase in the average per-node neighbor state for the primary purpose of improving routing efficiency, then the right way to do so would be to increase the dimensionality

of the coordinate space, rather than the number of realities .

4

8

16

32

64

128

256

256 1024 4096 16K 64K 256K 1M

Number of hops

Number of nodes

#realities= 2 dimensions 3 dimensions 4 dimensions 5 dimensions

Figure 4: Effect of dimensions on path length

2

4

8

16

32

64

128

256

256 1024 4096 16K 64K 256K 1M

Number of hops

Number of nodes

#dimensions=

2 realities1 reality 3 realities 4 realities

Figure 5: Effect of multiple realities on path length

8 12 16 20 24 28

r=

r= r= r=

d=

Number of hops

Number of neighbors

d=2, r=

Number of nodes = 131,

r=

d=

d=

d=

d=

increasing dimensions, #realities= increasing realities, #dimensions=

Figure 6: Path length with increasing neighbor state

3.3 Better CAN Routing Metrics

The routing metric, as described in Section 2.1, is the progress in terms of Cartesian distance made towards the destination. One can improve this metric to better reflect the underlying IP topology by having each node measure the network-level round-trip-time ( RTT ) to each of its neighbors. For a given destination, a message is forwarded to the neighbor with the maximum ratio of progress to RTT. This favors lower latency paths, and helps the application level CAN routing avoid unnecessarily long hops. Unlike increasing the number of dimensions or realities, RTT weighted routing aims at reducing the latency of individual hops along the path and not at reducing the path length. Thus, our metric for evaluating the efficacy of RTT weighted routing is the per-hop latency, obtained by dividing the overall path latency by the path length. To quantify the effect of this routing metric, we used Transit- Stub topologies with link latencies of 100ms for intra-transit do- main links, 10ms for stub-transit links and 1ms for intra-stub do- main links. With our simulated topology, the average end-to-end la- tency of the underlying IP network path between randomly selected source-destination nodes is approximately 115ms. Table 1 com- pares the average per-hop latency with and without RTT weighting.

These latencies were averaged over test runs with , the number of

nodes in the CAN, ranging from 

to 



As can be seen, while the per-hop latency without RTT weighted routing matches the underlying average IP network latency, RTT weighted routing lowers the per-hop latency by between 24 - 40% depending on the number of dimensions. Higher dimensions give more next-hop forwarding choices and hence even greater improve- ments.

3.4 Overloading coordinate zones

So far, our design assumes that a zone is, at any point in time, as- signed to a single node in the system. We now modify this to allow multiple nodes to share the same zone. Nodes that share the same zone are termed peers. We define a system parameter MAXPEERS,

which is the maximum number of allowable peers per zone (we imagine that this value would typically be rather low, 3 or 4 for example). With zone overloading, a node maintains a list of its peers in addition to its neighbor list. While a node must know all the peers in its own zone, it need not track all the peers in its neighboring zones. Rather, a node selects one node from each of its neighboring zones. Thus, zone overloading does not increase the amount of neighbor information an individual node must hold, but does require it to hold additional state for up to MAXPEERS peer nodes. Overloading a zone is achieved as follows: When a new node

joins the system, it discovers, as before, an existent node  whose

zone it is meant to occupy. Rather than directly splitting its zone

as described earlier, node  first checks whether it has fewer than

MAXPEERS peer nodes. If so, the new node

merely joins  ’s

zone without any space splitting. Node

obtains both its peer list

and its list of coordinate neighbors from . Periodic soft-state up-

dates from

serve to inform

’s peers and neighbors about its entry into the system. If the zone is full (already has MAXPEERS nodes), then the zone

is split into half as before. Node  informs each of the nodes on it’s

peer-list that the space is to be split. Using a deterministic rule (for example the ordering of IP addresses), the nodes on the peer list together with the new node

divide themselves equally between the two halves of the now split zone. As before,

obtains its initial

list of peers and neighbors from .

Periodically, a node sends its coordinate neighbor a request for its list of peers, then measures the RTT to all the nodes in that neigh- boring zone and retains the node with the lowest RTT as its neighbor in that zone. Thus a node will, over time, measure the round-trip- time to all the nodes in each neighboring zone and retain the closest ( i.e. lowest latency) nodes in its coordinate neighbor set. After its initial bootstrap into the system, a node can perform this RTT measurement operation at very infrequent intervals so as to not un- necessarily generate large amounts of control traffic. The contents of the hash table itself may be either divided or replicated across the nodes in a zone. Replication provides higher

256 1024 4096 16K 64K 256K

User-perceived Query Latency (s)

Number of nodes

#dimensions=2, #realities=

3 hash functions1 hash function 5 hash functions

Figure 7: Reduction in user-perceived query latency with the use of multiple hash functions

0

5

10

15

20

25

256 1024 4096

Latency Stretch

Number of nodes

#landmarks=4, #realities=

2-d, without landmark ordering2-d, with landmark ordering 4-d, without landmark ordering^ 4-d, with landmark ordering

Figure 8: Latency savings due to Land- mark ordering used in CAN construction

without uniform partitioning feature

V/16 V/8 V/4 4V 8V Volume number of nodes = 65, #dimensions = 3 #realities = 1

Percentage of nodes

V 2V

with uniform partitioning feature

V/

Figure 9: Effect of Uniform Partitioning feature

These results seem encouraging and we are continuing to study the effect of topology, link delay distribution, number of landmarks and other factors on the above scheme. Landmark ordering is work in progress which we do not discuss further (nor make use of) in this paper.

3.7 More Uniform Partitioning

When a new node joins, a JOIN message is sent to the owner of a random point in the space. This existing node knows not only its own zone coordinates, but also those of its neighbors. Therefore, in- stead of directly splitting its own zone, the existing occupant node first compares the volume of its zone with those of its immediate neighbors in the coordinate space. The zone that is split to accom- modate the new node is then the one with the largest volume. This volume balancing check thus tries to achieve a more uni- form partitioning of the space over all the nodes and can be used with or without the landmark ordering scheme from Section 3.6. Since (key,value) pairs are spread across the coordinate space using a uniform hash function, the volume of a node’s zone is indicative of the size of the (key,value) database the node will have to store, and hence indicative of the load placed on the node. A uniform partitioning of the space is thus desirable to achieve load balancing. Note that this is not sufficient for true load balancing because some (key,value) pairs will be more popular than others thus putting higher load on the nodes hosting those pairs. This is similar to the “hot spot” problem on the Web. In Section 3.8 we discuss caching and replication techniques that can be used to ease this hot spot problem in CANs.

If the total volume of the entire coordinate space were  and

 the the total number of nodes in the system then a perfect par-

titioning of the space among the  nodes would assign a zone of

volume  / to each node. We use  to denote  /. We ran

simulations with 

  nodes both with and without this uniform par- titioning feature. At the end of each run, we compute the volume of the zone assigned to each node. Fig 9 plots different possible vol-

umes in terms of  on the X axis and shows the percentage of the

total number of nodes (Y axis) that were assigned zones of a par- ticular volume. From the plot, we can see that without the uniform partitioning feature a little over 40% of the nodes are assigned to

zones with volume  as compared to almost 90% with this feature

and the largest zone volume drops from



 to . Not surpris-

ingly, the partitioning of the space further improves with increasing dimensions.

3.8 Caching and Replication techniques for “hot spot”

management

As with files in the Web, certain (key,value) pairs in a CAN are likely to be far more frequently accessed than others thus overload- ing nodes that hold these popular data keys. To make very popular data keys widely available, we borrow some of the caching and replication techniques commonly applied to the Web. Caching: In addition to its primary data store ( i.e. those data keys that hash into its coordinate zone), a CAN node maintains a cache of the data keys it recently accessed. Before forward- ing a request for a data key towards its destination, a node first checks whether the requested data key is in its own cache and if so, can itself satisfy the request without forwarding it any further. Thus, the number of caches from which a data key can be served grows in direct proportion to its popularity and the very act of requesting a data key makes it more widely available. Replication: A node that finds it is being overloaded by re- quests for a particular data key can replicate the data key at each of its neighboring nodes. Replication is thus an active pushing out of popular data keys as opposed to caching which is a natural consequence of requesting a data key. A popu- lar data key is thus eventually replicated within a region sur- rounding the original storage node. A node holding a replica of a requested data key can with a certain probability choose

to either satisfy the request or forward it on its way thereby causing the load to be spread over the entire region rather than just along the periphery.

As with all such schemes, cached and replicated data keys should have an associated time-to-live field and be eventually expired from the cache.

4 Design Review

Sections 2 and 3 described and evaluated individual CAN design components. The evaluation of our CAN recovery algorithms (us- ing both large scale and smaller scale ns simulations), are presented in Appendix B due to space restrictions. Here we briefly recap our design parameters and metrics, summarize the effect of each pa- rameter on the different metrics and quantify the performance gains achieved by the cumulative effect of all the features. We used the following metrics to evaluate system performance: Path length : the number of (application-level) hops required to route between two points in the coordinate space. Neighbor-state : the number of CAN nodes for which an indi- vidual node must retain state. Latency : we consider both the end-to-end latency of the total routing path between two points in the coordinate space and the per-hop latency i.e. latency of individual application level hops obtained by dividing the end-to-end latency by the path length. Volume : the volume of the zone to which a node is assigned, that is indicative of the request and storage load a node must handle. Routing fault tolerance : the availabilty of multiple paths be- tween two points in the CAN. Hash table availability : adequate replication of a (key,value) entry to withstand the loss of one (or more) replicas. The key design parameters affecting system performance are: dimensionality of the virtual coordinate space: d number of realities: r number of peer nodes per zone: p number of hash functions ( i.e. number of points per reality at which a (key,value) pair is stored): k use of the RTT weighted routing metric use of the Uniform Partitioning feature described in section 2.

In some cases, the effect of a design parameter on certain met- rics can be directly inferred from the algorithm; in all other cases we resorted to simulation. Table 3 summarizes the relationship be- tween the different parameters and metrics. A table entry marked “-” indicates that the given parameter has no real effect on that met-

ric, while a and  indicates an increase and decrease respectively

in that measure caused by the corresponding parameter. The figure numbers included in certain table entries refer to the corresponding simulation results. To measure the cumulative effect of all the above features, we

selected a system size of n =



nodes and compared two algorithms (using the same Transit-Stub topology as before):

  1. a bare bones CAN that does not utilize most of our additional design features
  2. a “knobs-on-full” CAN making full use of our added features (without the Landmark Ordering feature from Section 3.6)

Table 3:

Effect of design parameters on performance metrics

Design Parameters

pathlength

neighborstate

total path latency

per-hop la-tency

size of data store

routing fault toler-ance

data store availability

dimensions:

d

(fig: 4)

(due

to

reduced

path

length)

-^

-^

realities:

r^

(fig: 5)

(due

to

reduced

path

length)

number

of

peer

nodes

per

zone:

p

(due

to

reduced

path

length and reduced per-hop latency)

(table: 2)

replicated

data

store

repli-

cated:

, partitioned data

store: -

(due to additional backup neighbors)

replicated

data

store:

,^

partitioned data

store: -

number of hash functions:

k^

-^

-^

(fig: 7)

use of

RTT

weighted routing

metric

-^

-^

(due to reduced per-hop latency)

(table: 1)

-^

-^

use

of

uniform

partitioning

feature

reducedvariance

reducedvariance

-^

-^

reduced variance (fig: 9)

-^

DNS-like service, the two systems are quite different. In terms of functionality, CANs are more general than the DNS. The current design of the DNS closely ties the naming structure to the manner in which a name is resolved to an IP address, CAN name resolution is truly independent of the naming scheme. In terms of design, the two systems are very different as should be evident from this paper.

5.2.2 OceanStore

The OceanStore project at U.C.Berkeley [15] is building a utility infrastructure designed to span the globe and provide continuous access to persistent information. Servers self-organize into a very large scale storage system. Data in OceanStore can reside at any server within the OceanStore system and hence a data location al- gorithm is needed to route requests for a data object to an appro- priate server. OceanStore uses the Plaxton algorithm as the basis for its data location scheme. The Plaxton algorithm was described above.

5.2.3 Publius

Publius [18] is a Web publishing system that is highly resis- tant to censorship and provides publishers with a high degree of anonymity. The system consists of publishers who post Publius content to the web, servers that host random-looking content, and retrievers that browse Publius content on the web. The current Pub- lius design assumes the existence of a static, system-wide list of available servers. The self-organizing aspects of our CAN design could potentially be incorporated into the Publius design allowing it to scale to large numbers of servers. We thus view our work as complementary to the Publius project.

5.2.4 Peer-to-peer file sharing systems

Section 1 described the basic operation of the two most widely de- ployed peer-to-peer file sharing systems; Napster and Gnutella. We now describe a few more systems in this space that use novel index- ing schemes. Although many of these systems address additional, related problems such as security, anonymity, keyword searching etc, we focus here on their solutions to the indexing problem. Freenet [10, 4] is a file sharing application that additionally pro- tects the anonymity of both authors and readers. Freenet nodes hold 3 types of information: keys (which are analogous to web URLs) addresses of other Freenet nodes which are also likely to know about similar keys, and optionally the data corresponding to those keys. A node that receives a request for a key for which it does not know the exact location forwards the request to a Freenet node that it does know about whose keys are closer to the requested key. Results for both successful and failed searches backtrack along the path the request travelled. If a node fails to locate the desired con- tent, it returns a failure message back to its upstream node which will then try an alternate downstream node which is its next best choice. In this way, a request operates as a steepest-ascent hill- climbing search with backtracking. The authors hypothesize that the quality of the routing should improve over time, for two reasons. First, nodes should come to specialize in locating sets of similar keys because a node listed in routing tables under a particular key will tend to receive mostly requests for similar keys and because of backtracking will become better informed in its routing tables about which other nodes carry those keys. Second, nodes should become similarly specialized in storing clusters of files having similar keys. This is because forwarding a request successfully will result in the

node itself gaining a copy of the requested file, and most requests will be for similar keys and hence the node will mostly acquire files with similar keys. The scalability of the above algorithm is yet to be fully studied. Ongoing work at U.C.Berkeley (independent of the OceanStore project described above) [5] looks into developing a peer-to-peer file sharing application using a location algorithm similar to the Plaxton algorithm (although developed independently from the Plaxton work). A novel aspect of their work is the randomization of path selection for improved robustness. A description and evaluation of these and other file sharing appli- cations can be found at [27]. A key difference between our CAN al- gorithm and most of these file sharing systems is that under normal operating conditions, content that exists within the CAN can always be located by any other node because there is a clear “home” (point) in the CAN for that content and every other node knows what that home is and how to reach it. With systems such as [4, 5, 11] how- ever it is quite possible that even with every node in the system behaving correctly, content may not be found either because con- tent is beyond the horizon of a particular node [11] or because different nodes have different, inconsistent views of the network [4, 5]. Whether this is an important distinguishing factor depends of course on the nature of an application’s goals.

6 Discussion

Our work, so far, addresses two key problems in the design of Content-Addressable Networks; scalable routing and indexing. Our simulation results validate the scalability of our overall design - for a CAN with over 65,000 nodes, we can route with a latency that is less than twice the IP path latency. Certain additional problems remain to be addressed in realizing a comprehensive CAN system. An important open problem is that of designing a secure CAN that is resistant to denial of service at- tacks. This is a particularly hard problem because (unlike the Web) a malicious node can act, not only as a malicious client, but also as a malicious server or router. A number of ongoing projects both in research and industry are looking into the problem of building large-scale distributed systems that are both secure and resistant to denial-of-service attacks [18, 15, 4, 5]. Additional related problems that are topics for future work in- clude the extension of our CAN algorithms to handle mutable con- tent, and the design of search techniques [13, 9, 25] such as keyword searching built around our CAN indexing mechanism etc. Our interest in exploring the scalability of our design, and the difficulty of conducting truly large scale experiments (hundreds of thousands of nodes), led us to initially evaluate our CAN design through simulation. Now that simulation has given us some un- derstanding of the scaling properties of our design, we are now, in collaboration with others, embarking on an implementation project to build a file sharing application that uses a CAN for distributed indexing.

References

[1] Anonymized for blind reviewing. In Under submission to HotOS-VIII (Jan. 2001). [2] ARPANET WORKING GROUP REQUESTS FOR COMMENT, DDN NETWORK INFORMATION CENTER. Internet Protocol Specification. SRI International, Menlo Park, CA, Sept. 1981. RFC-791. [3] BOLOSKY, W., DOUCEUR, J., ELY, D., AND THEIMER, M. Feasi- bility of a serverless distributed file system deployed on an existing set

of desktop pcs. In Proceedings of SIGMETRICS 2000 (Santa Clara, CA, June 2000). [4] CLARKE, I., SANDBERG, O., WILEY, B., AND HONG, T. Freenet: A Distributed Anonymous Information Storage and Retrieval System. ICSI Workshop on Design Issues in Anonymity and Unobservability, July 2000. [5] COSTELLO, A. Private communication, Dec. 2000. [6] CZERWINSKI, S., ZHAO, B., HODES, T., JOSEPH, A., AND KATZ, R. H. An architecture for a secure service discovery service. In Pro- ceedings of Fifth ACM Conf. on Mobile Computing and Networking (MOBICOM) (Seattle, WA, 1999), ACM. [7] FLOYD, S., JACOBSON, V., MCCANNE, S., LIU, C.-G., AND ZHANG, L. A reliable multicast framework for light-weight ses- sions and application level framing. In Proceedings of SIGCOMM ’95 (Boston, MA, Sept. 1995), ACM, pp. 342–356. [8] FRANCIS, P. Yoid: Extending the internet multi- cast architecture. Unpublished paper, available at http://www.aciri.org/yoid/docs/index.html, Apr. 2000. [9] FRANCIS, P., KAMBAYASHI, T., YA SATO, S., AND SHIMIZU, S. Ingrid: A self-configuring information navigation infrastructure. http://www.ingrid.org/francis/www4/Overview.html. [10] FREENET. http://freenet.sourceforge.net.

[11] GNUTELLA. http://gnutella.wego.com. [12] GUTERMAN, J. Gnutella to the Rescue? Not so Fast, Napster fiends. link to article at http://gnutella.wego.com, Sept. 2000.

[13] INFRASEARCH. http://www.infrasearch.com. [14] KARP, B., AND KUNG, H. Greedy Perimeter Stateless Routing. In Proceedings of ACM Conf. on Mobile Computing and Networking (MOBICOM) (Boston, MA, 2000), ACM.

[15] KUBIATOWICZ, J., BINDEL, D., CHEN, Y., CZERWINSKI, S., EATON, P., GEELS, D., GUMMADI, R., RHEA, S., WEATHER- SPOON, H., WEIMER, W., WELLS, C., AND ZHAO, B. Oceanstore: An Architecture for Global-scale Persistent Storage. In Proceedings of ASPLOS 2000 (Cambridge, Massachusetts, Nov. 2000). [16] KUMAR, S., ALAETTINOGLU, C., AND ESTRIN, D. SCOUT: Scal- able Object Tracking through Unattended Techniques. In Proceed- ings of the Eight IEEE International Conference on Network Protocols (Osaka, Japan, Nov. 2000).

[17] LI, J., JANNOTTI, J., COUTO, D. D., KARGER, D., AND MOR- RIS, R. A Scalable Location Service for Geographic Ad-hoc Routing. In Proceedings of ACM Conf. on Mobile Computing and Networking (MOBICOM) (Boston, MA, 2000), ACM. [18] MARC WALDMAN, A. D. R., AND CRANOR, L. F. Publius: A ro- bust, tamper-evident, censorship-resistant, web publishing system. In Proceedings of the 9th USENIX Security Symposium (August 2000), pp. 59–72.

[19] MCCANNE, S., AND FLOYD, S. The LBNL/UCB Network Simulator. Lawrence Berkeley Laboratory, University of California, Berkeley. [20] NAPSTER. http://www.napster.com.

[21] PLAXTON, C., RAJARAM, R., AND RICHA, A. W. Accessing nearby copies of replicated objects in a distributed environment. In Proceed- ings of the Ninth Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA) (June 1997). [22] RAMAN, S., AND MCCANNE, S. A Model, Analysis, and Protocol Framework for Soft State-based Communication. In Proceedings of SIGCOMM ’99 (Cambridge, MA, Sept. 1999), ACM.

[23] RAMAN, S., MCCANNE, S., AND SHENKER, S. Asymptotic scaling behavior of global recovery in SRM. In Proceedings of SIGMETRICS ’98/PERFORMANCE ’98 Joint International Conference on Measure- ment and Modeling of Computer Systems (Madison, WI, June 1998).

[24] REKHTER, Y., AND LI, T. A Border Gateway Protocol 4 BGP-. ARPANET Working Group Requests for Comment, DDN Network In- formation Center, Mar. 1995. RFC-1771. [25] WELSH, M., BORISHOV, N., HILL, J., VON BEHREN, R., AND WOO, A. Querying large collections of music for similarity. Tech- nical report, University of California, Berkeley, CA, Nov. 1999.

[26] ZEGURA, E., CALVERT, K., AND BHATTACHARJEE, S. How to Model an Internetwork. In Proceedings IEEE Infocom ’96 (San Fran- cisco, CA, May 1996). [27] ZEROPAID.COM. File sharing portal at http://www.zeropaid.com.

node failure rate = 10%

2

#dimensions=3, #realities=

Prob(greedy forwarding fails)

node failure rate = 20%

node failure rate = 30%

Number of nodes (log scale)

8.00 10.00 12.00 14.

Figure 11: Routing failure rate without re- pair

#dimensions = 3, #realities = 1

node failure rate = 20% node failure rate = 30%

8 9 10 11 12 13 number of nodes (log scale)

number of hops

node failure rate = 10%

Figure 12: Search Radius using ERS

node failure rate = 10%

number of hops

number of nodes (log scale)

#dimensions=3, #realities=

node failure rate = 20% node failure rate = 30%

node failure rate = 0%

8.00 10.00 12.00 14.

Figure 13: Path Length using ERS

Number of dimensions avg(# hops) max(# hops) 2 1.12 3 3 1.09 3 4 1.07 3

Table 6: Background zone reassignment

In the event of complex failure modes where multiple adjacent nodes fail simultaneously, a node might have to resort to a scoped form of flooding to discover its new neighbors. Ideally, we would like such events to be rare. Figure 14 also plots the number of flooded search requests as a function of the node failure rate. The above ns simulations are really intended more as a proof of concept than as a comprehensive evaluation of the recovery algo- rithms which requires an in-depth understanding of soft-state and timer-based suppression algorithms [7, 23, 22] that is currently be- yond the scope of this paper. The background zone reassignment algorithm described in A requires a node to send out a “depth-first search” query to find a node to which it can hand off one of its extra zones. Table 6 lists the number of hops away from itself that a node would have to search in order to find a node it can hand off an extra zone to. Because of the more or less uniform partitioning (due to our uniform partitioning feature from Section 3.7) of the space, a pair of sibling nodes is typically available very close to the requesting node ( i.e. the dissection tree is well balanced).

C Plaxton’s Algorithm

The Plaxton algorithm described in Section 5 addresses many of the same issues as our CAN algorithm. Here we describe some of the details of the algorithm that, we believe, make it inappropriate for a large-scale peer-to-peer environment. The Plaxton algorithm was originally proposed for web caching environments which are typically administratively configured, have fairly stable hosts, and maximal scales on the order of thousands.

number of CAN nodes = 100

takeover bids

flooded neighbour

discovery messages

number of messages

Node failure rate

#dimensions=2, #realities=

takeover timer interval selected in the range [1-4]seconds

recovery period = 6s

periodic update interval = 20ms

0.00 10.00 20.00 30.00 40.00 50.

Figure 14: Recovery Traffic

While the Plaxton algorithm is well suited to such environments, the peer-to-peer contexts we address are quite different. We require a self-configuring system which is capable of dealing with a very large set of hosts (millions), many of them potentially quite flaky. The Plaxton algorithm does not seem well-suited for such an envi- ronment. First, every node arrival and departure affects a logarith- mic number of nodes which, for large systems with high arrival and departure rates, appears to be on the high side because nodes could be constantly reacting to changes in system membership. Another potential problem involves the discovery of neighbors. Plaxton’s algorithm, because it was designed for administratively configured systems, does not provide a solution whereby nodes can discover their neighbors in a decentralized manner. This neighbor discovery problem aside, we believe that, for large-scale self-organizing systems, our CAN algorithm is simpler and more robust in the face of fluctuating node membership. This is best understood through an example: Consider a Plaxton system, wherein nodes are assigned 9 bit labels with 3 levels. Continuing with the notation used above, let us say that at some point in time there is no node in the system with a label of the form 13X. All nodes with labels of the form 1XX must store a routing table en- try of the form 13X. Since there is no node currently in the system with a label of the form 13X, nodes instead store a pointer to a node currently in the system, with a label that is a good “approximation” of the label 13X (what constitutes a good approximation is defined in [21]). Consider what happens when a node, say 136, enters the system. All nodes of the form 1XX must now be informed about node 136’s arrival and update their routing tables. If node 136 were to subsequently crash, every node of the form 1XX must now again locate a good “approximation” node. The Plaxton algorithm defines rules to determine a unique node currently in the system that is the best approximation to a missing node, however their definition of this approximation node assumes some form of global knowledge of all the nodes currently in the sys- tem without which different nodes might independently pick differ- ent approximation nodes for a single missing node. These inconsis- tencies might make data that is actually in the system unreachable by some nodes. Applying Plaxton’s algorithm to self-organizing systems thus requires designing a distributed mechanism (which could potentially be quite complex) whereby nodes can indepen- dently develop consistent views of the entire network. Because the CAN algorithm always has a fully occupied address space ( i.e. co- ordinate space), it does not face any such problems associated with approximations of node labels. While it might very well be possible to adapt the Plaxton algo- rithm to our application environment (in fact, discussions with col- leagues 6 seem to indicate that constraining the neighbor set in the Plaxton problem might make the above problem of approximating node labels more tractable), we opted to go with our CAN algo- rithm both because it offers the flexibility of operating with very low per-node state and because of the simplicity of our basic design under normal operation.

(^6) Private communication with Ion Stoica