Rethinking Application Design for the Cloud

Post on 14-Jan-2015

652 views 2 download

Tags:

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

©2013 CloudBees, Inc. All Rights Reserved

Rethinking application design for the CloudCyrille Le Clerc

©2013 CloudBees, Inc. All Rights Reserved

Speaker

!2

Cyrille Le Clerc

@cyrilleleclerc

Open Source

CTO

DevOps, Infra as Code Continuous Delivery

Solution Architect

Cloud

©2013 CloudBees, Inc. All Rights Reserved

You ?

!3

Dev? Ops? Java? 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

©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

©2013 CloudBees, Inc. All Rights Reserved

Paradigm Shift Cloud Services Oriented Architecture

!6

©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

©2013 CloudBees, Inc. All Rights Reserved

*aaS Ecosystem

!8

©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

©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

©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

©2013 CloudBees, Inc. All Rights Reserved

Selection Criteria for a Service Provider

• Location

• Performances

• Reliability

• Legal

• Security

• Pricing model

!12

©2013 CloudBees, Inc. All Rights Reserved

Design Patterns for the Cloud

!13

©2013 CloudBees, Inc. All Rights Reserved

Scale Out

!14

Evolution Revolution

©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!

©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

©2013 CloudBees, Inc. All Rights Reserved

Scale out

!17

Design for clustering

Scale as you need

Pay as you use

©2013 CloudBees, Inc. All Rights Reserved

Fear the File System

!18

Evolution Revolution

©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

©2013 CloudBees, Inc. All Rights Reserved

Local File System is Everywhere!

Local file system is everywhere!

!20

tomcat

app-x

©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

©2013 CloudBees, Inc. All Rights Reserved

Configuration file

!22

tomcat

app-x Config

System properties

Amazon S3

©2013 CloudBees, Inc. All Rights Reserved

Log files

!23

tomcat

app-x

Logs

LOG

©2013 CloudBees, Inc. All Rights Reserved

Full Text Search

!24

tomcat

app-x Search

©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

©2013 CloudBees, Inc. All Rights Reserved

Latency matters!

!26

Evolution Revolution

©2013 CloudBees, Inc. All Rights Reserved

Latency Matters

• Inter Continental is common

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

tomcat

app-x

120ms

!27

©2013 CloudBees, Inc. All Rights Reserved

Measure

• Chrome Dev Tools

• Google Pagespeed

• YSlow

!28

©2013 CloudBees, Inc. All Rights Reserved

Improve

• HTTP Headers: Expires & Cache Control

• Content Delivery Network: AWS CloudFront, CloudFlare …

!29

tomcat

ecommerce

©2013 CloudBees, Inc. All Rights Reserved

New High Availability Rules

!30

Evolution Revolution

©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

©2013 CloudBees, Inc. All Rights Reserved

Building Software on the Cloud Continuous Delivery

!32

©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

©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

©2013 CloudBees, Inc. All Rights Reserved

Conclusion

!35

©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

©2013 CloudBees, Inc. All Rights Reserved

Ready for the Cloud! Questions?

!37