building cloudy apps

61
April 16, 2013 Building “Cloudy” Apps OpenStack Summit April 2013 - Portland, Oregon 1 1 Tuesday, April 30, 13

Upload: tonytcampbell

Post on 14-Jul-2015

227 views

Category:

Documents


0 download

TRANSCRIPT

April 16, 2013

Building “Cloudy” Apps

OpenStack Summit April 2013 - Portland, Oregon

1

1Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

The End

2

1

2

Enable Scaling

Expect Failure

2Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Know Your Audience

• How many of you are attending your first OpenStack Summit?• How many of you have attended a Rackspace Training class before?• How many of you know which track this talk is listed under?• How many of you are just getting started with OpenStack?• How many of you are Developers?• How many of you are Operators?• How many of you are both?• How many of you are neither?• How many of you consider yourself to be technical?• How many of you have access to a working OpenStack Cluster?• How many of you know what OpenStack is?• How many of you know which projects make up OpenStack?• How many of you have ever written a production application for the cloud?• How many of you remember the end of my talk?

3

3Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Know Your Speaker

4

Tony CampbellDirector of Training and Certification

training.rackspace.com

www.rackertalent.com

@CloudTrainMe

tonycampbell

4Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Know Your Speaker

5

Broadcast Communications / English / Theater

Sun Microsystems

eCommerce in 1997

Hitachi Data Systems

eBenefits Start Up

Rackspace

5Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Know Your Speaker

6

Rackspace (The last 10 years)

Web Development - Rackspace.com

Software Development - MyRackspace

The “Original” Rackspace Cloud - Mosso

Rackspace Private Cloud and OpenStack

Software Development

6Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

My Happy Place

7

Software Development

Hardware Management

7Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Before the CloudThrowback Applications

8

8Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

9

Writing Apps that Users Used

Application

9Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

10

Developers wrote applications

Data Access Layer

Services Layer

Presentation Layer

10Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

11

Developers wrote applications

Data Access Layer

Services Layer

Presentation Layer

Database

11Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

12

Developers wrote applications

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

12Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

13

Developers wrote applications

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

13Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

14

Developers wrote applications

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 1

Database

Database Server 1

14Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

15

Developers wrote applications

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 1

Database

Database Server 1

15Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

16

Developers wrote applications

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer

16Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

17

Developers wrote applications

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer

17Tuesday, April 30, 13

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer

Database

Replicated Database

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

18

Developers wrote applications

18Tuesday, April 30, 13

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer

Database

Replicated Database

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

19

The Cost of Success

19Tuesday, April 30, 13

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer 1

Database

Replicated Database

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 3

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

20

The Cost of Success

Physical Machine X

Physical Machine X

Physical Machine X

Just in Case

20Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

21

HA Networking

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 3

Load Balancer 2

Firewall 1 Firewall 2

Database

Replicated Database

21Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time

22

Datacenter 1

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 3

Load Balancer 2

Firewall 1 Firewall 2

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 3

Load Balancer 2

Firewall 1 Firewall 2

Datacenter 2

22Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time - Failure Scenarios

23

23Tuesday, April 30, 13

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer 1

Database

Replicated Database

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 3

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time - Failure Scenarios

24

Dealing with Failure

24Tuesday, April 30, 13

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer 1

Database

Replicated Database

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 3

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time - Failure Scenarios

25

Dealing with Failure

25Tuesday, April 30, 13

Data Access Layer

Services Layer

Presentation Layer

Database

Physical Machine 1

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 2

Database Server 1

Load Balancer 1

Database

Replicated Database

Data Access Layer

Services Layer

Presentation Layer

Physical Machine 3

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Once upon a time - Failure Scenarios

26

Dealing with Failure

26Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

OpenStack in 60 SecondsBut who’s counting?

27

27Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

My Happy Place

28

Software Development

Hardware Management

28Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

OpenStack in 60* seconds

29

* I reserve the right to take more than 60 seconds

Software

Hardware

29Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

OpenStack in 60* seconds

• Cracking the code (names)– Nova– Swift– Glance– Keystone– Horizon– Cinder– Quantum

30

* I reserve the right to take more than 60 seconds

30Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Make It “Cloudy”

31

31Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

The End

32

1

2

Enable Scaling

Expect Failure

32Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

The Questions

33

1

2

How is my application going to handle success?

How is my application going to handle failure?

33Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

The Benefits

34

Cloud can provide powerful options for scaling your application

Cloud can help your application handle failure elegantly

1

2

34Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

The Benefits !instant

35

! = Scale &Fault

Tolerance+My Application

35Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Cloud Enable Your App

36

Cloud Enabled ApplicationMy Application

36Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Horizontal ScalingDon’t buy a bigger box, just get more boxes

37

37Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Scaling in a Cloud World

38

Vertical Horizontal

BigBiggerBiggest

Super Big

Instance Instance InstanceInstance Instance

Instance Instance InstanceInstance Instance

Instance Instance InstanceInstance Instance

Instance Instance InstanceInstance Instance

38Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

ComponentizedBreak your app into components

39

39Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

“Componentize” your application

40

Identify your Node Types

WebServerNode

ServiceNode

Data Node

Running the web serverMay leverage a web frameworkServes the user interface

Only accessible by the web server nodesSpecialized to deliver discrete functionalityStateless and autonomous

Interacts with the datastoreRead only from the web server nodesRead / Write from the service nodes

40Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

“Componentize” your application

41

Identify your Node Types

ServiceNode

Only accessible by the web server nodesSpecialized to deliver discrete functionalityStateless and autonomous

RegistrationServiceNode

BillingServiceNode

IdeaServiceNode

AuthServiceNode

ReportServiceNode

AdminServiceNode

Service Oriented Architecture

41Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

How you “Componentize” your application will

determine how you scale your application

42

42Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Loosely Coupled & AutonomousLets keep it on a need to know basis

43

43Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Loosely Coupled & Autonomous

44

RegistrationServiceNode

PaymentServiceNode

IdeaServiceNode

AuthServiceNode

ReportServiceNode

AdminServiceNode

Web ServerNode

Web ServerNode

Web ServerNode

NOT!

44Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Loosely Coupled & Autonomous

45

RegistrationServiceNode

PaymentServiceNode

IdeaServiceNode

AuthServiceNode

ReportServiceNode

AdminServiceNode

Queueing System

WebServiceNode

WebServiceNode

WebServiceNode

45Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Stateless NodesNot necessarily a stateless application

46

46Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Stateless Nodes

47

Views

Services

Model

Database

StateData

Controller

Views

PresentationServices

Controller

ApplicationServices

Data Services

DatabaseStateData

47Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Persistent StorageWhere does all my data live?

48

48Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Persistent Storage

49

RelationalDB

NoSQLDB

BlockStorage

ObjectStorage

Cache

49Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

ImagesThe key to being scale ready

50

50Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Images

51

Web NodeImage

Service NodeImage

Data StoreImage

Machine Type+ Web Node=

Machine Type+ =

Machine Type+ = Data Node

Service Node

51Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Smart ScalingIt’s Alive!

52

52Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Auto-Scaling

53

Monitoring

Cloud Load Balancer

Web ServerNode

Web ServerNode

Web ServerNode

Queueing System

Service Node

Service Node

Service Node

Service Node

Database

Database

Database

Database

Web ServerNode

Service Node

Web ServerNode

53Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Cost-ScalingCloud Load

Balancer

Web ServerNode

Web ServerNode

Web ServerNode

Queueing System

Service Node

Service Node

Database

Database

Database

Database

Service Node

Service Node

Web ServerNode

Web ServerNode

Service Node

Service Node

54Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Failure RecoveryExpect Failure and Code For It

55

55Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Auto-Recovery

56

Cloud Load Balancer

Web ServerNode

Web ServerNode

Web ServerNode

Queueing System

Service Node

Service Node

Service Node

Service Node

Database

Database

Database

Database

Monitoring

Web ServerNode

56Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

The End

57

1

2

Enable Scaling

Expect Failure

57Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Questions

58

58Tuesday, April 30, 13

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

www.rackertalent.com

59

We’re Hiring

We’re Training

training.rackspace.com

59Tuesday, April 30, 13

60

RACKSPACE® HOSTING | 5000 WALZEM ROAD | SAN ANTONIO, TX 78218US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM

RACKSPACE® HOSTING | © RACKSPACE US, INC. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM

60Tuesday, April 30, 13

61

61Tuesday, April 30, 13