Sunday, February 1, 2009

Crash: Data Center Horror Stories

This article talks about two data center failures that were caused by faults in the power distribution equipment coupled with design mistakes. Although the article is only about hardware faults, it contains some interesting lessons that should be considered in designing both hardware and software.
  • First, anything can fail, even core infrastructure such as power-conducting equipment, and one undefended failure mode can bring down the entire system. One needs to ensure that there is no single point of failure in any aspect of the data center, not just obvious ones like machines or external power failing. One example story of a non-obvious "core component" failing in software is the EC2 outage earlier this year where a bit error induced in one machine led to erroneous information being propagated to all nodes in the system by the gossip protocol.
  • It is important to test failure cases to make sure the problem cannot escalate. In general, and in software in particular, it seems very hard to design systems that fail gracefully - software never checks for "reasonable" values on timeouts, status messages, etc, and one cannot isolate software components by physical distance like one can with hardware.
  • Finally, lesson three in the article - use datacenter-grade components only - may also be interesting to apply to software. Indeed, many data centers try to use either commercial software or proven open-source software. As researchers interested in data centers, however, we need to keep in mind how we plan to ensure that our work is datacenter-grade if we build new things. Again, I think this points to the importance of testing. It's shocking how little time is spent in systems, DB, etc courses on software testing, when testing is the main process through which bugs are kept in control in a production environment.

Friday, January 30, 2009

Now Featuring Clouds!

This blog is now repurposed to hold reading summaries for Ion Stoica's course on cloud computing.

Monday, November 24, 2008

Improving MapReduce Performance in Heterogeneous Environments

I obviously can't give an unbiased view on this paper, so I'll use this as an opportunity to list all the things we could've done which would have improved the work:
  1. Comparison of LATE versus a progress-rate based approach to detecting slow nodes, rather than just saying "those won't work" based on an example. While it's true that giving one example of how progress-rate approaches may speculate the wrong tasks is enough to recommend not using them in practice, Hadoop's scheduler has some glaring problems, so it would be nice to see how well LATE does vs a more reasonable scheduler.
  2. Analysis of the contribution of each part of LATE - how much do we gain from the cap, slow node threshold, slow task threshold, etc? These are interesting questions we could answer to contribute to the "science" aspect of the paper, but we didn't have enough time and space.
  3. LATE doesn't take into account the amount of data each task has to process yet. We say that in a well-behaved MapReduce job, tasks should have roughly the same amounts of data. This is easy for mappers because they use a single input chunk. It's harder for reducers, however, because you may have popular keys which get more data than others. In this case, reportng some information about total amount of data for this reducer would solve the problem (and LATE would have to be modified to launch a backup only if the backup node's progress/byte/sec is higher than the original node's).
  4. LATE is still "reactive" in that it launches tasks at all available opportunities and only then corrects if it has some stragglers. It might be interesting to have a "proactive" scheduler which plans which nodes to use in advance. Of course nodes' characteristics change over time so this may have some pitfalls.
  5. Evaluation with a more realistic benchmark. Sort, grep and wordcount are actually pretty representative of real-world workloads, and in fact the gridmix benchmark from Yahoo consists of just sorts and scans, but it would be nice to have some real computation.
I think there's a lot of exciting work left to do in MapReduce scheduling, even beyond backup task scheduling. This paper managed to identify a real problem, analyze the pitfalls, and come up with a simple solution, but it's not the be-all and end-all of scheduling. Obviously using more information about task data sizes, better estimation of finish times, etc would help. We just focused on bringing the problem to the attention of the research community and finding the right way to think about it (in terms of finish times, not progress rates). Future work on scheduling can also look at aspects beyond backup tasks, such as data locality, fairness between users, etc. I'm doing some of that this term. However, it might be harder to state these problems as clearly as that of backup tasks. Another thing that is really lacking is a realistic MapReduce benchmark. Andy and I are working with folks from Yahoo and Facebook to try to establish one.

A Policy-aware Switching Layer for Data Centers

This paper proposes managing middleboxes in data center and enterprise networks through logic in the switching layer rather than physical placement of middleboxes. The basic idea is simple - have a policy that propagates to the switches and lets them route packets through middleboxes in whatever order they wish to before delivering them to their destination. The difficult part is the details, and this paper does a very good job covering those, in contrast to some pure architecture papers we've read. The end result is a very compelling way to manage networks.

The authors provide a good overview of the different types of middleboxes that will be present in a data center and of the problems in trying to manage them by just placing middleboxes on the path. This was very useful to see because the situation is more complicated than it might appear at first due to redundant links. Apart from the basic design of the policy-aware switching layer, which is to look at tuples of header fields to route packets, the authors also focus on how to support redundant middleboxes (consistent hashing) and how to deal with changes in policy and topology without violating the policies. The latter is especially important for middleboxes that provide security, such as firewalls. Some other students' blogs have suggested dropping packets on a policy change, but a correlated set of drop events could really confuse some applications, and there is also no way with that technique to fully guarantee that some won't be mishandled if they are delayed a bit. Better to provide some guarantees as long as this does not overcomplicate the system.

The main thought I get after reading this paper and X-Trace is "wouldn't it be nice to have some extra fields per frame where we could tag things". It's too bad that IP options never really took off, because they would be very useful. With a way to mark packets and a simple way to push policies to switches, you can get a pretty nifty "network OS" that will let you manage your flows without requiring excessive state or forwarding logic at the switches. OpenFlow and NOX promise to bring something like this.

Thursday, November 20, 2008

Scalable Application Layer Multicast

This is multicast over an overlay network - an obvious goal to go for if you want to create deployable multicast systems because it became clear that the routers in the Internet were unlikely to be updated to support new multicast protocols. The actual implementation of application-layer multicast here is rather complicated, involving creating a tree of clusters of nodes with some mathematical properties about number of levels and number of nodes per cluster. There are even a set of invariants (section 2.4) that must hold. My first thought is, this is way too complicated. You will pay a lot more to keep up such invariants than you would if you had a more organic network. Why not try out something extremely simple first, such as random neighbors and gossip? (Note: this idea was inspired by Ari's blog). Why not just build multiple non-clustered threes? People complained about the DHT papers focusing too much on nice mathematical properties, but those are very unorderly compared to the NICE trees in this paper. Apart from the fact that you'd imagine costs could be lower with a less restrictive topology, the other complication is that maybe there are corner cases when the tree invariants are not kept and cannot easily be restored. It's hard to prove that you've covered all the possibilities about simultaneous leaves and joins.

Apart from this, the paper contains simulations comparing it with another overlay multicast system called Narada and an implementation that ran with ~30 nodes. Having an implementation is good, but the scale is not particularly interesting - at 30 nodes, one can easily have a centralized server. The application considered - low bandwidth data streams - also adds to this since it means that a centralized server or data center may work well even for far more than 30 nodes.

A Reliable Multicast Framework for Light-weight Sessions and Application Level Framing

I had dreaded this set of readings because I disliked the multicast papers on the network prelim reading list, but this paper is actually pretty well-written. It explains why reliable multicast has to be solved differently from reliable unicast and pushes for receiving more semantics from the application (application-level framing). It explains that a one-size-fits-all reliable and ordered model is infeasible. It also motivates the work with a real application, wb, which manages to build a useful service from idempotent operations and reliable but unordered multicast. Finally, there is a lot of analysis of how to implement retransmission requests and recovery without imploding the sender through randomized backoffs. Although the simulations and analysis are not on Internet topologies, they do cover some "extremes" such as a chain or a star, so they are fairly believable. The most important point in the paper, in my opinion, is the recognition that different applications require different things from multicast, which leads the authors to build a simple base for reliable multicast protocols rather than trying to design a one-size-fits-all solution. This is reminiscent of how IP provides a simple service model over which more complex ones can be built by the application.

Of course the elephant in the room with all this is that multicast on the Internet is pretty much not present today. There seem to be three reasons: First, doing it in hardware would have required massive hardware changes, and nobody agreed how it really should be done. Second, and more importantly, providers didn't know how to charge for multicast! Not many papers address this. Third, we've managed to do all our multi-user communication stuff using central servers. You can get wb today: it's just all running in one data center, and you're accessing it through HTTP. The cost of building a central server is so small and the benefits in manageability, upgradeability, etc are so large that nobody has chosen to do the peer-to-peer whiteboard instead. We do see some peer-to-peer multicast communication for other applications, most notably multiplayer games (where relaying commands through a central server hurts latency), but these have few enough players that using all-pairs communication solves the problem. So SRM fits into that category of interesting ideas that lack implementation details and motivation.

Tuesday, November 18, 2008

A Delay-Tolerant Network Architecture for Challenged Internets

Although I'm confused by the term "challenged internets" (is it a politically correct way to say limited-connectivity networks?), I liked the way the way this paper was organized and the reasoning behind the architecture of DTN. The paper starts out with a good introduction of cases where connectivity may be limited or lacking at times, and these are things that people actually care about: military networks, communications through space, sensor deployments, and even "sneakernet" style store-and-forward networks, of which there are some commercial examples in developing regions. The paper also stresses the importance of interoperability in defining an architecture for such challenged networks, which can lead to a design that gets adopted and implemented by multiple manufacturers. The actual DTN system is designed in a very practical manner, with fairly simple design choices that are adequately explained, such as hierarchical names, overlays for implementaton (rather than requiring redesign of the current Internet), priority, custody transfer, end-to-end acks, and even cryptographic "postage stamps". I liked all the analogies to the postal service and to e-mail.

This paper is different from a lot of the papers we read recently because it's much closer to an RFC-like proposal of a new Internet standard than to a "what-if" architecture paper. This is valuable, as it's good to see how real protocols get designed. However, it makes me wonder about the following question: how often does the opportunity arise in research to define a protocol like this versus exploring more far-fetched ideas that push the boundaries of what technology can do? It seems like a lot of research is focused more on pushing the boundaries, leaving this kind of practical standards design work to industry. How do you know as a researcher when to spend time trying to design this kind of standard versus enabling some interesting demos, getting your viewpoint heard in industry, and then moving on?