Thursday, October 30, 2008

Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications

This paper sparked a lot of research on distributed hashtables and other forms of structured P2P systems by introducing Chord, a simple DHT which provides fast lookups and redundancy while requiring little communication and few neighbors per node. The basic idea of Chord is to identify your data items by hashes and view the space of hashes as a ring. Each node then chooses a random position on the ring and makes pointers to nodes 1, 2, 4, 8, etc identifiers away, or O(log n) pointers. This is enough to be able to find any item in O(log n) time. In addition, with some redundancy, you can replicate items at several nodes and you can have multiple pointers to route around nodes that disconnect.

The most interesting thing about this paper is the solid mathematical grounding for claims about convergence, load balance, etc, and the harsh simulation environment with high churn. Chord is shown to deal gracefully with failures and maintain short paths to most nodes. This is important to motivate the work as really practical, because P2P systems tend to have these harsh environments where most nodes are only in the system for minutes, and very few nodes are in for more than a day or so.

The main criticism I have is that the implementation was only using 10 physical sites and ~200 nodes. Today it would be possible to test such systems at larger scales (1000+ nodes) using services like Amazon Elastic Compute Cloud.

Looking up Data in P2P Systems

This article provides a simple, high-level overview of how DHTs work and why one might be interested in them. Three types of routing are covered: Chord, which is a ring with "fingers" pointing to O(log n) neigbors from each node, Pastry, which uses trees based on ID prefixes, and CAN, which splits up a multi-dimensional data identifier space dynamically into regions and moves between neighboring regions. The general idea in all of the systems is the same - keep a small number of pointers from each node, but have some kind of distance metric that lets you get closer to the destination with each hop. Some redundancy in the neighbors also lets you tolerate node departures.

Apart from the easy to read summary, the paper is interesting because it lists some of the reasons why people though P2P systems would be interesting. Basically the idea was that providing a service as a P2P system gives you extremely small expenses (just enough for some tracker service) for a large amount of storage capacity and computation capacity that scales with your number of users. The downside is of course that you have to implement a lot of redundancy and fault-tolerance. In the end, however, the challenge to DHT research was that none of the applications had so much data to index that you couldn't have a centralized index. In other words, people already knew how to build systems for content distribution (BitTorrent, etc), and people knew how to build highly available web applications (torrent sharing sites, etc), so they just put the two together. While a purely distributed index is a nice concept, any real business pretty much had enough resources to build a centralized trackers. Nonetheless, some DHT ideas are being used to provide high availability in data center applications such as memached and Dynamo.

Monday, October 27, 2008

Active network vision and reality: lessons from a capsule-based system

This paper talks about experience with an active network system, ANTS. Active networks were an active research area 5-10 years ago that, as far as I know, did not have a very large impact on deployed technology so far. The idea is to have a programmable network, where applications can have control over their routing, QOS, multicast, etc. In other words, applications run not just at the endpoints but on intermediate nodes in the network too. But what about the end-to-end principle? There were arguments that this could improve performance, and this is partly what RON showed later (although RON gave up trying to get everyone to switch their routers and just used an overlay network). Of course, apart from layering violation, disappearence of the thin waist model, etc, the other argument against active networks was security, and the need for running any user code in a carefully regulated VM or getting it signed by a central authority.

The ANTS system presented in this paper is implemented in Java and uses "capsules", which are basically data packets with associated code that can use soft-state data at each routing node to propagate themselves along in whichever way they deem best. In reality the code does not travel inside the capsules, but rather each capsule has an ID field which is the secure hash of its code, and there is a service for fetching the code associated with each capsule which takes advantage of caching. The most surprising thing about the results in my opinion is that performance is quite bad: the nodes forward about 10 MB/s at the most. The authors blame this "in large part" on Java, and it's true that JVMs at the time were very slow and provided few efficient I/O and memory access primitives, but this is not a completely valid excuse: code will need to be run in some kind of VM and be specified in some kind of cross-platform manner if you ever wish to deploy an active network on the real Internet. The authors go into some profiling to determine why the code is slow, but this misses the point - for a feasibility study for a controversial technology like active networks, it would have been much more convincing to design a fast prototype.

The paper also talks about some of the operational and architectural issues that come up when you use active networks, such as how to do resource management, how to guard against malicious code while having a short debug cycle, how to upgrade the service at runtime, etc. Although the paper is reasonably optimistic that these things could be done, there is still the unanswered question of why do we really need to jump through these hoops. In fact this paper doesn't include much in the way of experiments showing that the active network would be helpful to applications, only in listing some policies they implemented; perhaps this is covered in other work however. But in general there is a fundamental advantage to keeping your interfaces narrow, and going from "I can maybe forward IP packets" to "I will run your arbitrary code" is a big jump in interface size and perhaps not worth it for systems as variable in size, performance and hardware type, and as long-lived, as computer networks.

Resilient Overlay Networks

This well-known paper demonstrates that overlay networks controlled by the application can provide improvement in many network performance metrics over the standard routing in the Internet. The main metric considered is in resilience: the RON system manages to detect and route around multiple link failures over the real Internet, some of which lasted over 30+ minutes. However, RON can also provide improvements in latency, throughput and loss rate.

This paper is interesting not so much for its implementation details, but for the point that it makes: application-controlled routing can provide significant improvements over the standard Internet. The implementation is very simple, focusing on a very small network (O(10) hosts) with very simple paths (one-hop indirection). Even with this simple implementation, you can achieve significant improvements in various metrics. The paper thus lays the foundation for more advanced study of how to route over overlay networks, which could provide larger improvements, but its contribution is to bring this idea to the research community.

Apart from the idea as a whole working out, the most surprising thing for me was that two-hop paths are enough to provide significant performance benefits and to route around all the outages observed. This is something that I think would be non-obvious to anyone who is told about this idea without seeing the evaluation. The fact that the idea works at all is also somewhat surprising, but less so when you sit back and think about the goals that Internet routing was designed for - policy obedience and scalability. RON breaks both, although it is "good enough" at scalability that small organizations can consider using it.

I think that in practice, RON did not gain serious adoption, but it sparked a lot of discussion in the networking community. This could be perhaps because connectivity is "good enough" for most people, especially given that most people are not talking to random destinations on a RON, but rather to a small number of very well-provisioned global destinations (google.com, cnn.com, etc). However, there are also technical arguments against RON. One of them is that if everyone was using RONs to greedily optimize for throughput or latency or something similar, then routing would quickly oscillate, as underloaded links would quickly get overloaded, and then underloaded again, etc. Greedy behavior by each individual is not necessarily good for a stable, high-utilization, high-throughput system.

Tuesday, October 21, 2008

A First-Principles Approach to Understanding the Internet’s Router-level Topology

I liked this paper. This paper looks at Internet topology generation work from a different angle: how well do the generated networks perform given physical constraints on router technology (number of ports vs bandwidth)? The answer is that they perform poorly. This means that while the generated networks match the degree distributions seen in the real Internet - which is not surprising because it is exactly how the generators were designed - just choosing random graphs with this degree distribution does not give "good", well-performing network designs. The real Internet is not built by a fully random process - it's built by people who are trying to provide good performance! Your random network can't match the performance properties of the real Internet if your generator doesn't also strive for performance. This makes a lot of topology generation work and work in algorithms evaluated using random topologies look fairly dubious.

I liked that there is a good explanation of why the different networks perform differently. The idea is that if you want a high-performing network, you want edge routers to have high degrees (servicing many users) and core routers to have relatively lower degrees (thus supporting higher-bandwidth links). The random graph models fail to do this. I also liked the methodology for showing what a heuristically optimal topology looks like (take a graph and change it while preserving degrees), and the plot of performance vs likelihood under the random graph model which basically means that well-performing graphs are unlikely to arise by chance (network engineers really do earn their pay).

It was pretty surprising that this paper came out in 2004, almost ten years after the previous paper and the surrounding flurry of work on topology generators. That's a long time of looking only at arbitrary graph properties instead of trying to see whether the generated networks are in any way realistic! It's disconcerting that many routing algorithms, etc were designed for these random topologies and may do bad things on a network that actually looks like the Internet. This all goes to show that real implementation is the best evaluation. Finally, the idea of looking at a generated network's performance and trying to make generators work like real network designers seems obvious in hindsight, but it seems to be one of those obvious ideas that people have trouble coming up with until someone else points it out to them.

Monday, October 20, 2008

On Power-Law Relationships of the Internet Topology

This paper was pretty interesting because it looked at mathematical properties seemingly obeyed by the Internet graph based on snapshots at different times. Several "laws" that produced good fits were identified. All were power laws, implying heavy-tailed distributions. Such distributions are very common in systems used by people (e.g. content popularity on the Internet) as well as natural systems. The laws identified involved distribution of ranks vs degrees, degree frequency vs degree, hop count vs number of nodes, and eigenvalues. I thought that the hop count one was particularly interesting because it is a measure of the "connectedness" of a graph. The degree found was about 2.8 for the router graph, implying that the Internet is "more connected" than a 2D grid but "less connected" than a 3D grid. This seems to be expected on a two-dimensional planet.

The main question with this paper is how to use this work. The most reasonable proposal is to validate Internet topology generators used in simulations. Still, the laws don't tell us how bad a graph that doesn't meet them is at approximating the Internet - in fact it might be a "harder" graph to route through / make reliable / whatever the algorithm is doing, in which case it's okay to test on it. The laws also might not be sufficient conditions for a realistic graph, so still the best way to do a simulation is with real topology data. Finally, the authors do use the power laws to try to predict Internet growth; I'm curious how well that works if extrapolated to today.

Another question is how many of these laws will arise naturally in a randomly generated graph [if generated according to some sensible model]. Certainly the hop-count one for example seems reasonable for planar graphs. The eigenvalue one also seems like something that could happen in random graphs no matter how we generated them, especially because it has little physical interpretation. The other laws may work in the same way. If this is the case, do the laws really imply something fundamental about the Internet?

Thursday, October 16, 2008

Directed Diffusion: A Scalable and Robust Communication Paradigm for Sensor Networks

This is another paper about collecting data in sensor networks, looking at the problem from a data-oriented angle. The paper suggests a "diffusion" model where nodes interested in some data create "gradients" to receive it and the data flows towards them. This close resemblance to how substances flow towards a destination in the physical world is attractive because it is intuitive and it seems like it should be pretty robust to local problems. However, we have to ask how well it will work in practice, especially given that we've seen similar "realistic flow" schemes, such as the TORA algorithm in the MANET routing paper, perform poorly.

Apart from that, I think another weakness of the system is the generality. In real sensor networks, you probably don't have multiple destinations interested in multiple types of data, but rather one collector. In this case, why not build a good delivery tree using some one-time algorithm, rather than worrying about setting up gradients?

Also, like TAG, this paper uses mostly simulation for its evaluation. Again, something that works in simulations might not work okay in real life. For example, the choice of sending interests every 5 seconds seems to be far too often for a power-constrained sensor network. So does having 5 random sources and random sinks.