introduction cloud computing - jfokus · small m1.small 32 bit 1x1 cpu 1.7 gb 1 x 160 gb $0.085

82
Adam Skogman, Jayway Photo by Mark Bonassera Introduction to Cloud Computing

Upload: others

Post on 09-Nov-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Adam Skogman, Jayway

Photo by Mark Bonassera

Introductionto

Cloud Computing

Page 2: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Start-up?

Page 3: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Overwhelmed?

Page 4: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Successful?

Page 5: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Waiting for IT?

Page 6: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Didn’t We Solve This?Ease

Flexibility

Page 7: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Didn’t We Solve This?

Hardware

Virtualization

Web Hotel

Ease

Flexibility

CloudVPS

Page 8: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Cutting through the FUD

What isCloud?

Page 9: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Utility Computing

Per

Hour

Per GB

Per

Month

Per GB

Per Month

Per

Hour

Per

RequestPer GB

Per GB

Page 10: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

On-Demand Capacity

Proc

Node

Data

Proc

Node

Data Data

Proc

Node

Data

Proc

Node

Data

Proc

Node

Page 11: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

On-Demand Capacity

Proc

Node

Data

Proc

Node

Data Data

Proc

Node

Data

Proc

Node

Data

Proc

Node

• API

• GUI

Page 12: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Grid ComputingProc

Node

Data

Proc

Node

Proc

Node

Proc

Node

Proc

Node

Proc

Node

Proc

Node

Proc

Node

Proc

Node

Proc

Node

Proc

Node

Proc

Node

Data Data Data

Data Data Data Data

Page 13: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Content Delivery NetworkClient

Client

DB

Client

CDN

Prod

Server

Page 14: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Content Delivery NetworkClient

Client

DB

Client

CDN

CDN

CDN

CDN

Prod

Server

Page 15: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Distributed CloudClient

Client

Client

Page 16: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Distributed CloudClient

DB

Client

DB

Client

DB

Prod

Server

Prod

Server

Prod

Server

Page 17: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

There are Lots of Clouds

IaaS PaaS SaaS

Page 18: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Infrastructure as a Service

Amazon

Page 19: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085
Page 20: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Bandwidth

• $0.10 / GB to Amazon

• $0.17 / GB from Amazon

• Free inside Amazon

Page 21: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Smallm1.small

32 bit1x1 CPU1.7 GB

1 x 160 GB

$0.085<$0.05

Largem1.large

64 bit2x2 CPU7.5 GB

2 x 420 GB

$0.34<$0.18

Extra Largem1.xlarge

64 bit4x2 CPU15 GB

4 x 420 GB

$0.68<$0.35 Medium

c1.medium32 bit

2x2.5 CPU1.7 GB

1 x 160 GB

$0.17<$0.09

Largem1.large

64 bit8x2.5 CPU

7 GB2 x 420 GB

$0.68<$0.35

DoubleExtra Largem2.2xlarge

64 bit4x3.25 CPU

34.2 GB2 x 420 GB

$1.20

QuadrupleExtra Largem2.4xlarge

64 bit8x2.5 CPU68.4 GB

4 x 420 GB

$2.40

Virtual MachinesElastic Compute Cloud

Page 22: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Ephemeral StorageVirtual Machine

/ /mnt

Page 23: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Ephemeral StorageVirtual Machine

/ /mnt

DisappearsWhen YouShut Down

Page 24: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

• Amazon Elastic Block Storage (EBS)

• RAIDed!

• Database files

• Private data

• Price Model

• $0.10 per GB provisioned / Month

• $0.10 Per 1 Million Request

Block Storage

Virtual Machine

/ /mnt

EBS

/ebs/db

Page 25: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Snapshots and Cloning

S3

Virtual Machine

/ /mnt

EBS

/ebs/db 2009-10-08

Virtual Machine

/ /mnt

EBS

/ebs/db

Page 26: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

File Storage

S3

Page 27: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

File Storage

• Amazon Simple Storage Service (S3)

S3

Page 28: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

File Storage

• Amazon Simple Storage Service (S3)

• Unlimited Redundant Storage

S3

Page 29: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

File Storage

• Amazon Simple Storage Service (S3)

• Unlimited Redundant Storage

• REST API / HTTP

S3

Page 30: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

File Storage

• Amazon Simple Storage Service (S3)

• Unlimited Redundant Storage

• REST API / HTTP

• Price Model (not complete)

• $0.15 per GB and Month (first 50 TB)

• $0.17 per GB transferred out (first 10 TB)

• $0.01 Per 1000 Write RequestsS3

Page 31: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Scaling Out with Redundancy

Zone A Zone B

Amazon Elastic Load Balancing

RestServices

RestServices

Master

RestServices

RestServices

2ndMaster

XX X XX

Page 32: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

• $0.05 / hour

• $0.10 / GB to Amazon

• $0.17 / GB from Amazon

Virtual Private CloudInternet

Amazon VPC

Enterprise

ActiveDrectory

GW

App IPsecVPN

Tunnel

AppAppAppAppApp

Page 33: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Cloud Front

• Serve static content close to user

• Major cities in US, EU, Asia

• Amsterdam, Dublin, Frankfurt, London

• Serves from S3 Bucket

• Single domain name for all caches: foo123.cloudfront.net

• 1 GB/s, 1000 requests/s

Client

Client

DB

Client

CDN

CDN

CDN

Prod

Server

Page 34: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Classic Architecture

My First Clouds

Page 35: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Spring LDAP

DevOpenLDAP

ApacheDS

ActiveDirectory

Page 36: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Spring LDAP

DevOpenLDAP

ApacheDS

ActiveDirectory

Build

Server

Dev

Page 37: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Spring LDAP

DevOpenLDAP

ApacheDS

ActiveDirectory

Build

Server

Dev

Page 38: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Web Start-Up Company

Prod

Server

DB

Prod

Server

Prod

Server

Load

Page 39: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Web Start-Up Company

Prod

Server

DB

Prod

Server

Prod

Server

Load

StageServer

DB

StageServer

StageServer

Load

Page 40: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Web Start-Up Company

Prod

Server

DB

Prod

Server

Prod

Server

Load

StageServer

DB

StageServer

StageServer

Load

Prod

Server

DB

Prod

Server

Prod

Server

Load

Test

Client

Test

Client

Test

Client

Page 41: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Load-Test Business Case

Prod

Server

DB

Prod

Server

Prod

Server

Load

Test

Client

Test

Client

Test

Client• Physical/virtual

• 8 servers

• >8000 SEK / month

• Cloud

• 2 hours / night

• 20 nights / month

• $2.50 per night

• 700 SEK / month

Page 42: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Load-Test Business Case

Prod

Server

DB

Prod

Server

Prod

Server

Load

Test

Client

Test

Client

Test

Client

>90%less

• Physical/virtual

• 8 servers

• >8000 SEK / month

• Cloud

• 2 hours / night

• 20 nights / month

• $2.50 per night

• 700 SEK / month

Page 43: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Current ProjectVPS

Content Ingestion

S3

Content Files

SQS

Public REST ServicesSocial MediaIntegration

EBS

DBDisk

DBDisk

DBDisk

ELB ELB ELB

Mon

OPS

DB Mgmt

SQS

Event Stream

Page 44: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

With Great Power ComesOverwhelming Complexity

Cloud Management

Page 45: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

What Do We Want?

ProdServer

DB

ProdServer

ProdServer

Load

TestClient

TestClient

TestClient

S3

Page 46: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Starting Out

AmazonServer

App

32 bitUbuntu

AmazonServer

64 bitUbuntu

DB

Page 47: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Templates

AmazonServer

App ServerTemplate

32 bitUbuntu

AmazonServer

64 bitUbuntu

DB ServerTemplate

Page 48: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Automation

AmazonServer

App ServerRole

32 bitUbuntu

AmazonServer

64 bitUbuntu

DB ServerRole

AdminServer

JavaDeployment"Script"

Page 49: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Experiences

Page 50: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Our Experiences with Amazon EC2

Page 51: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Our Experiences with Amazon EC2

• Works Great

Page 52: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Our Experiences with Amazon EC2

• Works Great

• Super Fast

Page 53: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Our Experiences with Amazon EC2

• Works Great

• Super Fast

• They donʼt Power Off Machines

Page 54: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Our Experiences with Amazon EC2

• Works Great

• Super Fast

• They donʼt Power Off Machines

Page 55: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Our Experiences with Amazon EC2

• Works Great

• Super Fast

• They donʼt Power Off Machines

• Itʼs a Loooooong Way To North Carolina

Page 56: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Our Experiences with Amazon EC2

• Works Great

• Super Fast

• They donʼt Power Off Machines

• Itʼs a Loooooong Way To North Carolina

• Your App Need To Scale

Page 57: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Services Ecosystem

• Right Scale

• Auto-scale based on SLA

• Multi-server deployment plans

• Scalr.net

• Auto-restart on failure

• Deployment templates

Page 58: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Services Ecosystem

• Right Scale

• Auto-scale based on SLA

• Multi-server deployment plans

• Scalr.net

• Auto-restart on failure

• Deployment templates

Page 59: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

CloudHosting

Page 60: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

HOW COULD YOUuse one of these in your current project?

Page 61: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Platform As A Service

Application Clouds

Page 62: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Application Cloud

• Everything is Services

• Persistence, Caching, Mail, Users

• Automatic Scaling...?

• Less Control

• Serious Buy-In

Page 63: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

My New Cloud

Page 64: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

My New Cloud

DB

AppStreamingService

FileService

Client

flashstreaming

static

Page 65: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Something’s Got To Give

App App App App App App App App App App

DB

Page 66: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Something’s Got To Give

App App App App App App App App App App

DBDB

App App App App App App App App App App

DB DB DB DB DB DB DB DB DB

Page 67: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Something’s Got To Give

App App App App App App App App App App

DBDB

App App App App App App App App App App

DB DB DB DB DB DB DB DB DB

Client

DB

Client

DB

Client

DB

Prod

Server

Prod

Server

Prod

Server

Page 68: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

BigTable

FirstName

1 Adam

2

LastName

Skogman

Company

Jayway

Phone

+46 701 469291

+46 40 6023100

id user

Shoping Cart

date

100 foo ...

101 fie ...

id cart

Shoping Cart Item

count product

200 100 1 300

201 100 1 301

102 fum ...

id name

Product

Price

300 MacBook $999

301 MacMini $599

Page 69: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

BigTable

FirstName

1 Adam

2

LastName

Skogman

Company

Jayway

Phone

+46 701 469291

+46 40 6023100

FirstName

1 Adam

2

LastName

Skogman

Company

Jayway

Phone

+46 701 469291

+46 40 6023100

id user

Shoping Cart

date

100 foo ...

101 fie ...

id cart

Shoping Cart Item

count product

200 100 1 300

201 100 1 301

102 fum ...

id name

Product

Price

300 MacBook $999

301 MacMini $599

Page 70: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

BigTable

user

100 foo

cart

100

200 100

201 100

count

1

1

product

300

301

user

100 foo

cart

100

200 100

201 100

count

1

1

product

300

301

id user

Shoping Cart

date

100 foo ...

101 fie ...

id cart

Shoping Cart Item

count product

200 100 1 300

201 100 1 301

102 fum ...

id name

Product

Price

300 MacBook $999

301 MacMini $599

Page 71: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

BigTable

value

foo $1598

fie $1998

fum $599

count:macbook

1

2

value:macbook

$999

$999

count:macmini

1

1

value:macmini

$599

$599

value

foo $1598

fie $1998

fum $599

count:macbook

1

2

value:macbook

$999

$999

count:macmini

1

1

value:macmini

$599

$599

id user

Shoping Cart

date

100 foo ...

101 fie ...

id cart

Shoping Cart Item

count product

200 100 1 300

201 100 1 301

102 fum ...

id name

Product

Price

300 MacBook $999

301 MacMini $599

Page 72: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

BigTable

value

foo $1598

count:macbook

1

value:macbook

$999

count:macmini

1

value:macmini

$599$1598 1 $999 1 $599$1598 1 $999 1 $599 t=2009-11-03 12:00

value

foo $1598

count:macbook

1

value:macbook

$999

count:macmini

1

value:macmini

$599$1598 1 $999 1 $599$1598 1 $999 1 $599 t=2009-11-03 12:00

id user

Shoping Cart

date

100 foo ...

101 fie ...

id cart

Shoping Cart Item

count product

200 100 1 300

201 100 1 301

102 fum ...

id name

Product

Price

300 MacBook $999

301 MacMini $599

Page 73: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

ACID Before

• Atomic

• Consistent

• Isolated

• Durable

BASE Today

• Basically Available

• Soft State

• Eventually Consistent

New Game Rules

Page 74: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Daily Budget

Page 75: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085
Page 76: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Virtualization on Tap

Page 77: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Virtualization on TapScaling Business Model

Page 78: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Virtualization on TapScaling Business Model

Architecture Style

Page 79: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Virtualization on TapScaling Business Model

Architecture StyleNot a Magic Silver Bullet

Page 80: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Virtualization on TapScaling Business Model

Test Env of Tomorrow

Architecture StyleNot a Magic Silver Bullet

Page 81: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

Next:

From Zero to Cloudin under 4 hours

Page 82: Introduction Cloud Computing - Jfokus · Small m1.small 32 bit 1x1 CPU 1.7 GB 1 x 160 GB $0.085

[email protected]

The End