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.
Wednesday, September 10, 2008
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.
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.
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:
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:
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.
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.
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.
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.
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.
Subscribe to:
Posts (Atom)