Linear Scalability of Distributed Applications
Total Page:16
File Type:pdf, Size:1020Kb
Linear Scalability of Distributed Applications THÈSE NO 5278 (2012) PRÉSENTÉE LE 3 FÉVRIER 2012 À LA FACULTÉ INFORMATIQUE ET COMMUNICATIONS LABORATOIRE DE SYSTÈMES D'INFORMATION RÉPARTIS PROGRAMME DOCTORAL EN INFORMATIQUE, COMMUNICATIONS ET INFORMATION ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE POUR L'OBTENTION DU GRADE DE DOCTEUR ÈS SCIENCES PAR Nicolas Bonvin acceptée sur proposition du jury: Prof. B. Faltings, président du jury Prof. K. Aberer, directeur de thèse Prof. A. Ailamaki, rapporteur Prof. D. Kossmann, rapporteur Prof. C. Pu, rapporteur Suisse 2012 R´esum´e L’explosion des applications sociales, du commerce electronique´ ou de la recherche sur Internet a cre´e´ le besoin de nouvelles technologies et de systemes` adaptes´ au traitement et a` la gestion efficace d’un nombre considerable´ de donnees´ et d’utilisateurs. Ces applications doivent fonc- tionner sans interruption tous les jours de l’annee,´ et doivent donc etreˆ capables de survivre a` de subites et brutales montees´ en charge, ainsi qu’a` toutes sortes de defaillances´ logicielles, materielles,´ humaines et or- ganisationnelles. L’augmentation (ou la diminution) elastique´ et extensible des ressources affectees´ a` une application distribuee,´ tout en satisfaisant des exigences de disponibilite´ et de performance, est essentielle pour la viabilite´ com- merciale mais presente´ de grands defis´ pour les infrastructures actuelles. En effet, le Cloud Computing permet de fournir des ressources a` la de- mande: il devient desormais´ aise´ de demarrer´ des dizaines de serveurs en parallele` (ressources de calcul) ou de stocker un tres` grand nombre de donnees´ (ressources de stockage), memeˆ pour une duree´ tres` limitee,´ en payant uniquement pour les ressources consommees.´ Toutefois, ces infrastructures complexes constituees´ de ressources het´ erog´ enes` a` faible coutˆ sont sujettes aux pannes. En outre, bien que les ressources offertes par le Cloud Computing soient consider´ ees´ comme pratiquement illimitees,´ seule une gestion adequate´ de celles-ci peut repondre´ aux exigences des clients et ainsi eviter´ de trop fortes degradations´ de performance. Dans cette these,` nous nous occupons de la gestion adaptative de ces ressources conformement´ aux exigences specifiques´ des applications. Tout d’abord, nous abordons le probleme` de la gestion des ressources de stock- age avec garanties de disponibilite´ dans un environnement intra-cloud et trouvons leur allocation optimale de maniere` decentralis´ ee´ graceˆ a` une economie´ virtuelle. Notre approche repond´ efficacement aux aug- mentations soudaines de charge ou aux pannes et profite de la distance geographique´ entre les nœuds pour ameliorer´ la disponibilite´ des donnees.´ Nous proposons ensuite une approche decentralis´ ee´ de gestion adapta- tive des ressources de calcul pour des applications necessitant´ une haute disponibilite´ et des garanties de performance lors de pics de charge, de pannes soudaines ou de mises a` jour des ressources. Notre approche repose sur une economie´ virtuelle entre les differents´ composants de l’application et sur un systeme` propageant en cascade les objectifs de performance des composants individuels de maniere` a` satisfaire les ex- igences globales de l’application. Notre approche parvient a` repondre´ aux exigences de l’application avec le minimum de ressources. Enfin, comme les vendeurs de stockage proposent des tarifs pouvant varier considerablement,´ nous presentons´ une methode´ inter-cloud d’allo- cation de ressources de stockage provenant de plusieurs vendeurs en fournissant a` l’utilisateur un systeme` qui garantit le meilleur tarif pour stocker et servir ses donnees,´ tout en satisfaisant ses besoins en matiere` de disponibilite,´ durabilite,´ latence, etc. Notre systeme` optimise en per- manence le placement des donnees´ en fonction de leur type et de leur mode d’utilisation, tout en minimisant les coutsˆ de migration d’un ven- deur a` un autre, afin d’eviter´ de rester prisonnier de l’un d’eux. Mots Cl´es: base de donnees,´ architecture, modele` economique,´ cloud computing, haute-disponibilite,´ extensibilite´ i Abstract The explosion of social applications such as Facebook, LinkedIn and Twitter, of electronic commerce with companies like Amazon.com and Ebay.com, and of Internet search has created the need for new tech- nologies and appropriate systems to manage effectively a considerable amount of data and users. These applications must run continuously ev- ery day of the year and must be capable of surviving sudden and abrupt load increases as well as all kinds of software, hardware, human and organizational failures. Increasing (or decreasing) the allocated resources of a distributed appli- cation in an elastic and scalable manner, while satisfying requirements on availability and performance in a cost-effective way, is essential for the commercial viability but it poses great challenges in today’s infras- tructures. Indeed, Cloud Computing can provide resources on demand: it now becomes easy to start dozens of servers in parallel (computational resources) or to store a huge amount of data (storage resources), even for a very limited period, paying only for the resources consumed. However, these complex infrastructures consisting of heterogeneous and low-cost resources are failure-prone. Also, although cloud resources are deemed to be virtually unlimited, only adequate resource management and de- mand multiplexing can meet customer requirements and avoid perfor- mance deteriorations. In this thesis, we deal with adaptive management of cloud resources under specific application requirements. First, in the intra-cloud environ- ment, we address the problem of cloud storage resource management with availability guarantees and find the optimal resource allocation in a decentralized way by means of a virtual economy. Data replicas migrate, replicate or delete themselves according to their economic fitness. Our approach responds effectively to sudden load increases or failures and makes best use of the geographical distance between nodes to improve application-specific data availability. We then propose a decentralized approach for adaptive management of computational resources for applications requiring high availability and performance guarantees under load spikes, sudden failures or cloud re- source updates. Our approach involves a virtual economy among service components (similar to the one among data replicas) and an innovative cascading scheme for setting up the performance goals of individual com- ponents so as to meet the overall application requirements. Our approach manages to meet application requirements with the minimum resources, by allocating new ones or releasing redundant ones. Finally, as cloud storage vendors offer online services at different rates, which can vary widely due to second-degree price discrimination, we present an inter-cloud storage resource allocation method to aggregate re- sources from different storage vendors and provide to the user a system which guarantees the best rate to host and serve its data, while satisfying the user requirements on availability, durability, latency, etc. Our sys- tem continuously optimizes the placement of data according to its type and usage pattern, and minimizes migration costs from one provider to another, thereby avoiding vendor lock-in. Keywords: database, architecture, economic model, cloud computing, high-availability, scalability ii Acknowledgements Let me begin by thanking my thesis supervisor, Prof. Dr. Karl Aberer, who helped me throughout my Ph.D and allowed me to work on topics that interested me particularly. I also thank the members of my thesis committee for their constructive and encouraging comments: Prof. Dr. Anastasia Ailamaki, Prof. Dr. Boi Faltings, Prof. Dr. Donald Kossmann and Prof. Dr. Calton Pu. A big thank you to my officemates, to Chantal and to all members of the LSIR lab. I’m particularly thankful to Thanasis for his invaluable assistance, work and friendship throughout my Ph.D, and Ho Young for his support and friendship. I also want to thank my parents and my family for their unfailing support, my flatmates, my friends and all who are dear to me and supported me. Finally, I would like to deeply thank Nicolas Cordonier who helped me make the right choice at an important moment, Claire-Lise who gave me confidence in myself, and Rachel who encouraged me throughout this wonderful adventure. Thank you. iii Contents Contentsv List of Figures ix List of Tables xiii List of Algorithms xv I Introduction1 1 Introduction3 1.1 Distributed Applications....................... 5 1.1.1 Service-Orientation...................... 6 1.1.2 Cloud Computing ...................... 7 1.2 Scalability ............................... 8 1.2.1 A Motivating Example.................... 10 1.3 Contribution of the Work ...................... 13 1.4 Scope and Limitations........................ 15 1.5 Structure of the Thesis........................ 16 1.6 Selected Publications......................... 16 II State of the Art 19 2 Distributed Application Scalability 21 2.1 Introduction.............................. 21 2.2 Scalability Best Practises....................... 24 2.3 Cloud Computing........................... 26 2.3.1 Definition ........................... 26 2.3.2 Benefits ............................ 29 2.3.3 Cloud Storage......................... 31 2.4 Conclusion............................... 33 3 Database Scalability 35 v Contents 3.1 Introduction.............................. 35 3.2 Relational