Managing QoS Constraints in a P2P-Cloud Video on Demand System Elias de O. Granja Jr * , Luiz F. Bittencourt , Ioan Petri , Omer F. Rana § , C´ esar A. V. Melo *† Institute of Computing, University of Campinas (UNICAMP), Brazil ‡§ School of Computer Science and Informatics, Cardiff University, U.K. Institute of Computing, Federal University of Amazonas, Brazil Email: * ra159087@students.ic.unicamp.br, bit@ic.unicamp.br, ‡§ {petrii,ranaof}@cardiff.ac.uk, cavmelo@icomp.ufam.edu.br Abstract—As multimedia traffic provides the dominating data flows on Internet channels nowadays, on-demand video stream- ing has also grown in popularity. Users watching on-demand streams are interested in receiving their video streams without interruption and at low cost. To achieve this, video providers need to build computational infrastructure that can adapt to changes in demand. This paper presents an architecture to build synergy between Peer-to-Peer and Cloud Computing systems to achieve the necessary throughput for video-on-demand providers with reduced costs. We propose heuristics that overcome lack of stability in P2P systems by the inclusion of cloud servers into the pool of video streaming servers, avoiding disruptions (stalls) even when the total number of servers are reduced. Simulation results show that the proposed heuristic strategies can help reduce costs while maintaining quality of service. Index Terms—Cloud Computing, Peer-to-peer, Video-on- demand I. I NTRODUCTION Cloud computing has led to improved resource sharing between users and has provided new means for utilisation and pricing of computational and data resources. Based on this, cloud computing providers offer services through the Internet, where users can have access to services hosted in data centres [1], [2]. Such data centres are often mid- to large- scale facilities scattered at a few locations around the globe. This configuration makes users prone to network delays or reduced bandwidth due to bottlenecks, e.g. when a service being utilised is not located in a data center geographically close to them. Depending on the applications a user is running, this inability to deploy closer to the user can hamper quality of experience when the network cannot fulfill the minimum service requirements. Video-on-Demand (VoD) services, such as Netflix 1 and HBO GO 2 encompass a large part of the Internet traffic [3]. These applications have bandwidth requirements that, when not fulfilled, result in interruptions (stalls) of the video playback. While Netflix and HBO GO rely mostly on video provider servers, VoD Approaches relying on P2P (peer-to- peer) protocols [4] also exist. By combining cloud and P2P computing, one can built VoD service that presents low costs and, at the same time, show remarkable availability. In this scenario, the Cloud streams a movie and the P2P network 1 www.netflix.com 2 www.hbogo.com supports this streaming session by serving already accessed content. The potential provider costs are reduced once the deployment of fixed servers is limited. Although, the cloud elasticity is employed to avoid any harm on user’s quality of experience when the lacking of P2P users is prominent and could downgrade the stream quality. In this paper we propose an architecture which enables users to exchange data in a P2P-Cloud environment where a video streaming use-case is considered. In such scenario, users can download media content and simulate several scenarios to evaluate in which extending heuristics for resource allocation impact the performance and cost of such infrastructure. II. RELATED WORK Recently, research on bringing capacity to the edge of the network is receiving attention [5]. In previous work, the STACEE system [6] was developed for dynamically creating storage clouds using edge devices. The functional architecture within STACEE makes use of edge device capacity in a cloud using Peer-to-Peer (P2P) technology. The establishment of such P2P-based community clouds requires a robust mech- anism for controlling interactions between end-users and their access to resources/devices. However, in a more open system, users providing resources can have different requirements and constraints, it is therefore necessary to better assess the reliability of user contributed resources to a P2P cloud [7]. In [8], the Fast-Convergent Iterative Algorithm is used to deal with cloud resource allocation in a Hybrid Cloud-P2P Content Distribution/Delivery Network (CDN). The problem is very similar to ours, but it does not consider the quality of experience. In [9], the authors discuss how Netflix chooses which provider will be responsible for delivering content. The algorithm seems na¨ ıve and only changes the provider if the provider is unable to serve any data to the user, instead of changing according to the QoS provided. While Netflix relies only on CNDs, “Popcorn Time”, an- other VoD streaming system, uses only the torrent protocol to stream videos. As in [10], unifying the approach of Net- flix and Popcorn Time is possible to create a cheaper and more efficient VoD system. In [11], the authors studied the synergy between CDN and P2P overlays to deliver YouTube- like videos. Different from them, that built subject oriented swarming, we built single file one. Moreover, CDN resources