Rethinking application design
for the Cloud
Cyrille Le Clerc

©2013 CloudBees, Inc. All Rights Reserved
Speaker
@cyrilleleclerc

CTO

Solution Architect

Cyrille Le Clerc

DevOps, Infra as Code
Continuous Delivery

Open Source
Cloud

©2013 CloudBees, Inc. All Rights Reserved

!2
You ?

Dev? Ops? Java? Cloud?
©2013 CloudBees, Inc. All Rights Reserved

!3
Cloud, IaaS, SaaS, PaaS
Infrastructure
as a Service

Platform
as a Service

Linux + storageMe
+ network
“Traditional” admin

App runtime
+ middleware
Managed

©2013 CloudBees, Inc. All Rights Reserved

Software
as a Service
Business App
Managed

!4
Agenda
•
Design Patterns for the Cloud
•
Building Applications on the Cloud: Continuous Delivery
•
Conclusion
•
Paradigm Shift: Cloud Services Oriented Architecture

©2013 CloudBees, Inc. All Rights Reserved

!5
Paradigm Shift
Cloud Services Oriented Architecture

©2013 CloudBees, Inc. All Rights Reserved

!6
*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
©2013 CloudBees, Inc. All Rights Reserved

!7
*aaS Ecosystem

©2013 CloudBees, Inc. All Rights Reserved

!8
Location and Colocation

ies of
Fallac
ibuted
Distr
puting
Com

• Collocate application and databases
• Some systems can be distant
• Choose your cloud according to the services you require
©2013 CloudBees, Inc. All Rights Reserved

!9
We

The Cloud & The Law

sel
f-c

erti
fy c
om
plia

not a
I’ m
yer!!!
law

nce

wit
h

Payment Card Industry Data Security Standard (PCI DSS)

Data Privacy Harbor
US EU Safe

HIPAA

Liability

ISO 27001

Data Portability and
Reversibility

Personally Identifiable Information

Applicable Law

Compliance

SSAE 16

©2013 CloudBees, Inc. All Rights Reserved

!10
Pricing Model
•
Beware of unbounded pricing models
•
Prepare a credit card
•
Pay-per-use vs budget
•
Pay-per-use vs. fixed price

©2013 CloudBees, Inc. All Rights Reserved

!11
Selection Criteria for a Service Provider
•
Performances
•
Reliability
•
Legal
•
Security
•
Pricing model
•
Location

©2013 CloudBees, Inc. All Rights Reserved

!12
Design Patterns for the Cloud

©2013 CloudBees, Inc. All Rights Reserved

!13
Evolution

Revolution

Scale Out

©2013 CloudBees, Inc. All Rights Reserved

!14
Scale Up
•
Not optimal
•

Still possible, but up to a limit

!

Low utilization!

M1 Small

M1 Large

Then ???

M3 2 XLarge

©2013 CloudBees, Inc. All Rights Reserved

!15
M1 Extra Large
•
•
•
•

64 bits
15 Gb memory
4 Vcore, 2 cpu unit (~2.5Gh)
1.6 Tb HD
!
!

•

aka « your desktop »
©2013 CloudBees, Inc. All Rights Reserved

!16
Scale out
Design for clustering
Scale as you need

Pay as you use
©2013 CloudBees, Inc. All Rights Reserved

!17
Evolution

Revolution

Fear the File System

©2013 CloudBees, Inc. All Rights Reserved

!18
Fear the File System
•
Shared file system is difficult
•
Best practice for any automated deployment
•
Think multi instance

Local file system: ephemeral near-cache or replica
©2013 CloudBees, Inc. All Rights Reserved

!19
Local File System is Everywhere!

Local file system is
everywhere!

app-x

tomcat

©2013 CloudBees, Inc. All Rights Reserved

!20
Local File System is Everywhere!
•
Log files
•
Full text search
•
• Media library

Configuration files

app-x

Config

Search

tomcat
Logs
Media Library

©2013 CloudBees, Inc. All Rights Reserved

!21
Configuration file
System properties
app-x

tomcat

Config

Amazon S3

©2013 CloudBees, Inc. All Rights Reserved

!22
Log files
LOG

app-x

tomcat
Logs

©2013 CloudBees, Inc. All Rights Reserved

!23
Full Text Search

app-x

Search

tomcat

©2013 CloudBees, Inc. All Rights Reserved

!24
Media Library
Amazon S3
!

!

app-x

•

tomcat
Media Library

Direct access from end
user

•

Amazon S3 Security
tokens

©2013 CloudBees, Inc. All Rights Reserved

!25
Evolution

Revolution

Latency matters!

©2013 CloudBees, Inc. All Rights Reserved

!26
Latency Matters
app-x
tomcat

120ms

•

Inter Continental is
common

•

EU to us-east-1 latency:
120ms

©2013 CloudBees, Inc. All Rights Reserved

!27
Measure
• Chrome Dev Tools
• Google Pagespeed
• YSlow
©2013 CloudBees, Inc. All Rights Reserved

!28
Improve
•
Content Delivery Network: AWS
•

HTTP Headers: Expires & Cache Control
CloudFront, CloudFlare …

ecommerce
tomcat

©2013 CloudBees, Inc. All Rights Reserved

!29
Evolution

Revolution

New High Availability Rules

©2013 CloudBees, Inc. All Rights Reserved

!30
New High Availability Rules
•
Fast disk is “ephemeral”
•
Multiple data centers are
•

SAN is slow & not shareable

everywhere

•

Servers and storage are
infinite

Amazon: regions & availability zones

©2013 CloudBees, Inc. All Rights Reserved

!31
Building Software on the Cloud
Continuous Delivery

©2013 CloudBees, Inc. All Rights Reserved

!32
Continuous Delivery
Integration

Deployment

Delivery

•
•
•

•
•
•
•
•

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

Git push
Build
Test

Git push
Build
Test
Deploy
Production

©2013 CloudBees, Inc. All Rights Reserved

!33
Blue Green Deployment
•

Martin Fowler: http://
martinfowler.com/bliki/
BlueGreenDeployment.html

•
Cloud Elasticity → 2x
•
Zero Downtime

number of servers during
deployment

•

NoSQL is your friend
©2013 CloudBees, Inc. All Rights Reserved

!34
Conclusion

©2013 CloudBees, Inc. All Rights Reserved

!35
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
©2013 CloudBees, Inc. All Rights Reserved

!36
Ready for the Cloud!
Questions?

©2013 CloudBees, Inc. All Rights Reserved

!37

Rethinking Application Design for the Cloud