DISTRIBUTED CONTENT DELIVERY FOR THE MODERN WEB



Abstract The current client server model used on the web is inefficient for the delivery of large static content. Content is transmitted independently to each consumer from the central infrastructure without respect to the copies that exist in the caches of other visitors. As demand grows, capacity remains fixed and all users experience delays. This problem has been exacerbated by the rise in popularity of large streaming content such as high definition web video. Desktop peerto-peer (P2P) systems have shown great promise in alleviating these issues by leveraging the underutilized upstream bandwidth of each client to deliver content. Bringing these techniques to the web in a way that doesn’t require user intervention would allow for a more efficient web. This thesis explores the state of the art in browser-based P2P content delivery for the web and seeks to answer whether such systems can be used to efficiently and invisibly deliver content. It presents the DCDN (Distributed Content Delivery Network) research platform which serves content to the users of a website using only their HTML5 enabled web browser. It then uses the platform to explore several possible optimizations for this method of content delivery and evaluate their success. Through this investigation, it shows that while browser-based P2P systems can be implemented quite simply, at this time their performance characteristics limit them to certain content types. High definition web video and long-duration audio streaming are key examples. In order to expand the possible use cases, significant roadblocks will need to be overcome. A few emerging technologies which may provide solutions within the next year are discussed, as well as somewhat far-fetched concepts for future improvement. At present this technology has great value, especially when considering that its ideal content types make up a large portion of the bandwidth currently used on the Internet.

 

Contents1Introduction22Dependencies32.1WebSockets..............................32.2WebRTCPeerConnections.....................42.3WebRTCDataChannels.......................43MeasurementPlatformDesignandArchitecture53.1ProtocolSummary..........................63.2Messageformat............................84Evaluation84.1AssessmentMetrics..........................84.2Thebasicsystem...........................94.3HTTPPre-fetch...........................104.4HTTPHEAD-start..........................124.5MixedHTTPandP2P........................134.6Comparisonofconfigurations....................145Discussion155.1Roadblocks..............................155.1.1JavaScriptbinaryAPI....................165.1.2DOMinteraction.......................165.1.3Userbehavior.........................175.2Improvementsinthepipeline....................185.2.1ServiceWorkers........................185.2.2Heuristicpeerrecommendation...............195.3MoonshotImprovements.......................205.3.1Donationofidleresources..................205.3.2HeuristicoptimizationsforP2Pnetworking........206Conclusion211

 

 

1 Introduction As the load placed on web infrastructure grows with the ever-increasing demand for large multimedia content, it is increasingly important to deliver it in efficient ways. Characteristics of the Hyper-Text Transport Protocol (HTTP) used to serve almost all web content, make it somewhat inefficient as a means of delivering static content (images, videos, etc. that don’t change often over time) to users. The most notable issue is its focus on a strictly client-server relationship. With this system, the cost of serving content increases with the number of users due to the need for more servers and greater bandwidth to handle peak load. Large Internet companies spend a considerable sum on this infrastructure, but this increase in capacity through capital expenditure fails to address the underlying inefficiency of serving content in this manner: all the load is placed on the central server even though copies of the content exist in the caches of every client on the site. This practice leads to an underutilization of the client’s Internet connection. In practice, the majority of content on the web flows from large corporate data centers to home and office consumers while comparatively little content moves in the opposite direction. Additionally, each new visitor to a web site downloads a full copy of all page content from the central server without regard to other equally viable copies on the network. This focus on central infrastructure causes problems in times of high load during which service quality for users drops since that have to share the host’s finite capacity. Both of these problems are addressed by peer-to-peer (P2P) content delivery techniques. If such a P2P content delivery system could be used by a web host in a way which would be effortless and invisible to users, it could enable a more efficient web. Until recently, this would have required the user to install 3rd party software and/or browser plug-ins. However, recent developments in the JavaSript application programming interface (API) exposed to web browsers have enabled a new class of P2P applications requiring nothing more than a modern web browser. While the possibility of creating such applications has been explored in recent commercial endeavors, little is known to the research community about how this class of applications performs compared to conventional content delivery systems. My research shows that while the existing knowledge about P2P systems is sufficient to create a functional browser-based system, there are new obstacles to overcome in order to provide the high performance users expect. Web security requirements, aspects of JavaScript’s binary APIs, interaction with the DOM (The Document Object Model used to layout the content of a web page) and the comparatively erratic behavior of the client cause the performance of browserbased P2P systems to differ in ways that merit new investigation. This thesis investigates several of those characteristics and suggests techniques to overcome them. It also briefly explores technologies still in development that may provide for a better system. 2