Algorithmic Nuggets in Content Delivery

Algorithmic Nuggets in Content Delivery

Algorithmic Nuggets in Content Delivery Bruce M. Maggs Ramesh K. Sitaraman Duke and Akamai UMass, Amherst and Akamai [email protected] [email protected] This article is an editorial note submitted to CCR. It has NOT been peer reviewed. The authors take full responsibility for this article's technical content. Comments can be posted through CCR Online. ABSTRACT Edge Server This paper \peeks under the covers" at the subsystems that Overlay provide the basic functionality of a leading content deliv- Rou4ng ery network. Based on our experiences in building one of Client the largest distributed systems in the world, we illustrate how sophisticated algorithmic research has been adapted to balance the load between and within server clusters, man- age the caches on servers, select paths through an overlay routing network, and elect leaders in various contexts. In each instance, we first explain the theory underlying the Origin algorithms, then introduce practical considerations not cap- tured by the theoretical models, and finally describe what is Content implemented in practice. Through these examples, we high- Authorita4ve Name Server light the role of algorithmic research in the design of com- DNS (Global and Local Load Balancing) plex networked systems. The paper also illustrates the close synergy that exists between research and industry where research ideas cross over into products and product require- ments drive future research. Figure 1: A CDN serves content in response to a 1. INTRODUCTION client's request. The top-three objectives for the designers and operators of a content delivery network (CDN) are high reliability, fast and consistent performance, and low operating cost. CDN's authoritative name server. The authoritative name While many techniques must be employed to achieve these server examines the network address of the resolving name objectives, this paper focuses on technically interesting al- server, or, in some cases, the edns-client-subnet provided by gorithms that are invoked at crucial junctures to provide the resolving name server [9], and, based primarily on this provable guarantees on solution quality, computation time, address, makes a decision about which of the CDN's clusters and robustness to failures. In particular, the paper walks to serve the content from. A variant of the stable marriage through the steps that take place from the instant that a algorithm makes this decision, with the aim of providing browser or other application makes a request for content good performance to clients while balancing load across all until that content is delivered, stopping along the way to clusters and keeping costs low. This algorithm is described examine some of the most important algorithms that are in Section 2. employed by a leading CDN. But DNS resolution does not end here. The task of indi- One of our aims, as we survey the various algorithms, is cating which particular web server or servers within the clus- to demonstrate that algorithm design does not end when ter will serve the content is delegated to a second set of name the last theorem is proved. Indeed, in order to develop fast, servers. Within the cluster, load is managed using a consis- scalable, and cost-effective implementations, significant in- tent hashing algorithm, as described in Section 3. The web tellectual creativity is often required to address practical server address or addresses are returned through the resolv- concerns and messy details that are not easily captured by ing name server to the client so that the client's application, the theoretical models or that were not anticipated by the such as a browser, can issue the request to the web server. original algorithm designers. Hence, much of this paper fo- The web servers that serve content to clients are called edge cuses on the translation of algorithms that are the fruits of servers as they are located proximal to clients at the \edges" research into industrial practice. In several instances, we of the Internet. As such, Akamai's CDN currently has over demonstrate the benefits that these algorithms provide by 170,000 edge servers located in over 1300 networks in 102 describing experiments conducted on the CDN. countries and serves 15-30% of all Web traffic. A typical request for content begins with a DNS query When an edge server receives an HTTP request, it checks issued by a client to its resolving name server (cf. Figure 1). to see if the requested object is already present in the server's The resolving name server then forwards the request to the cache. If not, the server begins to query other servers in the following order. First it asks the other servers in the the tuple is a set of client IP addresses and the second ele- same cluster, who share a LAN. If none of these servers ment describes the type of traffic accessed by those clients. have the object, it may ask a \parent" cluster. If all else The IP addresses of a specific map unit are intended to be fails, the server may issue a request for the object to an \proximal" to each other in the Internet and can be viewed origin server operated by the content provider, who is a as a single unit from the perspective of load balancing, i.e., customer of the CDN. As new objects are brought into the they are likely to experience similar performance when as- CDN's edge server, it may be necessary to evict older items signed to the same CDN cluster. The second tuple of a map from the cache. Section 4 explains how algorithms based on unit is the traffic class that the clients of the map unit access. Bloom filters are used to decide which objects to cache and A traffic class indicates the type of content service accessed which not to. by the users. There are tens of traffic classes such as video, Often, CDNs deliver content that is not cacheable. Exam- web content, applications, software downloads, etc., each of ples include dynamic web sites, web applications, and live which has distinctive properties. As a simple example, the video streaming. In this scenario, the CDN's edge server map unit h1:2:3:4=24; videoi corresponds to the set of clients acts as a \front end" for a web site, but must forward re- in a specific =24 prefix who are accessing videos. Note that quests for uncacheable content to the content provider's ori- the same set of users accessing web content form a differ- gin. Using the CDN servers as relays in an \overlay routing ent map unit h1:2:3:4=24; webi. If the block of IP addresses network", however, can actually reduce download time and is too coarse, then assigning the map unit to a single clus- increase availability. The idea is that exploring multiple ter may produce suboptimal performance for some of those overlay paths between the origin and the edge servers and addresses. But if the granularity is too fine, there will be picking the best ones can provide paths with lower latency many map units, leading to scalability issues. Dividing the and higher throughput. Further, the multiple paths provide clients of the global Internet into prefixes at the right level redundancy in case of path failures, enhancing availability. of granularity is a complex problem in its own right, but be- In Section 5, we explain how multi-commodity flow pro- yond the scope of this paper. In all, it is customary to have vides an algorithmic framework for constructing good over- tens of millions of map units to capture all of the clients and lay routing networks. traffic classes of the trillions of requests per day served by A CDN is a large distributed system where individual Akamai. servers and networks can fail at any time. The system has to Global Load Balancing. The goal of global load bal- be built to be resilient to such failures and should continue to ancing is to assign each map unit Mi; 1 ≤ i ≤ M, to a function with only minimal degradation in performance. A server cluster Cj , 1 ≤ j ≤ N, such that the clients repre- CDN has dozens of software components that collect data, sented by each map unit can download the requested con- analyze it, and make key decisions based on it. Two ex- tent from their assigned cluster with high availability and amples described above are global and local load-balancing performance. For each map unit, the candidate clusters are decisions, which are computed using real-time data feeds in ordered in descending order of preference where a higher time scales of minutes or seconds. A common strategy em- preference indicates better predicted performance for the ployed by the CDN for fault tolerance is to compute the clients of that map unit. For example, a candidate cluster solution independently on several machines, and then to ap- with a higher preference might be one with lower latency, ply a leader-election algorithm to determine which machine lower packet loss, and higher throughput to the clients in should distribute its solution to other CDN components that the map unit. Likewise, each server cluster Cj has pref- depend on it. Because different machines typically compute erences regarding which map units it would like to serve. solutions at different times and with slightly different inputs, A number of factors dictate a cluster's preferences for map there may be slight differences in the solutions. Section 6 de- units, including the contract terms under which the cluster scribes several variants of leader election algorithms. There was deployed, whether the IP addresses are local to the au- are multiple algorithms because different responses to net- tonomous system (AS) in which the cluster is deployed, etc.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    15 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us