Introduzione al Cloud Computing

Dimensione: px
Iniziare la visualizzazioe della pagina:

Download "Introduzione al Cloud Computing"


1 Università degli Studi di Roma Tor Vergata Dipartimento di Ingegneria Civile e Ingegneria Informatica Introduzione al Cloud Computing Corso di Sistemi Distribuiti e Cloud Computing A.A. 2013/14 Valeria Cardellini A very simple cloud computing application: video playback How to scale? A simple cloud application Classic solution: multithreaded application that exploits multicore parallelism Cons: Design can be complex Single failure impacts many users Valeria Cardellini - SDCC 2013/14 1

2 A simple cloud application (2) A simpler cloud-hosted solution: a singlethreaded video server instantiated once per user and running in a virtual machine Pros: Dramatically simpler design If a player crashes, only a single user is impacted Valeria Cardellini - SDCC 2013/14 2 The real problem: scale and complexity How to realize a system with the following requirements?" Million requests per day to serve" Increase/decrease in the request rate of one order of magnitude (or even more) in a quite short period" Exabytes to store (1 EB = 2 60 = bytes)" There is a problem of scale of services! And scale changes every well known problem in computer research and industry Valeria Cardellini - SDCC 2013/14 3

3 A taste of scale: scenario in 2013 More than 1.1G smartphone users More than 2.5G Internet users Facebook: 1.15 G users itunes: more than 800K active apps, more than 25G downloads YouTube: 100 hours of video uploaded every minute, over 6 billion hours of video watched each month Twitter: more than 500M of accounts, more than 500M of tweets per day Akamai: TB of HTTP data delivered every minute, from 15 to 30% of the world s Web traffic Google: more than 5.1G of queries per day Saleforces: more than 104K customers Zynga (social games company): 232M monthly active users Candy Crush: more than 100M of MAU (Monthly Active Users) ( for more recent statistics) Valeria Cardellini - SDCC 2013/14 4 Some old and partial answers Utility computing On-demand computing Grid computing Autonomic computing Software as a Service (SaaS) An old idea: application delivery on Internet More recently: XaaS, where X=[Hardware, Infrastructure, Platform,!] HaaS: Hardware as a Service IaaS: Infrastructure as a Service PaaS: Platform as a Service HuaaS: Human as a Service (including crowdsourcing) Valeria Cardellini - SDCC 2013/14 5

4 Some old and partial answers (2) Some old definitions used by IT companies Pay-as-you-go (Sun) Adaptive enterprise (HP) E-business on demand (IBM) Elastic computing cloud (Amazon)! before cloud computing (2006) Many definitions: a transition period Difficult to see where the cloud paradigm would have taken us in the long term After 6 years the picture is clearer The cloud represents one step towards the solution of the scale problem Valeria Cardellini - SDCC 2013/14 6 The origin: from 4 fundamental utilities! Water Gas! to computing as the fifth utility Electricity Telephony/Network Valeria Cardellini - SDCC 2013/14 7

5 Utility computing Utility computing: la potenza dei calcolatori e le applicazioni possono essere vendute secondo il modello economico dell utilità (utility) Adozione del modello economico del servizio Illusione di avere a disposizione risorse infinite Tariffazione di tipo pay-as-you-go e a grana fine (ad es. su base oraria) La vision computer utility non è una idea nuova! 1961: John McCarthy If computers of the kind I have advocated become the computers of the future, then computing may someday be organized as a public utility just as the telephone system is a public utility... The computer utility could become the basis of a new and important industry. Valeria Cardellini - SDCC 2013/14 8 Utility computing (2) 1969: Leonard Kleinrock, progetto ARPANET As of now, computer networks are still in their infancy, but as they grow up and become sophisticated, we will probably see the spread of computer utilities, which, like present electric and telephone utilities, will service individual homes and offices across the country. Alcune ridefinizioni di computer 1984: John Gage, Sun Microsystems The network is the computer 2008: David Patterson, Univ. Berkeley The data center is the computer. There are dramatic differences between of developing software for millions to use as a service versus distributing software for millions to run their PCs Valeria Cardellini - SDCC 2013/14 9

6 Towards cloud computing 2006: Jeff Bezos, Amazon: Let us use our spare resource for making profit by offering them as services to the public In August 2006 Amazon launched Elastic Compute Cloud (EC2) and a paired online storage service called Simple Storage Service (S3) Basic idea: let users rent data storage and computer server time from Amazon like a utility Cloud computing was finally born Today: Cloud is the computer (Rajkumar Buyya, Univ. Melbourne) Valeria Cardellini - SDCC 2013/14 10 Paradigmi di computing e attributi: realizzare la vision computer utility Fonte: R. Buyya, Market-Oriented Cloud Computing:!, Web Data Center Utility Computing Service Computing Grid Computing P2P Computing Cloud Computing! Paradigmi Attributi Un business di milioni di milioni di!? + " Accesso ubiquo " Affidabilità " Scalabilità " Comportamento autonomico " Scoperta dinamica " Composizione " Quality of Service (QoS) " Service Level Agreement (SLA) "! Valeria Cardellini - SDCC 2013/14 11

7 Popolarità dei vari paradigmi nel tempo" Search trends: Cluster computing, Grid computing, Distributed computing, Cloud computing" Valeria Cardellini - SDCC 2013/14 12 Come si differenziano i vari paradigmi? Distributed computing Loosely coupled Heterogeneous Single administration Cluster computing Tightly coupled Homogeneous Single System Image Grid computing Large scale Cross-organizational Geographical distribution Distributed management Cloud computing Provisioned on demand Service guarantee VMs and Web 2.0-based Valeria Cardellini - SDCC 2013/14 Fonte: R. Buyya 13

8 Cloud computing? Cosa si intende? In cosa differisce dagli altri paradigmi e in che direzione li estende? Valeria Cardellini - SDCC 2013/14 14 Many technologies, concepts and ideas" Virtualization Billing Storage Pricing SaaS PaaS Provisioning on demand Utility computing Public Cloud Scalability IT outsourcing Security Cloud bursting Private Cloud No capital investments Virtual data centers IaaS Privacy & Trust Valeria Cardellini - SDCC 2013/14 15

9 Cloud computing Cloud computing Cloud è il simbolo grafico generalmente usato per rappresentare Internet Il termine computing comprende: - Computazione - Logica di coordinazione - Storage Il Cloud computing riguarda lo spostamento del computing da un singolo PC/data center ad Internet Valeria Cardellini - SDCC 2013/14 16 A myriad of definitions! [Armbrust et al., 2009]: : Cloud Computing refers to both the applications delivered as services over the Internet and the hardware and software systems in the data centers that provide those services. The services themselves have long been referred to as Software as a Service (SaaS), so we use that term. The data center hardware and software is what we will call a Cloud.! Cloud computing has the following characteristics: (1) The illusion of infinite computing resources (2) The elimination of an up-front commitment by cloud users (3) The ability to pay for use as needed. " [NIST, 2011]: Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction. (16 th definition!)! [Vaquero et al., 2009] Clouds are a large pool of easily usable and accessible virtualized resources (such as hardware, development platforms and/or services). These resources can be dynamically reconfigured to adjust to a variable load (scale), allowing also for an optimum resource utilization. This pool of resources is typically exploited by a pay-per-use model in which guarantees are offered by the infrastructure provider by means of customized SLAs. " Valeria Cardellini - SDCC 2013/14 17

10 ! that share some essential characteristics Pay-per-use pricing model" No large up-front acquisition cost" Broad network access" " Rapid elasticity or expansion" Elasticity: ability for customers to quickly request, receive, and later release as many resources as needed" Allows for on-demand scale in/out" Resources virtualization" Resources: storage, processing, memory, network bandwidth, virtual machines and even data centers!" On-demand self-service" Not required human interaction with each service provider" Valeria Cardellini - SDCC 2013/14 18 Altri aspetti caratterizzanti L intero stack (hw & sw) è usato su Internet" Il computing diventa una vera utility usata da tutti" Aziende grandi e piccole" Fornitori di servizi" Sviluppatori di servizi" Utenti finali" Gli aspetti economici assumono maggiore importanza " Tariffazione, determinazione dei prezzi di vendita, Quality of Service (QoS), Service Level Agreement (SLA)" Due differenze significative rispetto al Grid computing Valeria Cardellini - SDCC 2013/14 19

11 Cloud computing: perché ora? Esperienza con data center di ampie dimensioni" Economie di scala senza precedenti" Altri fattori" Diffusione di Internet a banda larga " Virtualizzazione x86 veloce" Modello di costo pay-per-use " Stack del software standard" Valeria Cardellini - SDCC 2013/14 20 Deployment models Valeria Cardellini - SDCC 2013/14 21

12 Deployment models (2) Public cloud Cloud infrastructure: provisioned for open use by the general public (multi tenancy) Owned, managed, and operated by a business, academic, or government organization, or some combination of them Exists on the premises of the cloud provider Services can be free or fee-based Private/enterprise cloud Cloud infrastructure: provisioned for exclusive use by a single organization comprising multiple consumers (e.g., business units) Owned, managed, and operated by the organization, a third party, or some combination of them Exists on or off premises Pros: stronger security, customization Cons: lower economic advantages, scalability more laborious Valeria Cardellini - SDCC 2013/14 22 Deployment models (3) Hybrid cloud Cloud infrastructure: composition of two or more distinct cloud infrastructures (private or public) that remain unique entities, but are bound together by standardized or proprietary technology that enables data and application portability Mixed use of private and public clouds Why? E.g., cloud bursting: leasing public cloud services when private cloud capacity is insufficient Valeria Cardellini - SDCC 2013/14 23

13 Example: cloud bursting Usage of a dynamic hybrid cloud to manage a variable workload Private cloud used to provide a Web application under average workload Plus a public cloud used to manage load spikes that the private cloud is unable to sustain Daily traffic rank trend for (global rank: 1059) Public cloud Private cloud Source: Valeria Cardellini - SDCC 2013/14 24 Cloud stack Scientific Computing Financial Applications Private Cloud Amusement Google Apps (Gmail, Docs,!) Web 2.0 Interface Programming API Scripting & Programming Languages Google AppEngine Microsoft Azure Virtualization VM Management & Deployment Software as a Service Platform as a Service Infrastructure as a Service Amazon S3, EC2 Public Cloud OpenNebula, Eucalyptus, OpenStack Hybrid Cloud Other Grids/ Rackspace Mosso Clouds Clusters Data Centers Storage Valeria Cardellini - SDCC 2013/14 25 Pricing and Billing QoS Metering Accounting SLA Negotiation Admission Control

14 Service models: SaaS Software as a Service (SaaS) Customer capability To use the provider s applications running on a cloud infrastructure Applications accessible from various client devices through a thin client interface or a program interface Customer control or management No control over underlying cloud infrastructure Network, servers, operating systems, storage, or even individual application capabilities Possible exception: limited user-specific application configuration settings Valeria Cardellini - SDCC 2013/14 26 Service models: PaaS Platform as a Service (PaaS) Customer capability To deploy onto the cloud infrastructure consumercreated or -acquired applications created using programming languages and tools supported by the provider Customer control or management No control over underlying cloud infrastructure Network, servers, operating systems, storage Control over deployed applications and possibly application hosting environment configurations Valeria Cardellini - SDCC 2013/14 27

15 Service models: IaaS Infrastructure as a Service (PaaS): Customer capability to provision processing, storage, networks, and other fundamental computing resources where the consumer is able to deploy and run arbitrary software (including operating systems and applications) Customer control or management No control over underlying cloud infrastructure Control over operating systems, storage, deployed applications Possibly limited control of select networking components (e.g., host firewalls) Valeria Cardellini - SDCC 2013/14 28 Wrapping up the service models Source: Windows Azure Platform: Cloud Development Jump Start Valeria Cardellini - SDCC 2013/14 29

16 Esempi di IaaS IaaS: risorse computazionali (storage, server) disponibili come servizi a richiesta Esempi Akamai (Intelligent Platform, Terra Cloud Catalyst) Amazon (Elastic Compute Cloud/EC2 e Simple Storage Service/S3) FlexiScale GoGrid (Cloud Servers e Cloud Storage) IBM (SoftLayer, SmartCloud Enterprise+) Joyent Microsoft Azure (Virtual Machines) Rackspace (Cloud Servers, Cloud Files) Terramark (vcloud Express) Valeria Cardellini - SDCC 2013/14 30 Esempi di PaaS PaaS: piattaforme che consentono sviluppo facile ed implementazione di applicazioni scalabili, senza necessità di investire in (o gestire) qualsiasi infrastruttura sottostante Servizi di più alto livello rispetto a IaaS (ad es. framework applicativi e strumenti di sviluppo) Esempi Akamai (EdgeComputing) Amazon (SimpleDB) Heroku, Elastra e RightScale (piattaforme per Amazon EC2) Google (App Engine) IBM (SmartCloud Application Services) Microsoft Azure (Cloud Services) Oracle (SaaS Platform) Valeria Cardellini - SDCC 2013/14 31

17 Esempi di SaaS SaaS: applicazioni a disposizione del cloud user gestite e distribuite tramite web E la categoria più ampia di soluzioni cloud Esempi Comunicazione e collaborazione: Adobe Connect, Cisco WebEx, Google Mail, Hotmail, Yahoo! Mail Produttività personale: Google Drive, Google Calendar Storage di file: Dropbox, Symform, SugarSync E-commerce: Demandware CRM (Customer Relationship Management): Contabilità, ERP (Enterprise Resource Planning), CRM ed e-commerce: NetSuite Risorse umane, finanza ed altre applicazioni ERP: SAP Business ByDesign, Workday Valeria Cardellini - SDCC 2013/14 32 IaaS e PaaS a confronto Usando un IaaS provider Risorse virtualizzate pure CPU, memoria, storage e banda di rete Al più, sistema operativo (es. Amazon EC2) Accesso tramite Web service e/o Web API Usando un PaaS provider Risorse virtualizzate più framework applicativo Ad esempio: RoR (Ruby On Rails), Python,.NET Imposizione dell architettura dell applicazione e dei dati Limiti su come viene costruita l applicazione Maggiori rischi di vendor lock-in Valeria Cardellini - SDCC 2013/14 33

18 Different kinds of service providers (SP) High-value SPs Intermediaries SPs Basic SPs Rackspace Infrastructure SPs Valeria Cardellini - SDCC 2013/14 34 Vantaggi: elasticità e scalabilità Il cloud customer ottiene le risorse che gli servono nel momento in cui ne ha bisogno" Elasticità nello scale-out e nello scale-in" " Legata al modello pay-per-use" Non occorre più dimensionare lʼinfrastruttura sul picco di carico " Valeria Cardellini - SDCC 2013/14 35

19 Soluzioni tradizionali: sovra-dimensionamento Sovra-dimensionamento dell infrastruttura: comporta sotto-utilizzazione Utilizzazione dei server nei data center tradizionali In genere < 20%; in casi rari 30% Data center di Google: compresa tra 10% e 50% (nel 2007) Utilizzazione delle componenti di rete nei data center tradizionali In genere < 10% Costoso e con impatto negativo sull ambiente Valeria Cardellini - SDCC 2013/14 36 Soluzioni tradizionali: sotto-dimensionamento Sotto-dimensionamento dell infrastruttura: comporta forti penalità Valeria Cardellini - SDCC 2013/14 37

20 Un esempio di scale-out Animoto su Facebook (aprile 2008)" Da a utenti in soli 3 giorni" Con un picco di nuovi utenti allʼora" Valeria Cardellini - SDCC 2013/14 38 Service Level Agreement (SLA) Contratto formale tra customer e provider di un servizio che specifica: Dettagli del servizio fornito, in termini di parametri ed obiettivi (Service Level Objective, SLO) concordati tra le parti (ad es. massimo tempo di risposta, disponibilità) Sanzioni e/o compensazioni in caso di violazione delle aspettative tra le parti" Valeria Cardellini - SDCC 2013/14 39

21 Ciclo di vita del SLA Monitoraggio a runtime del servizio Fonte: Sun Microsystems Internet Data Center Group Valeria Cardellini - SDCC 2013/14 40 Example: SLA offered by Cloud provider Amazon EC2: Service Commitment AWS will use commercially reasonable efforts to make Amazon EC2 available with a Monthly Uptime Percentage of at least 99.95% during any monthly billing cycle. In the event Amazon EC2 does not meet the Service Commitment, you will be eligible to receive a Service Credit as described below. Monthly Uptime Percentage 99.95% = minutes of downtime per month Service Commitment and Service Credits Service Credits are calculated as a percentage of the total charges paid by you (excluding one-time payments such as upfront payments made for Reserved Instances). We will apply any Service Credits only against future Amazon EC2 payments otherwise due from you! To receive a Service Credit, you must submit a claim! Valeria Cardellini - SDCC 2013/14 41

22 Example: SLA offered by Cloud provider (2) Service Commitment AWS will use commercially reasonable efforts to make Amazon S3 available with a Monthly Uptime Percentage of at least 99.9% during any monthly billing cycle. In the event Amazon S3 does not meet the Service Commitment, you will be eligible to receive a Service Credit as described below. Definitions Amazon S3: Error Rate means: (i) the total number of internal server errors returned by Amazon S3 as error status InternalError or ServiceUnavailable divided by (ii) the total number of requests during that five minute period. We will calculate the Error Rate for each Amazon S3 account as a percentage for each five minute period in the monthly billing cycle. The calculation of the number of internal server errors will not include errors that arise directly or indirectly as a result of any of the Amazon S3 SLA Exclusions (as defined below). Monthly Uptime Percentage is calculated by subtracting from 100% the average of the Error Rates from each five minute period in the monthly billing cycle. Valeria Cardellini - SDCC 2013/14 42 SLA related issues Note: SLA jargon Lack of guarantees in terms of service performance e.g., maximum value for service request response time Uptime guarantee is on a per data center basis (i.e., AWS region) instead of per instance basis Service credits towards future payments Customer should detect SLA violation SLA violation reporting time period Valeria Cardellini - SDCC 2013/14 43

23 Scientific/Technical applications Business applications Consumer/Social applications Cloud applications Science and technical applications Consumer/Social applications Business applications Valeria Cardellini - SDCC 2012/13 Copyright 2012, Elsevier Inc. All rights reserved An example of Cloud application Shazam samples music and then recognizes what song is playing Captures fragment of music, sends it to the cloud Uses Amazon Web Services during high-traffic event Precomputed search indexes are used to speed up the search, with a fine-grained match to improve accuracy Less common now, but coming soon: massive parallel search in real-time within a scaled-out cloud service Today s cloud is good at rapid replies but multiple machines rarely cooperate to compute an answer in real-time Valeria Cardellini - SDCC 2013/14 45

24 A breath of new applications: mobile Interactive mobile applications" How to manage CPU-intensive and data-intesive applications (e.g., speech recognition, NLP, assisted vision, machine learning, and augmented reality)? " "Computation and storage offloading to a nearby cloudlet or a remote cloud server" " " " " " " Mobile devices with cloud-hosted UI" Mobile devices that sense the environment" Cloud-based mobile device management" Valeria Cardellini - SDCC 2013/14 46 A breath of new applications: the data explosion era How to deliver the capability to mine, search and analyze a huge quantity of data in near real time? Petabytes doubling & doubling Current cloud-based solution:" Based on MapReduce and Apache Hadoop" Be careful: data should be moved to cloud if there is a speedup in data processing (do not forget that latency is not zero!)" Valeria Cardellini - SDCC 2012/13 Copyright 2012, Elsevier Inc. All rights reserved

25 Benefici per l ambiente Benefici di businees Benefici IT What the analysts say Gartner s hype cycle for Cloud computing (Aug. 2012) Valeria Cardellini - SDCC 2013/14 48 Riassumendo: i principali benefici Scalabilità, elasticità, flessibilità" Quantità infinita di risorse disponibile su richiesta" Accessibilità anytime e anywhere" Accesso basato su Internet/Web" Semplicità di gestione" Ad es. versioning e aggiornamento del software" Eliminazione dellʼimpegno anticipato" I costi scalano con lʼutilizzo (infrastruttura come percentuale di profitto e non come costo fisso iniziale)" Innovazione di business più rapida" Maggiore produttività" Riduzione dellʼimpatto ambientale dellʼict in ottica green" Valeria Cardellini - SDCC 2013/14 49

26 Criticità per Cloud customer Privacy e sicurezza" Chi accede ai miei dati nella cloud?" Quanto mi fido del cloud provider?" E riguardo a recupero, tracciamento ed integrità dei dati?" Questioni legali e politiche" Di chi sono i dati?" Chi può usare i dati?" Dove sono localizzati i dati?" Ad es., AWS Regions per lo storage" Storm clouds?" You have zero privacy anyway. Get over it. (Scott McNealy, SUN CEO, 2009) If you have something that you don t want anyone to know, maybe you shouldn t be doing it in the first place... The reality is that search engines do retain information... It could become available later... (Eric Schmidt, Google CEO, 2009) Valeria Cardellini - SDCC 2013/14 50 Criticità per cloud customer (2) Progettazione di applicazioni scalabili fin dallʼinizio" Elasticità" Sì, ma talvolta manuale anziché automatica" Latenza di comunicazione" Distanza di qualche msec da cloud provider " Applicazioni real-time?" Rischi di vendor lock-in Ad es. data lock-in: difficoltà di migrazione dei dati in caso di cambio del cloud provider Mancanza di capacità di negoziazione e gestione di SLA Definizione di SLA (anche basati sull end-user experience): spesso generici, soprattutto per public cloud Monitoraggio di SLO: spesso a carico del cloud customer (vedi SLA di Amazon EC2) Mancanza di standardizzazione nei servizi offerti " Valeria Cardellini - SDCC 2013/14 51

27 Issues for cloud customers: cloud infrastructure outage News on June 30, 2012: Amazon cloud goes down Friday night, taking Netflix, Instagram and Pinterest with it For the worst cloud outages of 2013 (so far) see Infoworld slideshows Valeria Cardellini - SDCC 2013/14 52 Criticità per cloud provider Gestione di SLA Quanto costa fornire servizi con SLA? Effetto a cascata causato dalla violazione di un SLA ad un determinato livello dello stack cloud Incertezza e variabilità nella richiesta di servizio Ad es. nel caso di storage: pattern di utilizzo da parte degli utenti, tipo di workload predominante, frequenza di accesso delle risorse, volume di accesso delle risorse, località degli accessi, durata delle risorse, dimensione delle risorse Vincoli posti da cloud customer Richiesta di API aperte/standard Necessità di aggiungere continuamente valore Ogni applicazione è unica! Energy management Interoperabilità tra cloud Valeria Cardellini - SDCC 2013/14 53

28 Concludendo" Il Cloud computing " Ha le potenzialità per cambiare in modo sostanziale il modo in cui viene progettata lʼarchitettura ed il business delle aziende" Eʼ una tecnologia dirompente, in grado di determinare un conseguente scompiglio creativo" Ma i sistemi che supportano il Cloud computing sono estremamente complessi" Moltissimi server, miriadi di tecnologie, interazioni complesse tra reti e sistemi, miriadi di applicazioni con carichi eterogenei" Problemi già risolti diventano nuovi problemi su una scala senza precedenti " "La sfida: come rendere reali le potenzialità del Cloud"? Valeria Cardellini - SDCC 2013/14 54