Cloud changes everything

Preview:

DESCRIPTION

How cloud computing and AWS change everything

Citation preview

Cloud Computing Changes Everything

Hank Lin

Sr. Engineer, TCloud Computing

http://hanklin.com/

You Call This Cloud?

http://www.flickr.com/photos/lennysan/4403695791/ http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en

I Say This Is Cloud

http://www.flickr.com/photos/7969902@N07/510672745/

Hype or Hope

http://www.flickr.com/photos/horiavarlan/5047507694/ http://creativecommons.org/licenses/by/2.0/deed.en

Earth at Night

http://apod.nasa.gov/apod/ap081005.html

Facebook Visualization

http://www.facebook.com/notes/facebook-engineering/visualizing-friendships/469716398919

Broadband, Anywhere, Anytime

http://www.flickr.com/photos/myklroventine/3816273335/ http://creativecommons.org/licenses/by/2.0/deed.en

Everything Is Online

• app -> web app

• mail -> Gmail

• game -> online game

• storage -> online storage

• machine -> VPS

http://hanklin.com/

Everything Is a Service

• Software as a Service

• Platform as a Service

• Infrastructure as a Service

• * as a Service

http://hanklin.com/

Nothing New

http://en.wikipedia.org/wiki/File:The_Earth_seen_from_Apollo_17.jpg

Nothing New

• Internet

• Virtualization, VPS

• Platform

• ASP

• Browser, RIA

• NoSQL

• Scaling Out/Up

Everything Changes

http://en.wikipedia.org/wiki/File:Giantimpact.gif

Everything Changes

• APIs

• On-Demand

• Pay As You Go

• Infinite Capacity

• Lease Instead Of Provision

• Reallocate Instead Of Recover

• Scaling In/Down

Service Providers

• Amazon

• Google

• Microsoft

• Rackspace Cloud

• Salesforce

• Linode

AWS Products

http://www.flickr.com/photos/dunechaser/4785103816/ http://creativecommons.org/licenses/by-nc-sa/2.0/deed.en

AWS Products

Function Products

Compute EC2 、 EMR 、 Auto Scaling

Storage S3 、 EBS 、 AWS Import/Export 、 Public Dataset

Database SimpleDB 、 RDS

Messaging SNS 、 SQS 、 SES

CDN CloudFront

Networking Route 53 、 VPC 、 ELB

Monitoring CloudWatch

Deployment Elastic Beanstalk 、 CloudFormation

Payments FPS 、 DevPay

Support Premium Support

E-Commerce FWS 、 Mechanical Turk

Web Traffic Alexa Top Sites 、 Alexa Web Information Service

EC2

http://opencompute.org/

EC2

AMI

32-bit

Type CPU RAM Storage Arch. IO Name

Small 1 ECU 1.7 GB 150 GB 32-bit Moderate m1.small

Micro Max 2 ECUs

613 MB EBS only 32-bit or 64-bit

Low t1.micro

High-CPU Medium

5 ECUs 1.7 GB 340 GB 32-bit Moderate c1.medium

*EC2 Compute Unit (ECU) – equivalent of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor.

64-bit

Type CPU RAM Storage Arch. IO Name

Large 4 ECUs 7.5 GB 840 GB 64-bit High m1.large

Extra Large 8 ECUs 15 GB 1680 GB 64-bit High m1.xlarge

High-CPU Extra Large

20 ECUs 7 GB 1680 GB 64-bit High c1.xlarge

High-Memory Extra Large

6.5 ECUs 17.1 GB 420 GB 64-bit Moderate m2.xlarge

High-Memory Double Extra Large

13 ECUs 34.2 GB 840 GB 64-bit High m2.2xlarge

High-Memory Quadruple Extra Large

26 ECUs 68.4 GB 1680 GB 64-bit High m2.4xlarge

High Performance ComputingType Processor RAM Storage Arch

.IO Name

Cluster Compute Quadruple Extra Large

33.5 ECUs(2 Intel Xeon X5570, quad-core Nehalem)

23 GB 1680 GB 64-bit Very high (10 Gbps Ethernet)

cc1.4xlarge

Cluster GPU Quadruple Extra Large 

33.5 ECUs (2 Intel Xeon X5570, quad-core Nehalem), 2 NVIDIA Tesla M2050 Fermi GPUs

22 +1 GB2 x 3 GB (on GPU ECC)

1680 GB 64-bit Very high (10 Gbps Ethernet)

cg1.4xlarge

*Tesla Fermi M2050 contains 448 cores and 3 GB of ECC RAM and are designed to deliver up to 515 gigaflops

NASA JPL

• Processing 3.2 Giga-pixel Images In 2 Hours, 30 Instances. Improved an order of magnitude.

• 20 Gigaflops -> 1.3 Teraflops

MATLAB team at MathWorks

Regions & Availability Zones

Pricing

• Type

• Region

• Platform

• On-Demand/Reserved/Spot

• Paid AMI

• Instance-hours

• EBS volumes/snapshots

Elasticity & Agility

• EBS

• EIP

• VPC

• EMR

• ELB

• Auto Scaling

• CloudWatch

• Beanstalk

EC2 Customers

• Zynga

• Playfish

• Reddit

• Myspace

• Netflix

• Justin.tv

• Animoto

• Heroku

TimesMachine

break;

S3

Save a picture OK

Save a DVD disc OK

Save a Bluray disc OK

Serving from own domainor CloudFront

Pricing

Storage us-east, eu-west, ap-se us-west ap-ne

Standard RRS Standard RRS Standard RRS

First 1 TB $0.140 $0.093 $0.154 $0.103 $0.150 $0.100

1~ 50 TB $0.125 $0.083 $0.139 $0.093 $0.135 $0.090

50 ~ 500 TB

$0.110 $0.073 $0.124 $0.083 $0.120 $0.080

500 ~ 1000 TB

$0.095 $0.063 $0.109 $0.073 $0.105 $0.070

1000 ~ 5000 TB

$0.080 $0.053 $0.095 $0.063 $0.090 $0.060

5000+ TB $0.055 $0.037 $0.070 $0.047 $0.065 $0.044

* Prices are calculated per GB** Requests and Bandwidth also incur charges

Simple & Reliable

• Buckets & Objects

• Capacity : ∞• High Scalability, Availability, Durability

• REST/SOAP/BT

• ACL/metadata/RRS

• Integrate with other AWS services

S3 Customers

• Amazon

• Dropbox

• Twitter

• Smugmug

• Yelp

• Ubuntu One

• Zmanda

• Tumblr

Distinction

• Amazon.com’s Experiences

• Real Developers’ Needs

• Full IaaS Products

• Enormous Developer Tools/Libraries

AWS Ecosystem

• End Users

• Web Sites

• ISVs

• System Integrators

Demo

Alestic AMIs

EC2 Instance Initialization[hank@t400 ~]$ ec2-run-instances ami-7c423c2e -k sg-web

-t m1.small -g www -z ap-southeast-1a...... i-fd1fd5a8 ami-7c423c2e pending sg-web

0......

[hank@t400 ~]$ ec2-describe-instances i-fd1fd5a8...... i-fd1fd5a8 ami-7c423c2e ec2-122-248-220-243.ap-

southeast-1.compute.amazonaws.com ......

[hank@t400 ~]$ ssh -i sg-web.pem ubuntu@122.248.220.243

[ubuntu@ip-10-130-93-73 ~]$ sudo apt-get -y update && apt-get -y install apache2 php5 php5-curl

EC2 Instance Initialization[hank@t400 ~]$ ec2-run-instances ami-7c423c2e -k sg-web

-t m1.small -g www -z ap-southeast-1a...... i-fd1fd5a8 ami-7c423c2e pending sg-web

0......

[hank@t400 ~]$ ec2-describe-instances i-fd1fd5a8...... i-fd1fd5a8 ami-7c423c2e ec2-122-248-220-243.ap-

southeast-1.compute.amazonaws.com ......

[hank@t400 ~]$ ssh -i sg-web.pem ubuntu@122.248.220.243

[ubuntu@ip-10-130-93-73 ~]$ sudo apt-get -y update && apt-get -y install apache2 php5 php5-curl

LAME! I Want Automatic Initialization

EC2 Instance Initialization

#!/usr/bin/env bashset -exsudo apt-get -y updatesudo apt-get -y install apache2 php5 php5-curl# install AWS SDK# install application code# get public-ipv4 from EC2 instance metadatapublic_ipv4 = $(wget -qO-

169.254.169.254/latest/meta-data/public-ipv4)# do something useful with $public_ipv4# more initializations ...

"init-web.sh"

EC2 Instance Initialization[hank@t400 ~]$ ec2-run-instances ami-7c423c2e -k sg-web -t

m1.small -g www -z ap-southeast-1a -f init-web.sh...... i-c10fc594 ami-7c423c2e pending sg-web 0......

[hank@t400 ~]$ ec2-describe-instances i-c10fc594...... i-c10fc594 ami-7c423c2e ec2-122-248-221-187.ap-

southeast-1.compute.amazonaws.com ......

[hank@t400 ~]$ curl 122.248.221.187<!doctype html><html><head><meta http-equiv="content-type"

content="text/html; charset=UTF-8"><title>My Killer App</title>......

I Need More Computing Power, And I Need It NOW

[hank@t400 ~]$ ec2-run-instances ami-12423c40 -k sg-web -t c1.xlarge -g www -z ap-southeast-1a -f init-web.sh -n 10

...... i-320c424e ami-12423c40 pending sg-web 0......

More Work

• Scheduled Back Up

• Monitor And Alert

• Notify LB, Controller, etc

• Failover

• Multi-AZ, Multi-Region

• Automatically Scale In/Out

• Ceil, Floor, Cool down

AWS Judgment Day

When The Sky Is Falling

AWS Free Usage TierProduct Quota (for new users, expired in 1 year)

EC2 750 instance-hours. (t1.micro, Linux)

EBS 10GB , 1M I/Os. (snapshot: 10GB , 10K GETs, 1K PUTs)

ELB 750 LoadBalancer-hours, 15GB data processing

S3 5GB standard storage, 20K GETs, 2K PUTs

Network 15GB in and 15GB out. (except CloudFront)

Product Quota (for all AWS users, does not expire)

SimpleDB 25 Machine hours, 1GB storage

SQS 100K requests

SNS 100K requests. (notification: 100K HTTPs, 1K emails)

SES 2K emails/day call from EC2

CloudWatch 1M requests, 10 alarms, 10 metrics

Network 1GB in and 1GB out. (except CloudFront)

* Quota are calculated per month

If I have seen further it is by standing on the shoulders of giants

http://en.wikipedia.org/wiki/File:Orion_aveugle_cherchant_le_soleil.jpg

break;

My AWS Book ;)

• ISBN : 9789861992792