Rethinking Application Design for the Cloud

37
©2013 CloudBees, Inc. All Rights Reserved Rethinking application design for the Cloud Cyrille Le Clerc

description

Let’s discover the new application design guidelines to succeed on the Cloud. We will not only cover the glamorous new concepts for scalability, high availability and new keys to productivity but also the new security constraints, legal challenges, costs models or reversibility rules. Session explanation Cloud is everywhere: It is no longer used exclusively by famous startups or elite teams such as DropBox or NetFlix. Brick and mortars businesses such as newspapers and even banks now use Cloud Computing! However, these success stories did not happen by chance. Having infinite resources, servers, memory or storage is not a silver bullet. Let's discover the new application design guidelines to succeed on the Cloud. We will not only cover the glamorous new concepts for scalability, high availability and new keys to productivity but also the new security constraints, legal challenges, costs models or reversibility rules.

Transcript of Rethinking Application Design for the Cloud

Page 1: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Rethinking application design for the CloudCyrille Le Clerc

Page 2: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Speaker

!2

Cyrille Le Clerc

@cyrilleleclerc

Open Source

CTO

DevOps, Infra as Code Continuous Delivery

Solution Architect

Cloud

Page 3: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

You ?

!3

Dev? Ops? Java? Cloud?

Page 4: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Cloud, IaaS, SaaS, PaaS

!4

Infrastructure as a Service

Platform as a Service

Software as a Service

Linux + storage + network

App runtime + middleware

Managed“Traditional” admin

Business App

Managed

Me

Page 5: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Agenda

• Paradigm Shift: Cloud Services Oriented Architecture

• Design Patterns for the Cloud

• Building Applications on the Cloud: Continuous Delivery

• Conclusion

!5

Page 6: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Paradigm Shift Cloud Services Oriented Architecture

!6

Page 7: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

*aaS Ecosystem

• *aaS is about service, not software

• Integrate services, don’t try to setup your own infrastructure

• Amazon AWS: the place to be for *aaS

!7

Page 8: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

*aaS Ecosystem

!8

Page 9: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Location and Colocation

• Collocate application and databases

• Some systems can be distant

• Choose your cloud according to the services you require

!9

Fallacies of

Distributed

Computing

Page 10: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

US EU Safe Harbor

The Cloud & The Law

!10

We self-certify compliance with

Personally Identifiable Information

I’m not a

lawyer!!!

Payment Card Industry Data Security Standard (PCI DSS)

Applicable Law

Data Privacy

Liability

Data Portability and Reversibility

Compliance

SSAE 16

HIPAA

ISO 27001

Page 11: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Pricing Model

• Pay-per-use vs. fixed price

• Beware of unbounded pricing models

• Prepare a credit card

• Pay-per-use vs budget

!11

Page 12: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Selection Criteria for a Service Provider

• Location

• Performances

• Reliability

• Legal

• Security

• Pricing model

!12

Page 13: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Design Patterns for the Cloud

!13

Page 14: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Scale Out

!14

Evolution Revolution

Page 15: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Scale Up

• Still possible, but up to a limit

• Not optimal

!

M1 Small M1 Large M3 2 XLarge

!15

Then ???Low utilization!

Page 16: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

M1 Extra Large

• 64 bits

• 15 Gb memory

• 4 Vcore, 2 cpu unit (~2.5Gh)

• 1.6 Tb HD !

!

• aka « your desktop »

!16

Page 17: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Scale out

!17

Design for clustering

Scale as you need

Pay as you use

Page 18: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Fear the File System

!18

Evolution Revolution

Page 19: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

• Think multi instance

• Shared file system is difficult

• Best practice for any automated deployment

Fear the File System

!19

Local file system: ephemeral near-cache or replica

Page 20: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Local File System is Everywhere!

Local file system is everywhere!

!20

tomcat

app-x

Page 21: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Local File System is Everywhere!

!21

tomcat

app-x Config• Configuration files

• Full text search

Search

• Log files

Logs

• Media libraryMedia Library

Page 22: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Configuration file

!22

tomcat

app-x Config

System properties

Amazon S3

Page 23: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Log files

!23

tomcat

app-x

Logs

LOG

Page 24: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Full Text Search

!24

tomcat

app-x Search

Page 25: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Media Library

!

!

• Direct access from end user

• Amazon S3 Security tokens

tomcat

app-x

Media Library

Amazon S3

!25

Page 26: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Latency matters!

!26

Evolution Revolution

Page 27: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Latency Matters

• Inter Continental is common

• EU to us-east-1 latency: 120ms

tomcat

app-x

120ms

!27

Page 28: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Measure

• Chrome Dev Tools

• Google Pagespeed

• YSlow

!28

Page 29: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Improve

• HTTP Headers: Expires & Cache Control

• Content Delivery Network: AWS CloudFront, CloudFlare …

!29

tomcat

ecommerce

Page 30: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

New High Availability Rules

!30

Evolution Revolution

Page 31: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

New High Availability Rules

• SAN is slow & not shareable

• Fast disk is “ephemeral”

• Multiple data centers are everywhere

• Servers and storage are infinite

!31

Amazon: regions & availability zones

Page 32: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Building Software on the Cloud Continuous Delivery

!32

Page 33: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

• Git push • Build • Test • Ready for production • Production

• Git push • Build • Test • Deploy • Production

Continuous Delivery

!33

Integration Deployment Delivery

• Git push • Build • Test

Page 34: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Blue Green Deployment• Martin Fowler: http://

martinfowler.com/bliki/BlueGreenDeployment.html

• Zero Downtime

• Cloud Elasticity → 2x number of servers during deployment

• NoSQL is your friend

!34

Page 35: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Conclusion

!35

Page 36: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Conclusion

• Cloud Services Oriented Architecture: big change

• Design patterns for the Cloud: mostly engineering best practices

• Start on the cloud with a green field application

!36

Page 37: Rethinking Application Design for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

Ready for the Cloud! Questions?

!37