Sunday, September 28, 2008

A Comparison of Mechanisms for Improving TCP Performance over Wireless Links

This paper compares the performance of many proposed techniques for TCP over wireless links by testing them on a real implementation with simulated losses. The evaluation is thorough, trying various combinations of techniques. The techniques fall into three broad categories: link layer techniques which correct losses locally, end-to-end modifications of TCP congestion control, and split-connection techniques where the TCP connection ends at a base station and a specialized protocol is used for the last hop to the host. It is shown that link layer techniques need TCP-awareness to perform well (that is, they need to suppress duplicate acks resulting from packet reordering even if they do retransmit packets quickly, to prevent the sender from reducing its congestion window). With TCP-awareness, these techniques perform the best. End-to-end techniques such as SACK are also effective, though they require modifying the protocol. Finally, split connection techniques don't provide more performance than the other two types, and come with the extra baggage of changing TCP semantics and making handoff more difficult, so they do not appear to be an attractive choice.

I liked this paper because it introduced a lot of the research in this field without requiring us to read about every single technique separately. At the same time, the evaluation is insightful and shows the real issues with each technique.

The main aspect I didn't like was that although the implementations used in the evaluation were real, wireless losses were simulated using a rather simple distribution of errors. It's not at all clear that this is representative. There is a section in the paper that deals with burst losses, but it is small and not as thorough as the rest of the analysis, and even then the burst loss model is rather simplistic. This kind of paper would be much stronger if it was based on evaluation in real networks in a variety of settings, especially because the differences between some of the better-performing schemes are pretty small and could presumably change around in different environments. Thus the absolute ordering of the techniques with respect to performance can't be taken as definitive, but the lessons about what aspects of a protocol improve its performance are still useful.

MACAW: A Media Access Protocol for Wireless LAN's

This is a very well-written paper about media access in wireless networks. Naively, one might expect that the RTS-CTS exchange seen in undergrad is enough to solve most of the problems in wireless media access control, and treat wireless LANs as yet another link layer, but this paper shows how, in many areas, simple algorithms fail to perform, as well as how to fix them. The contributions can be summarized as follows:
  • A milder backoff algorithm, combined with sharing backoff values with other nodes, to improve both performance and fairness.
  • ACK messages for fast retransmissions when loss rates are high.
  • DS and RRTS messages to synchronize timing when senders are competing for the medium.
  • Separating backoff values by destination, to deal with the problem of noise / local contention causing global performance drops when the backoff is shared.
The main themes are sharing contention information to increase fairness and synchronizing senders to prevent one stream from monopolizing the channel.

I really enjoyed reading this paper because it manages to introduce a problem, describe existing approaches, explain problems associated with them, and provide well-motivated solutions in ten concise pages, without requiring background knowledge or skipping over details. It's uncommon to find papers which both define and explore a field this way.

My main criticism is about the choice of setting and evaluation methodology for the paper. The experiments in the paper are all based on simulations, which are in turn modeling the "base station and pad" environment at Xerox PARC. This leads to two questions: First, how similar is the PARC wireless LAN to other types of wireless LANs? Are there issues in other wireless networks that don't arise in PARC's, e.g. due to capture and interference? Second, how well can any simulation capture the variations and subtle effects of wireless transmission in the real world? The paper would have been stronger with an evaluation using real pads, or with other wireless technologies, if any were available at the time. Nonetheless, the problems studied and the solutions proposed are pretty general, so the work should be useful for designing new wireless networks.

Tuesday, September 23, 2008

A Fast Switched Backplane for a Gigabit Switched Router

This paper provides an introduction to how high-throughput switches and routers are designed, focusing on how to employ a switched backplane effectively. I liked the fact that the paper started with some context about other router design choices (centralized CPU/memory, one CPU per line card and bus, etc), since this explains the historical context and the reason why we are worrying about switched backplanes. Beyond this, the paper explains several concepts/algorithms that can make a switched backplane efficient:
  • VOQ (having one queue per output at each port), which avoids the "head of line blocking" problem where packets need to wait until the one at the head of a FIFO queue has had a chance to go to its desired output. I liked the traffic analogy for this.
  • Fixed-size cells, which simplify the scheduling to a timeslot-based process and thus improve efficiency.
  • iSLIP / ESLIP, a bidding-based heuristic algorithm that finds a matching between inputs and outputs quickly on each timestep.
  • Using the properties of the switch fabric to replicate cells for multicast.
  • Priorities for QOS.
  • Speedup of the switch fabric compared to the input rates to prevent blocking-related reductions in throughput (apparently 2x can be sufficient).
  • Fanout splitting for multicast (allow sending on some links even if one is not scheduled to send on all of them).
These techniques are all explained intuitively and evaluated through analysis/simulation. It's useful to see them all in one document as a set of guidelines.

One question I have about the work is how to support more advanced queueing disciplines than FIFO with priorities in this kind of fabric. When we read the fair queueing work, we said that fair queueing is supported in today's high-speed routers, but how would it be done in a switch like this? Is it possible to implement it only at the line cards and then use the 2-3 priority levels for scheduling outputs? Perhaps this is discussed in other papers, but it wasn't discussed in this one.

From the point of view of organizing the course, it would make more sense to put this paper before the 100 TB router one in the reading list.

Scaling Internet Routers Using Optics

This paper explains how a 100 TB router may be designed using future optical technology. The basic idea is to take the Load-Balanced Switch design and fix some of its problems, including creating a fabric that can switch rapidly, packet mis-sequencing (which is fixed by the FOFF policy for spreading work evenly across second-stage queues and a buffer), and working when some linecards are down (which is solved by a complex modular design). The switch design is notable because it requires no centralized scheduler, achieves full throughput, and is agrued to be feasible using technology a few years from now. However, the main shortcoming of the paper is that there is no implementation even of a prototype, and so no way to actually evaluate the switch design. This means that for practical purposes, this is still only design work for improving the Load-Balanced Switch, and may not necessarily lead to a good implementation. Since I don't know much about the hardware used in switches and trends in its manufacturing, it's very hard to tell how realistic the design is.

One interesting aspect of the paper is the point that using optical fabric can reduce power usage. Certainly, power is a very significant concern in network equipment, and the availability of nearly zero-power switching fabrics using optical technology is exciting. However, electronics will apparently still be needed for routing decisions. How much power will be wasted in converting from optical signals to electronic ones? The paper seems to gloss over these points, maybe because the answer is very well-known, but it's hard to tell how feasible the design is without this knowledge.

Wednesday, September 17, 2008

Supporting Real-Time Applications in an Integrated Services Packet Network

This paper provides a pretty detailed design for a network supporting Integrated Services QOS, including what types of services to provide and how to schedule packets at the routers. There are several interesting and nonobvious ideas. First, the paper categorizes applications into rigid or adaptive and tolerant or intolerant, a useful taxonomy for examining how applications' needs differ. Second, the paper presents "predicted" services as an important service class. Predicted services differ from guaranteed capacity and delay bounds by saying only that an application will get similar performance to what it had in the past if network conditions continue to be similar. Even though this means there are no hard guarantees, it can lead to much better utilization of the network due to statistical multiplexing, and it is actually a useful service model for playback applications because they can adjust buffering intervals and rates to compensate. Third, in the packet scheduling part of the paper, we see that while Fair Queueing is a good way to isolate flows and provide performance guarantees, FIFO scheduling leads to much better potential throughput and performance for predicted services as long as flows are well-behaved. Again, we ultimately want to take advantage of statistical multiplexing to make the network efficient. Finally, the paper combines weighted fair queueing and priority scheduling to support guarnateed, predicted and best-effort traffic in the same scheduling algorithm. There is a well thought-out explanation of how priority shifts jitter between classes, FIFO minimizes average delay, and WFQ provides isolation.

One weakness of the paper is the service model chosen - describing flows' needs explicitly based on token buckets, delay bounds, etc. It seems difficult to calculate the requirements for an application, and even more difficult to get people to provide reasonable requirements rather than asking for more than they really need. Any design based on reservations will also have pricing complexity and scalability challenges (how to perform allocation). Admission control will also be a challenge (and the paper only briefly mentions how it might be performed). In the end, perhaps predicted service is the only class of "better-than-best-effort" service we can provide in the Internet in a usable, scalable fashion, by giving it a simple pricing model (say 2x more expensive per byte). This is more or less what work on Differentiated Services tried to achieve.

The paper also focuses mostly on a complete system design, rather than on what's needed for incremental deployment. While this is necessary to present an idea in its complete form to the research community and to focus light on the core issues, it may reduce interest in the work because there isn't any clear path to evaluation and deployment. Often researchers provided at least a network simulator implementation for proposed router mechanisms or transport protocols, but I think this paper had neither of those.

Fundamental Design Issues for the Future Internet

This paper takes a step back from QOS work and explains economically why QOS might be a good idea, and what issues need to be resolved in implementing it. The author uses a utility model to quantitatively explain some of the motivation for QOS and help understand the design choices. For example, he shows that priority scheduling provides better aggregate utility than FIFO when some flows care more about delay. Utility functions are also used to explain convincingly why best-effort works for bulk transfer applications but not for realtime applications where utility drops sharply below a certain level. This is an argument for admission control. Some back-of-the-envelope calculations also show that overprivisioning may not be sufficient if even a small number of users have extremely large flows. Finally, the author explains the tradeoff between different ways of identifying service classes for flows: while identifying them automatically in the network based on port number, protocol type, etc helps reuse applications, a pricing model approach where applications choose their service class can lead to more flexibility.

Obviously QOS did not take off in the wide-area Internet, and the reasons this happened provide valid criticisms of the paper. The main reasons why QOS didn't take off were probably improvements in bandwidth (and its price) and the difficulty in charing for services that use QOS. Despite the fact that a QOS system could increase utility for everybody, that kind of market won't be set up if it's complicated to determine pricing, account for usage, explain charges to users, get users to accept variable per-month pricing, etc. These "mundane" details were probably as important as technical challenges and architectural rigidity in hindering adoption of QOS, because it would be easy (if hacky) to wrap around existing protocols and clients and just put applications in the best-effort class if they are not specifically marked for QOS. The improvements in bandwidth also helped. Finally, there was perhaps less demand for online video than expected because of the distribution costs (multicast could have helped here, but it also didn't really take off). Many computer networking researchers express some surprise that in the end YouTube, with its non-live, low-quality content, has become the main form of online video.

Nonetheless, the fact that QOS didn't take off and the Internet is doing okay doesn't mean that we shouldn't consider how much better the Internet could be with a different service model. Certainly online video and audio services are still challenging to implement, low in quality, and not used extremely widely. Other interactive applications, such as games, also suffer from the unnecessarily large latencies imposed by the Internet - ask anyone who plays them. Even "bulk transfer" web-based applications use dedicated links or CDNs such as Akamai to reduce latencies, which has a significant effect on user engagement. So in the end, if we see *any* major qualitative change in the Internet in future years, it could well be due to lower latency enabling new applications.

Sunday, September 14, 2008

Random Early Detection Gateways for Congestion Avoidance

This paper describes the Random Early Detection queue management strategy for routers, which provides feedback to TCP connections before congestion occurs to keep queue sizes small and avoid drops, thus improving both throughput and delay. RED works by marking packets for congestion with some probability when the queue size is between two thresholds, and then marking 100% of packets when it exceeds the max threshold. This "smooths out" the congestion notification, rather than going from allowing everything through to dropping everything. It also keeps queue sizes small, avoiding unnecessary delays. Finally, the use of marks reduces packet drops while still avoiding congestion (although RED can also be used with drops, and this would mean no changes to endpoints are necessary).

The paper is especially interesting for its detailed analysis of the problem and its comparison with similar proposed schemes. An especially interesting aspect is how RED is designed to avoid synchronization - many connections lowering their window together, than raising it together, etc, leading to oscillations. Synchronization is a rather scary aspect of end-to-end networking, and several of Sally Floyd's papers address it and have perhaps helped prevent it in many protocols in the global Internet. XCP is also designed to reduce oscillations, and this is how it gains in throughput over TCP even in some low-bandwidth-delay-product settings. In the XCP paper, it is mentioned that even RED can't manage oscillations perfectly at very high throughputs, but RED clearly works well in the experiments in the paper.

Finally, unlike some other QOS mechanisms, RED with drops is fairly easy to deploy incrementally and provides a benefit even to legacy protocol. Is it actually available today on any routers? RED with just marking, on the other hand, still has problems because the end-hosts would need to be able to understand the markings (in fact, un-upgraded hosts would have an advantage over upgraded ones).

XCP - Congestion Control for High Bandwidth-Delay Product Networks

This paper presents a clean-slate router-assisted transport protocol that overcomes some deficiencies of TCP. In a nutshell, XCP asks end-hosts to state their congestion window and RTT estimate in packet headers, and uses this information to provide exact feedback about how they should change their window. This can be done without per-flow state. The main selling point for XCP is better performance on high bandwidth-delay product networks, where TCP is known to perform poorly and to become unstable (partly due to having to use additive increase of 1 packet, partly due to using losses as congestion signals). However, XCP also provides other advantages, such as fast convergence to efficiency and fairness, very low queue sizes, virtually nonexistent drops, separation of the efficiency and fairness controllers, and support for differentiated services. Simulations show that XCP performs as well as TCP or better in a variety of common scenarios (not just high delay-bandwidth product networks). All of this evaluation is necessary to motivate of XCP because it requires significant changes to the network: support in every router and end-host, and the architectural change of performing congestion control based on fields in the packet headers.

My main criticism of the paper is against keeping per-flow state in packet headers. The issue with this is that it's very easy to cheat at an endpoint, or to have a misconfigured router overwhelm a link. In a TCP-based network, congestion due to any reason causes packet drops, which are a signal to every host to reduce their rate. The drops can also be arranged to affect the misbehaving sender more than the others through something like RED. However, in an XCP network, there is plenty of capacity in the queues, so a misbehaving sender may get most of their packets through just fine, while still degrading performance for other users. The authors suggest policing at the edge of the network, but this is difficult to deploy, and there are few incentives for ISPs to do it. Even worse, an attacker may attack XCP *without* creating a large flow by simply requesting capacity as if they were to start a large flow. The network has to grant this capacity and reduce that of other flows, but there is no way to detect that the flow isn't actually going to use the bandwidth until some time later. This is like a SYN flood against routers. In contrast, TCP will utilize links pretty well even when many small flows are open. In summary, it seems that TCP should inherently be more robust to misbehaving users on a large network than XCP.

The work is nonetheless very interesting because of the magnitude of improvement that can be achieved, and it's one of those papers that makes us question the TCP-IP model. However, the main deployment challenge for these schemes is still to provide a compelling reason to switch from the existing IP infrastructure (which is rapidly improving in performance over time) while maintaining backwards compatibility with as many of the useful services built on TCP/IP as possible. In the end, higher performance on high bandwidth-delay product networks may be a good reason to switch away from TCP, but we're far from a point where this matters for most users in the Internet yet (Comcast, if you're deep-packet-inspecting this, it is meant at you!).

Wednesday, September 10, 2008

Core-Stateless Fair Queueing

This paper solves one of the main issues with fair queueing - the cost of maintaining per-flow state - by showing that it is sufficient to maintain state at the edge routers and have the larger core routers run a stateless algorithm. This would enable much wider deployment of fair queueing because the border routers that maintain per-flow state don't need to be nearly as fast as the central ones. The core-stateless fair queueing algorithm achieves this by approximating the behavior that would occur with fair sharing. First, edge routers compute a rate of arrival for each flow, and mark packets from it with this rate. Second, core routers use FIFO queueing and a probabilistic drop algorithm to drop packets based on the proportion of packets that would have been dropped from each flow under a fair sharing discipline. There are a number of mathematical heuristics used to approximate this, but in the end, the process appears to work reasonably well, showing sensible results in simulations.

This work is interesting both because it enables something that previously seemed intractable (fast fair sharing) and because the general idea, minimizing logic in the core of the network, is powerful and perhaps more widely applicable. The idea in CSFQ is somewhat reminiscent of the end-to-end principle, except that trusted network nodes (the edge routers) take the roles of endpoints for the purpose of congestion control, and the reason for removing logic from the center is performance, not just good design. However, some of the design advantages are there - for example, the edge routers can be reprogrammed to support a variety of forms of sharing based on different definitions of flow, without modifying the core routers. Similar marking schemes have been proposed for security in the Internet (identifying sources of malicions flows and preventing DOS attacks).

The paper is lacking a bit in the evaluation section, first because CSFQ sometimes does poorly and it would be nice to characterize exactly when this happens, and second because there is no implementation. I'm not sure how easy it would have been to use Click or NetFPGA at the time this was written, but having a demo of CSFQ at "line rates" would have been very convinging. The work also does not address one of the issues that has really plagued QOS research, namely deployment, though it makes design of QOS-supporting routers more feasible.

The math in the paper also includes a number of approximations, and there's a risk that these may interact poorly. Because the system is pretty complex, the only way to really be sure is to run more simulations, perhaps trying different estimaton algorithms, drop algorithms, etc.

Analysis and Simulation of a Fair Queueing Algorithm

This paper introduces the idea of fair queueing, which has played a major role in quality of service research on the Internet. The key insight in fair queueing is to simulate an "ideal" router that can send one bit at a time, which serves to isolate flows from each other. The scheme proposed approximates this by computing when packets would have finished being sent in this ideal router, and scheduling them in that order. This is shown mathematically to approximate ideal fair queueing within some rather complex-looking bounds. The paper also includes a number of simulations showing how fair queueing would behave in real networks. Finally, it explains how the fair queueing model can be extended to support weighted shares as well as a "boost" for new flows to reduce their delay.

Fair queueing played a big role in design of QOS systems because it provides a simple and feasible primitive for isolating flows and guaranteeing capacity. A lot of the QOS work beyond this was on how to mark flows, how to admit them, how to implement weighted fair sharing more efficiently, etc. Fair queueing was is also used in some papers on proposed DOS prevention attacks (e.g. putting connection requests in one service class, and moving those flows into another service class only when the receiving host signifies it wants to accept them them).

The main problem with actually running fair queueing per source-destination flow is maintaining per-flow state. I believe this still isn't possible at high speeds in today's routers. Therefore, Internet routers still use FIFO. However, QOS schemes that require only a few service classes (and hence fewer flows to maintain state for) have also been proposed.

Sunday, September 7, 2008

Congestion Avoidance and Control

This classic paper introduces the bulk of the congestion avoidance and control mechanisms in TCP. Prior to this paper, TCP used a window only for flow control and transmitted packets gratuitously as long as the receiver had buffer space, leading to "congestion collapse" of the Internet (!). Its behavior in the face of losses was also bad, placing even more load on the network. Van Jacobson and Karels' work introduces two main ideas. The slow start algorithm increases the maximum window size exponentially until a packet is dropped and we are close to the path's bandwidth-delay product. The congestion avoidance algorithm performs a multiplicative decrease of the window size when a packet is lost and uses additive increase otherwise, a scheme which is argued to lead to fairness and stability. Underlying both of these is an improved RTT estimator which also estimates the standard deviation of the RTT in order to set timeouts appropriately. Finally, when multiple packet drops occur, indicating very heavy network load, the work suggests using exponential backoff for retramsissions, a very sensible policy also used in media access control.

One interesting aspect of this paper is the use of control theory and queueing theory to justify the algorithms, as in the previous paper. Although theory might not perfectly reflect reality, it provides a guide to what approaches to considerl. In this paper, the theory is also backed up by serious experiments using a real implementation. Also, unlike the previous paper, this one uses mathematics designed to deal with complex time-varying systems, such as the linear system theory result that motivates exponential backup.

This work was meant first and foremost to solve a real problem - collapse of the Internet. As a result, the main thing missing is some fine-tuning to get not just non-catastrophic, but really good behavior out of the system. The authors mention fairness as one area which is lacking and suggest that some work will have to be done at the gateways, which many future papers try to do. In addition, the recovery mechanism described in this paper overcompensates, aiming mostly to keep the Internet stable, so a lot of future work involved fast recovery, selective acknowledgements, etc.

One surprising and somewhat scary element of the paper is how it justifies constants chosen using measurements from the Arpanet at that time, such as the 1-packet increase per RTT and 0.5-decrease on congestion seen in Appendix D. Although these choices seem to have worked okay, it would have been more comforting to show a set of values that works in general, not just in the 1988 Arpanet.

Analysis of the Increase and Decrease Algorithms for Congestion Avoidance in Computer Networks

This paper evaluates various options for linear control functions for preventing congestion in a computer network and demonstrates that an additive increase, multiplicative decrease (AIMD) algorithm is optimal. The paper is very interesting to read because it illustrates the concepts using very intuitive graphs - first a graph of the effects of load on throughput and latency in a network, and second a set of graphs showing how the allocations of two hosts change with respect to fairness and efficiency under various control functions. These graphs show intuitively how AIMD converges to both efficiency and fairness and how its step size decreases, leading hopefully to stability. However, in addition to the graphs, the authors mathematically derive the conditions required for correctness, and then for optimal convergence and stability. A key part of this is done using Jain's fairness metric [6], which is a simple score from 0 to 1 with nice properties, such as being scale-independent and being equal to k/n if k out of n hosts receive service. Finally, the paper talks about nonlinear control functions as well, but explains that they may be overly sensitive to system parameters because they will require multiple scaling factors to be set together in order to move along the correct directions for convergence.

This paper is a great example of how mathematics can support the design of network algorithms, by giving an extra source of confidence to heuristics that seem to work well in practice and telling us right away when some heuristics should be avoided. Of course, this paper is almost entirely mathematical, and a good system paper should include at least a simulation too, if not an evalulation of a real implementation. (The standard seems to have gone up towards real implementations over time.) Because this paper was written after AIMD schemes had been proposed, it seems to aim only to justify the existing schemes, provide a language for discussing congestion avoidance, and warn against some flawed control functions.

One flaw of this paper is that it only considers fairness and efficiency over a single link, and does not discuss what happens in a more complex network. In a full network, different links may be bottlenecks for different flows, and fairness is harder to define. A larger network also has more delay in receiving congestion feedback (not that delay isn't high anyway if we use dropped packets as the signal like TCP does), so it motivates looking into the stability of the scheme over longer periods of time as well.

Wednesday, September 3, 2008

Inferring AS Relationships in the Internet

This paper uses a list of advertised routes seen by one BGP router to infer some of the peering and transit relationships between Autonomous Systems. Since ISPs keep these confidential, this is a necessary tool for the research community in understanding the topology of interdomain routing relationships. This data can be used both to quantitatively study the Internet and to provide realistic topologies for simulations. The main property of BGP that makes this work possible is the fact that it advertises complete paths, not just next-hops.

The paper uses a number of clever heuristics to identify AS relationships. First, there is an introduction to BGP and a rather complex explanation of what kinds of paths may occur given the routing incentives in BGP. In summary, you will go up a customer-provider chain, maybe accross a single peer link, then down another chain, and you may also go through sibling relationships during this process. It never makes sense to go from a provider, to a consumer, and then up to a provider because the consumer would not allow this, and it doesn't make sense to have a peer edge anywhere but the "top" of the path because peering is only used to have one ISP's customers talk to one of its peers' customers. This path structure is combined with heuristics such as using sizes to find top-level AS'es and assuming that peers are of roughly similar size. Together, these yield first transit relationships and then peering and sibling relationships.

The inferred relationships are verified mostly using internal data from one major ISP, AT&T. While they match very well there after refining the algorithm, it is unfortunate that the author could not get confirmation from other ISP's as well, because there's a chance of overfitting the parameters for the algorithm to AT&T. Other AS'es might also be very different in nature from AT&T, by being smaller in size, having more or fewer siblings, etc. Has the technique been evaluated on more ISPs since this paper was published? Is it the best way of inferring AS relationships known so far?

Some interesting philosophical questions raised by this work may be:
  • If the technique works well, are ISP's using it to infer peering relationships themselves? If so, could this be an argument to get them to open up this data?
  • What would the benefit of fully open AS data be for the networking community, compared to this heuristic?

Interdomain Internet Routing

This note set is an interesting choice for a third reading because it covers a topic that has not been focused on very heavily in research, and is mostly in the realm of commercial providers - interdomain routing. Because of this, the protocols and algorithms used are shaped primarily by a commercial goal - enforcing policies to minimize monetary costs given the various business relationships between AS'es - rather than more "intellectually beautiful" goals such as performance, reliability, load-balancing, etc. The only feature BGP tries to provide is reachability while following policies. Beyond that that, its other design goal is scalability, which is handled by making the protocol relatively simple (dropping the more expensive features that could improve performance, load balancing, etc) and using long timeouts and damped propagation for route changes (decreasing reliability). The combination of policy-motivated goals and confidentiality of business relationships has likely contributed to lowered research interest in BGP compared to other protocols such as TCP, OSPF, or even IP, because a) the problem is difficult to fully understand, b) it is less "sexy" than working on mathematically clean issues like fairness and performance, and c) even if one develops an alternative system for interdomain routing, it's hard to evaluate the system for the purpose of scientific publication. This is a problem that all researchers have to deal with - how can we do socially relevant research if the parties involved are not interested in sharing information and the problem is confined to a small set of providers? Nonetheless, the note shows that interdomain routing is a serious concern with great potential for improvement, especially in reliability (speed of recovery after failures).

In terms of content, there are four main takeaways:
  • AS'es come in different sizes, and have both client-provider and peering relationships. They advertise only routes that are necessary for serving their customers while minimizing monetary cost (both from paying a provider and from transfering packets through one's own network).
  • BGP advertises complete paths annotated with attributes, to avoid loops and provide information for selecting between the paths based on commercial agreements and policies (e.g. MED).
  • Paths are chosen according to a hierarchy of goals: local policy, shortness of path (in AS hops), MED (preferred entry point inside a customer), "closeness" of egress router (get the packet out of the ISP as fast as possible), and finally some tiebreak condition.
  • Recovering from problems is slow: it normally takes at least several minutes, and sometimes 30 minutes or more.
One criticism of the note set is that it does not provide more recent data on prevalence of failures. Also, the failures caught by the various traces are likely not representative of the average failures experienced by users of the Internet: Users spend most of their time on very popular sites, which tend to have multiple ISPs, perhaps even multiple data centers, CDNs hosting data within the users' own regions, etc. How often are these Internet destinations "down" compared to routes between random pairs of nodes set up by universities? Apart from these huge destinations, other destinations are likely local sites (e.g. as a Berkeley student I want to see Randy's course webpage), so there are fewer opportunities for route failures, or peer-to-peer networks, which work despite some links being down. It would be interesting to study reliability of specific applications for users in various regions, not random Internet paths.

There are obviously many possible places for improvement in BGP, starting with reliability. It would be great if BGP focused more on path costs, for example. With all these things, it's important to ask not "is BGP providing optimal routes" but "how much better can we really do"? For example, on the throughput front, it's likely that we can't really increase Internet throughput through a better interdomain protocol - the backbone is often overprovisioned, and last-mile links or servers are the bottleneck. However, perhaps latency could be improved by a significant amount.

Monday, September 1, 2008

Design Philosophy of the DARPA Internet Protocols

This paper explains how the goals of DARPA shaped the design of the Internet, providing both historical context and a set of examples for other protocol designers to consider. The most important thing to note is the prioritized goals of the Internet - providing a way to interconnect networks first and foremost, but then, in order of priority, providing fault-tolerance, flexibility in service types and network types, management, low cost, etc. These goals led to the policy of maintaining state at the endpoints, the best-effort, self-routing datagram model, the layering of TCP as one of several possible transport protocols over IP, the byte-stream nature of TCP, etc. It is also interesting to read about some of the design debates that occurred about protocols that we now take for granted. For example, worries about single-character packets from remote login applications flooding the network or about how to manage buffers when dealing with EOL's in TCP seem bizarre today, but they were real concerns at the time, and thankfully led to design decisions that still make sense today (such as allowing fragmentation and reassembly in IP, or removing EOL's from TCP).

The paper is also good at pointing out some of the shortcomings of the TCP/IP model, such as poor support for resource management and accountability. Resource management has been the topic of considerable research efforts in congestion control and QOS. Accountability is coming into the spotlight as denial-of-service attacks begin to be a serious threat, and work such as the Accountable Internet Protocol is beginning to try to address it. Interestingly, Clark suggests some of the techniques used today for these features, such as soft state and keeping track of flows.

One concern that the paper surprisingly does not mention is security, not just at the level of preventing denial-of-service, but also in routing mechanisms, TCP, DNS, etc. There have been numerous attacks discovered and fixed for these basic services. However, in the original Internet, the threat model was clearly just physical destruction of particular hosts and links, and perhaps this was still true in 1988 when Clark wrote this paper. Perhaps this means that DARPA thought the Internet would only be used by themselves, but today it is important to be able to "defend" the Internet in general for the benefit of the entire economy.

In summary, this is an interesting paper to read as an introduction to networking, because it provides historic context, shows the range of problems that had to be addressed, and encourages thinking about the design decisions in the basic protocols of the Internet that we mostly take for granted.

End-to-end Arguments in System Design

This paper presents one of the most fundamental design principles in distributed systems, that of implementing functionality at the endpoints of the network rather than providing complex features in the intermediate hardware and software. The most powerful reason for this is that implementing functions in the network may be not only inefficient, but inadequate: Functions such as error recovery, duplicate data detection, acknowledgment transmission, and security can only be done end-to-end, because even if single links can provide them, there is no way to guarantee that the concatenation of multiple links has worked correctly without checking at the ends. If a function will be provided by the ends, then duplicating it in the network may do nothing more than add overhead. However, there are also other reasons to favor the end-to-end approach: Keeping the network's requirements simple provides the flexibility to run either new functions or improved implementations of existing functions at the ends, over the same hardware. In this light, the network should strive for a similar role to the RAM or disk in a computer, providing a minimal interface to some resource in order to let applications use it as they wish, rather than trying to supply a complete system which anticipates all possible higher-level functions.

Putting all functionality at the end-points is of course impossible, and the paper does say that functionality in the network may be useful for performance. The main example of this is error detection and correction: performing these checks at the link layer leads to much greater efficiency than sending a packet through multiple links and only then checking it. However, in general, this applies to any functionality where the problem size scales with the size of the network and the issue is not fully under the control of the application: For example, in the Internet, routing is a function performed by the network rather than the end-nodes.

One very important argument for end-to-end design is not explicitly stated in the paper - that by keeping the network functionality minimal, we can support multiple types of hardware devices and software on the same network. This is a social and economic argument - it means that vendors will be more likely to adopt the design, leading to an ecosystem of complementary and competing products, which improve the utility of the system for everyone. In fact, this phenomenon is called the network effect. While the Internet may not have been designed with creation of a commercial ecosystem as a explicit goal, the network effect let it grow rapidly and ultimately benefited even its original military users.

The main shortcoming of the end-to-end argument is that it does not explain exactly which set of functions should be provided by the network and whether there are limits to what can be done with, for example, the IP model. This is the source of many networking research topics, including multicast, active networks, mobility, denial-of-service prevention etc. This issue is still mostly unsolved today.

In summary, this is a good paper to begin a networking course with because it introduces both the wide range of concerns faced by a network (reliable delivery, acknowledgments, security, etc) and an important argument against the ever-present temptation to add more functionality into a system.

Hello world!

This is Matei Zaharia's blog on networking papers, for Randy Katz's graduate networking course at UC Berkeley. Randy is conducting the ultimate evaluation of Web 2.0 collaboration tools, by having students comment on the readings online, and I'm looking forward to being part of the experiment.