D ISTRIBUTED S YSTEMS [COMP9243] Lecture 10a: Cloud Computing Slide 1 Slide 3 Why is it called Cloud ? ➜ services provided on virtualised resources ➀ What is Cloud Computing? ➜ virtual machines spawned on demand ➁ X as a Service ➜ location of services no longer certain ➂ Key Challenges ➜ similar to network cloud ➃ Developing for the Cloud Flavours of Cloud Computing: W HAT IS C LOUD C OMPUTING ? A style of computing in which dynamically scalable Slide 2 Slide 4 and often virtualized resources are provided as a service over the Internet. [Wikipedia] http://www.mazikglobal.com/blog/cloud-computing-stack-saas-paas-iaas/ W HAT IS C LOUD C OMPUTING ? 1 W HAT IS C LOUD C OMPUTING ? 2
B ENEFITS Flexibility: ➜ Flexible provisioning ➜ Add machines on demand ➜ Add storage on demand Slide 7 Slide 5 Effort: ➜ Low barrier to entry ➜ Initial effort: no need to spec and set up physical infrastructure ➜ Continuing effort: no need to maintain physical infrastructure Figure from Hiroshi Wada K EY C HARACTERISTICS OF C LOUD C OMPUTING SP 800-145. The NIST Definition of Cloud Computing: Cost: ➀ On-demand, self-service ➜ Low initial capital expenditure • get resources (CPU, storage, bandwidth etc), ➜ Avoid costs of over-provisioning for scalability • automated: as needed, right now! ➜ Pay for what you use ➁ Network access • services accessible over the network, standard protocols Slide 6 Slide 8 ➂ Pooled resources • provider: multi-tenant pool of resources • dynamically assigned and reassigned per customer demand ➃ Elasticity • Scalability: rapidly adjust resource usage as needed ➄ Measured service in “Developing and Extending Applications for Windows Azure with Visual Studio” • monitor resource usage • billing for resources used B ENEFITS 3 B ENEFITS 4
I NFRASTRUCTURE AS A S ERVICE : I AA S Service provider provides: ➜ Server and network hardware Reliability: ➜ Virtual machines ➜ Redundancy ➜ IP addresses ➜ Trust reliability of provider ➜ Services to manage VMs (create, start, stop, migrate) Slide 9 Slide 11 ➜ Data backups ➜ Optional: storage, database, synchronisation, communication ➜ What happens when provider goes down? Client provides: ➜ What about Security? Privacy? ➜ OS and OS environment ➜ Web server, DBMS, etc. ➜ Middleware ➜ Application software Public vs Private Clouds? Challenges – Client: ➜ Transparency (naming, redirection) ➜ Scalability: replication and load balancing decisions ➜ Synchronisation and coordination ➜ Security ➜ Fault tolerance ➜ Software maintenance and sys admin Slide 12 Slide 10 Challenges – Provider: ➜ Hardware provisioning and maintenance Public: open services available to everyone ➜ Load management ➜ IP address management, DNS management Private: owned, operated, and available to specific organisation ➜ Infrastructure fault tolerance Is this still cloud computing? ➜ Monitoring, logging, billing Hybrid: system uses some private cloud services and some public cloud services. ➜ Storage http://blog.nskinc.com/IT-Services-Boston/bid/32590/Private-Cloud-or-Public-Cloud I NFRASTRUCTURE AS A S ERVICE : I AA S 5 E XAMPLE 1: A MAZON W EB S ERVICES (AWS) 6
E XAMPLE 1: A MAZON W EB S ERVICES (AWS) U SING EC2 Slide 13 Slide 15 ➜ Elastic Compute Cloud (EC2) ➜ Simple Storage Solution (S3) ➜ Simple DB ➜ Simple Queue Service http://vmtoday.com/2013/07/introduction-to-amazon-web-services-aws/ Elastic Compute Cloud (EC2): ➜ Instances: virtual cores, memory, storage • instance types (cpu,memory,net, storage options): • t, m, c, p, g, x, r, i, d • micro, small, medium, large, xlarge, ... ➜ Cost: Slide 14 Slide 16 • free tier: limited instances, free CPU hours • on-demand: $0.007 - $39 per hour • reserved: 1-3 years, discounted, fixed cost ➜ Launch Amazon Machine Image (AMI) on instances ➜ Preconfigured or custom images U SING EC2 7 U SING EC2 8
Slide 17 Slide 19 Slide 18 Slide 20 U SING EC2 9 U SING EC2 10
Slide 21 Slide 23 R ELIABILITY Slide 22 Slide 24 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html Regions and Availability Zones: ➜ 99.95% availability per service region ➜ Regions: geographically dispersed, independent ➜ Availability zones: contained in Regions ➜ Availability zones: isolated from failures in other zones, but connected U SING EC2 11 R ELIABILITY 12
Security: Elastic IP addresses: ➜ Infrastructure Security ➜ IP address associated with account • Data centre physical security ➜ Dynamic remapping to specific instances • Software and hardware maintenance • instance has private IP address and public IP address • Monitoring and Testing (automatic and manual) • Elastic IP can be mapped (and re-mapped) to private IP Slide 25 Slide 27 ➜ Application Security Elastic Load Balancing: • API access control (access keys) • Firewall settings for instances (security groups) ➜ Distributes traffic across instances • Virtual Private Cloud (VPC): private or public subnetworks ➜ Monitors ’health’ of instances: customisable • Encrypted storage support ➜ Routes to healthy instances • Logging S TORAGE Elastic Block Store: ➜ Network Attached Storage (NAS) (servers with disks) ➜ Block level storage volumes Slide 26 Slide 28 ➜ Mounted as block device (e.g. disk) on an instance ➜ Physical Servers and Disks shared by customers (no caching, competing for disk and net IO) Auto Scaling: ➜ Replicated in Availability zone ➜ Automatically start or stop new instances ➜ Cost: per GB/per month ➜ User-defined conditions • manual (minimum group size), schedule • instance health, CloudWatch input https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html R ELIABILITY 13 S TORAGE 14
C OMMUNICATION Simple Storage Service (S3): ➜ Buckets: store objects • Can be placed in specific regions ➜ Objects: data and metadata • metadata: key-value pairs describing the object • identified by key (unique within a bucket) Slide 29 Slide 31 • versioned ➜ Consistency: Simple Queue Service (SQS): • highly replicated ➜ Message-queue oriented communication service • eventual consistency, no locking ➜ Persistent, asynchronous messaging • atomic object update ➜ At-least once delivery guarantee ➜ Access control ➜ No ordering guarantee ➜ Access control https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/ Snapshots: ➜ Point in time copy of EBS volume ➜ Stored in S3 P LATFORM AS A S ERVICE ➜ Differential Service provider provides: ➜ Can be used to bootstrap image ➜ Hardware infrastructure Simple Database Service (SimpleDB): ➜ OS and platform software (middleware) ➜ Non-relational database: key-value Slide 30 Slide 32 ➜ Distributed storage management ➜ Partitioned into domains ➜ Load balancing, replication, migration ➜ Consistency ➜ Management and Monitoring services • highly replicated Client provides: • eventual consistency ➜ Application ➜ Typical uses: logging, indexing S3 data ➜ Erlang! ➜ Replaced by DynamoDB C OMMUNICATION 15 P LATFORM AS A S ERVICE 16
Challenges – Client: ➜ Learn new API and environment ➜ Follow API ➜ Optimise to limits of API and platform ➜ Security for own app Challenges – Provider: Slide 33 Slide 35 ➜ Transparency (naming, redirection) ➜ Scalability: replication and load balancing decisions ➜ Synchronisation and coordination ➜ Security ➜ Fault tolerance ➜ Monitoring ➜ Software maintenance and sys admin E XAMPLE 2: A PP E NGINE ➜ Various development languages (Python, Java, PHP , Go) Slide 34 Slide 36 ➜ ... and runtime environments ➜ Storage based on Big Table ➜ Optimisation via Memcache ➜ Lots of APIs ➜ Per use billing ➜ Transparent scaling E XAMPLE 2: A PP E NGINE 17 E XAMPLE 2: A PP E NGINE 18
S OFTWARE AS A S ERVICE Service provider provides: ➜ Hardware infrastructure ➜ OS and platform software (middleware) ➜ Distributed storage management Slide 37 Slide 39 ➜ Load balancing, replication, migration ➜ Management and Monitoring services ➜ Application Client provides: ➜ Data Challenges – Client: ➜ Learn new application ➜ Deal with potential restrictions • Web interface, restricted functionality • No offline access, no local storage Challenges – Provider: ➜ Transparency (naming, redirection) Slide 38 Slide 40 ➜ Scalability: replication and load balancing decisions ➜ Synchronisation and coordination ➜ Security ➜ Fault tolerance ➜ Monitoring ➜ Software maintenance and sys admin ➜ Application development and maintenance S OFTWARE AS A S ERVICE 19 K EY C HALLENGES OF C LOUD C OMPUTING 20
Recommend
More recommend