Coral: A Peer-to-peer Content Distribution Network Michael J. Freedman, Eric Freudenthal, and David Mazières In Proc. 1st USENIX/ACM Symposium on Networked Systems Design and Implementation, San Francisco, CA, March 2004. Presented By: Devdutta Bhosale CS 5204 Operating Systems November 11, 2004
Outline What is a CDN and why do we need it ? Shortcomings of current approach Coral Design Key Ideas - DSHT, DNS, Routing and Clustering Evaluation Summary and Conclusion CS 5204 Operating Systems November 11, 2004
Slashdot Effect Some sites witness a sudden surge in traffic when popular web sites posts messages/articles that contain references to them. This sudden increase in the number of hits to a web site is known as the Slashdot effect, the name derived from a well-known technology news discussion site Slashdot. Result: Website becomes very slow or goes down and .. Overall increase in Internet traffic. CS 5204 Operating Systems November 11, 2004
What is a Content Distribution Network What is a Content Distribution Network ? Serve Content from a location that is ‘closer’ to a client so as to minimize load on the origin servers. CS 5204 Operating Systems November 11, 2004
Problems with CDNs High cost of operation: $1500 for every Mbps served. Targeted only for commercial and big websites. Can we get the advantages of commercial CDNs for free ? CS 5204 Operating Systems November 11, 2004
Coral’s Approach Wouldn’t it be nice to host a website capable of serving at 10 Mbps when the actual uplink capacity to the Internet is only 256 Kbps ?? Wow !! That’s great but how do we do it.. CS 5204 Operating Systems November 11, 2004
Coral Approach Coral Coral Coral 9 Coral 4 8 11:Store 4 Coral Coral 7 2 3 5 1 10 Resolver 6 Browser www.cnn.com.nyud.net:8090 CS 5204 Operating Systems November 11, 2004
Coral’s Approach Use every node participating in the system to serve content. Use locality of the client to serve content from a location that is closer to the client. Avoid hot spots within Coral. CS 5204 Operating Systems November 11, 2004
Coral Components Coral consists of three main components. Coral Indexing Infrastructure DNSSRV HTTPProxy CS 5204 Operating Systems November 11, 2004
Key Contributions First Completely decentralized and self-organizing web-content distribution network. First P2P DNS redirection Self Organizing clusters of nodes CS 5204 Operating Systems November 11, 2004
Key Design Ideas DSHT: Distributed sloppy hash table P2P DNS System Clustering Mechanism to exploit locality Hotspot aware Routing CS 5204 Operating Systems November 11, 2004
DSHT Motivation With earlier DHTs one key maps to one node. i.e. URL Location of Node Storing the page. If multiple nodes are storing the same URL we can have URL List of nodes storing the page. What happens when list gets updated very frequently. CS 5204 Operating Systems November 11, 2004
DSHT Motivation Any node requesting some content is likely to cache that content which is a multiple reader-writer problem. Allow multiple values to be associated with a key. Each node stores only a maximum no. of values per key. Client Server New Writer CS 5204 Operating Systems November 11, 2004
Coral Clusters Clusters are used to group topologically close nodes. Coral P2P components are arranged in the form of clusters. Each cluster is characterized by maximum desired network RTT called as diameter. Hierarchy of different diameter clusters is known as levels. Every node is a member of one cluster at each level. There are multiple clusters of levels 2 and 1while there is only cluster of level-0. Cluster arrangement changes dynamically. (split, merge) CS 5204 Operating Systems November 11, 2004
Coral Clusters CS 5204 Operating Systems November 11, 2004
Coral Clusters CS 5204 Operating Systems November 11, 2004
P2P DNS Server probes client Server probes client to determine the RTT and then return a proxy who is below that level. Server probes client Browser Coral httpprx dnssrv Resolver Coral Proxy CS 5204 Operating Systems November 11, 2004
P2P DNS The closer the dnssrv to client the better is the selection of CoralProxy. In the AUTHORITY section of the DNS reply it sends the DNS server addresses which are close to the client so that future DNS requests will be resolved by that server. CS 5204 Operating Systems November 11, 2004
Coral Routing - XOR Metric Nodes and Keys are both 160-bit. Distance between a key and a node is XOR of their IDs. IDs with longer matching prefixes are numerically closer. If a distance has one fewer bit than other it means it is at least halfway close. (Binary Property) CS 5204 Operating Systems November 11, 2004
Coral Routing 1110 XOR 0100: 1010 0000 XOR 0100: 0100 NODEID KEY: Distance 1110 XOR 0100: 1010 0000 XOR 0100: 0100 0101 XOR 0100: 0001 0100 XOR 0100: 0000 CS 5204 Operating Systems November 11, 2004
How does Coral Prevent Hotpots ? Store value once in each level cluster Always storing at closest node causes hotspot Halt put routing at full and loaded node (use of stack) Full → M vals/key with TTL > ½ insertion TTL Loaded → β requests in past minute Cache Key/Value pairs at a node close to the key being referenced. CS 5204 Operating Systems November 11, 2004
Evaluation We can evaluate Coral by how it achieves following objectives 1. Reduction in load on servers, solving the “flash crowd” problem. 2. Clustering provides performance gains for popular data, resulting in good client performance. 3. Ability to naturally forms suitable clusters. 4. Preventing hot spots within its indexing system. CS 5204 Operating Systems November 11, 2004
Experimental Setup On 166 machine in North America and Europe, Coral Daemons, DNS servers and HTTP proxies are started. Origin server has an upstream bandwidth of 384 kbps serving 12 different 41 kb files. Client processes are launched on all the machines requesting images for 30 minutes. Total load on the system is 32800 Kb/s. CS 5204 Operating Systems November 11, 2004
Server Load Coral Hits in 20ms Cluster Local Caches begin to Handle requests. Hits to Ori- -gin server CS 5204 Operating Systems November 11, 2004
Summary and Conclusions Provides non-standard P2P storage abstraction Prevents hotspots Solves Slashdot effect Cheap option to traditional CDNs CS 5204 Operating Systems November 11, 2004
Cons Difficult to guarantee a minimum quality of service as offered by tradition CDNs Cannot serve dynamic content Security Behavior of the system varies as the nodes join and leave the system Latency: 50 % clients experienced a latency of 3 seconds but paper does not talk about the latency without Coral CS 5204 Operating Systems November 11, 2004
Questions ?? CS 5204 Operating Systems November 11, 2004