Challenges Security and privacy Data transfer bottleneck Uploading 10 TB over 20 Mbps link takes 45 days!
Cloud-friendly Applications Existing apps that do not require specialized hardware resources Internet scale apps Large user base Geographic distribution Apps with elastic demands Burst computing
Cloud Computing Taxonomy Infrastructure/hardware as a Service (IaaS) Platform as a Service (PaaS) Software/Framework as a Service (SaaS/FaaS)
Infrastructure as a service (IaaS) Also know as Utility Computing VM images of different OS flavors Can run any application natively on chosen OS User administers VMs User in charge of elasticity and failover Almost like buying your how HW Billing: CPU hour Gigabyte of storage per month Network traffic in and out of datacenter Examples: Amazon Elastic Compute Cloud (EC2), Rackspace
Platform as a Service (PaaS) Application need to conform to provider’s API VM managed automatically by provider Automatic scaling and failover Billing: CPU hour Gigabyte of storage per month Network traffic in and out of datacenter Examples: Google App Engine, Microsoft Azure, Heroku
Software/Framework as a Service (SaaS/FaaS) SaaS: services and applications available on an on- demand basis. FaaS: a configurable SaaS Billing: Application specific Per hour Per transaction Examples: Salesforce.com Google Docs
Choosing between IaaS and PaaS IaaS Use third party sw or other programming languages Have existing code Care about lock in Transfer web app to your own server or a different provider Want complete control Are OK with the extra work needed to manage the system PaaS Provider’s API provider all needed functionality Have no issues with lock-in Don’t want to or cannot afford to manage the servers
Regions and Availability Zones Region Set of Availability Zones located in one geographic area Currently 8 regions: Virginia, California, Oregon, Ireland Singapore, Australia, Tokio, Sao Paulo Availability Zone Independent failure domains Distinct location Independent power grid and network connection Zones within a region networked with inexpensive low-latency connections Example: us-east-1a, us-east1b, us-east-1c, us-east-1d
Elastic Compute Cloud (EC2) Introduced in 2006 (beta), 2007 (full production version) Based on Xen virtualization Introduced Infrastructure as a Service (IaaS) Rent a server on an hourly basis Renting one instance for 10,000 hours is just as cheap as renting 10,000 instances for an hour.
EC2 Instance Definition: an active virtual server Created from an Amazon Machine Image (AMI) Like a boot CD. Root image with everything necessary to start an instance: Large number of images available
Usage Model Single AMI used to create multiple instances Customized for application Typically, all applications are pre-loaded Instance are ephemeral Created when needed Terminated when demand goes away Instance storage (FS) is ephemeral Goes away when the instance is terminated Persistent storage: Amazon Elastic Block Store (EBS) volume S3, RDS, SimpleDB, DynamoDB
Instance Types One EC2 Compute Unit provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor.
Create a Custom EC2 Instance Select AMI Choose instance type Choose availability zone Set key-pair Set security group ssh into instance e.g., ssh –i.ssh/csc309.pem firstname.lastname@example.org Customize Create Image
Security Group Network firewall rules for instance By default instance is not accessible Can limit by protocol, port, source IP
ami-cafc53a2 Ubuntu 14 Apache2 sudo /etc/init.d/apache2 start|stop /var/www/html#root for all web documents /var/log/apache2#apache server logs PHP /etc/php5/apache2/php.ini# php configuration file Other tools eclipse twm, fvwm, kde vnc vncpasswd# create.vnc/passwd file vncserver -geometry 1400x900 :1# starts a new vncserver on display 1 mysql-workbench
Recommended Reading The Cloud at Your Service Jothy Rosenberg and Art Mateos Cloud Computing Bible Barrie Sosinsky Programming Amazon Web Services James Murty Programming Google App Engine Dan Sanderson