Introduction to Cloud Foundryfor Spring amp Java Developers
Eric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Cloud Stack - Classic Pyramid
3
Softwareas a Service
Platform as a Service
Infrastructure as a Service
CONFIDENTIAL
4
Cloud Foundry ndash The Open Platform as a Service
Target a choice of deployment clouds
Provide a choice of development frameworks
Bind a choice of application
services
githubcomcloudfoundry
5
CloudFoundryCOM ndash Multi-Tenant PaaS Operated by VMware
Frameworks
Services
vCenter vSphere
CloudFoundryCOM (beta)
Infrastructure
CONFIDENTIAL
6
Micro Cloud FoundryTM ndash Cloud on a Stick
Single VM instance of Cloud Foundry that runs on a developerrsquos MAC or PC
Frameworks
Services
Micro Cloud Foundry
Your LaptopPC
CONFIDENTIAL
7
CloudFoundryORG ndash Community Open Source Project
DownloadCode
Setup Environment
Deploy Behind Firewall
Tool Chain ampScripts
Apache2 license
Your Infrastructure
Cloud Foundry BOSH
CloudFoundryORG
Community Frameworks Contributions
Community Services Contributions
CONFIDENTIAL
8
CloudFoundryORG ndash Community Open Source Project
githubcomcloudfoundry
sect NET x 2
sect PHP
sect JRuby
sect Python
sect Rails 2x
sect Clojure
sect Erlang
sect Haskell
sect Memcached
sect SQL Server
sect Neo4j
sect CouchDB
sect VirtualBox
sect Mono
sect Rack
CONFIDENTIAL
Main Risk Lock In
9
Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Cloud Stack - Classic Pyramid
3
Softwareas a Service
Platform as a Service
Infrastructure as a Service
CONFIDENTIAL
4
Cloud Foundry ndash The Open Platform as a Service
Target a choice of deployment clouds
Provide a choice of development frameworks
Bind a choice of application
services
githubcomcloudfoundry
5
CloudFoundryCOM ndash Multi-Tenant PaaS Operated by VMware
Frameworks
Services
vCenter vSphere
CloudFoundryCOM (beta)
Infrastructure
CONFIDENTIAL
6
Micro Cloud FoundryTM ndash Cloud on a Stick
Single VM instance of Cloud Foundry that runs on a developerrsquos MAC or PC
Frameworks
Services
Micro Cloud Foundry
Your LaptopPC
CONFIDENTIAL
7
CloudFoundryORG ndash Community Open Source Project
DownloadCode
Setup Environment
Deploy Behind Firewall
Tool Chain ampScripts
Apache2 license
Your Infrastructure
Cloud Foundry BOSH
CloudFoundryORG
Community Frameworks Contributions
Community Services Contributions
CONFIDENTIAL
8
CloudFoundryORG ndash Community Open Source Project
githubcomcloudfoundry
sect NET x 2
sect PHP
sect JRuby
sect Python
sect Rails 2x
sect Clojure
sect Erlang
sect Haskell
sect Memcached
sect SQL Server
sect Neo4j
sect CouchDB
sect VirtualBox
sect Mono
sect Rack
CONFIDENTIAL
Main Risk Lock In
9
Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Cloud Stack - Classic Pyramid
3
Softwareas a Service
Platform as a Service
Infrastructure as a Service
CONFIDENTIAL
4
Cloud Foundry ndash The Open Platform as a Service
Target a choice of deployment clouds
Provide a choice of development frameworks
Bind a choice of application
services
githubcomcloudfoundry
5
CloudFoundryCOM ndash Multi-Tenant PaaS Operated by VMware
Frameworks
Services
vCenter vSphere
CloudFoundryCOM (beta)
Infrastructure
CONFIDENTIAL
6
Micro Cloud FoundryTM ndash Cloud on a Stick
Single VM instance of Cloud Foundry that runs on a developerrsquos MAC or PC
Frameworks
Services
Micro Cloud Foundry
Your LaptopPC
CONFIDENTIAL
7
CloudFoundryORG ndash Community Open Source Project
DownloadCode
Setup Environment
Deploy Behind Firewall
Tool Chain ampScripts
Apache2 license
Your Infrastructure
Cloud Foundry BOSH
CloudFoundryORG
Community Frameworks Contributions
Community Services Contributions
CONFIDENTIAL
8
CloudFoundryORG ndash Community Open Source Project
githubcomcloudfoundry
sect NET x 2
sect PHP
sect JRuby
sect Python
sect Rails 2x
sect Clojure
sect Erlang
sect Haskell
sect Memcached
sect SQL Server
sect Neo4j
sect CouchDB
sect VirtualBox
sect Mono
sect Rack
CONFIDENTIAL
Main Risk Lock In
9
Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
4
Cloud Foundry ndash The Open Platform as a Service
Target a choice of deployment clouds
Provide a choice of development frameworks
Bind a choice of application
services
githubcomcloudfoundry
5
CloudFoundryCOM ndash Multi-Tenant PaaS Operated by VMware
Frameworks
Services
vCenter vSphere
CloudFoundryCOM (beta)
Infrastructure
CONFIDENTIAL
6
Micro Cloud FoundryTM ndash Cloud on a Stick
Single VM instance of Cloud Foundry that runs on a developerrsquos MAC or PC
Frameworks
Services
Micro Cloud Foundry
Your LaptopPC
CONFIDENTIAL
7
CloudFoundryORG ndash Community Open Source Project
DownloadCode
Setup Environment
Deploy Behind Firewall
Tool Chain ampScripts
Apache2 license
Your Infrastructure
Cloud Foundry BOSH
CloudFoundryORG
Community Frameworks Contributions
Community Services Contributions
CONFIDENTIAL
8
CloudFoundryORG ndash Community Open Source Project
githubcomcloudfoundry
sect NET x 2
sect PHP
sect JRuby
sect Python
sect Rails 2x
sect Clojure
sect Erlang
sect Haskell
sect Memcached
sect SQL Server
sect Neo4j
sect CouchDB
sect VirtualBox
sect Mono
sect Rack
CONFIDENTIAL
Main Risk Lock In
9
Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
5
CloudFoundryCOM ndash Multi-Tenant PaaS Operated by VMware
Frameworks
Services
vCenter vSphere
CloudFoundryCOM (beta)
Infrastructure
CONFIDENTIAL
6
Micro Cloud FoundryTM ndash Cloud on a Stick
Single VM instance of Cloud Foundry that runs on a developerrsquos MAC or PC
Frameworks
Services
Micro Cloud Foundry
Your LaptopPC
CONFIDENTIAL
7
CloudFoundryORG ndash Community Open Source Project
DownloadCode
Setup Environment
Deploy Behind Firewall
Tool Chain ampScripts
Apache2 license
Your Infrastructure
Cloud Foundry BOSH
CloudFoundryORG
Community Frameworks Contributions
Community Services Contributions
CONFIDENTIAL
8
CloudFoundryORG ndash Community Open Source Project
githubcomcloudfoundry
sect NET x 2
sect PHP
sect JRuby
sect Python
sect Rails 2x
sect Clojure
sect Erlang
sect Haskell
sect Memcached
sect SQL Server
sect Neo4j
sect CouchDB
sect VirtualBox
sect Mono
sect Rack
CONFIDENTIAL
Main Risk Lock In
9
Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
6
Micro Cloud FoundryTM ndash Cloud on a Stick
Single VM instance of Cloud Foundry that runs on a developerrsquos MAC or PC
Frameworks
Services
Micro Cloud Foundry
Your LaptopPC
CONFIDENTIAL
7
CloudFoundryORG ndash Community Open Source Project
DownloadCode
Setup Environment
Deploy Behind Firewall
Tool Chain ampScripts
Apache2 license
Your Infrastructure
Cloud Foundry BOSH
CloudFoundryORG
Community Frameworks Contributions
Community Services Contributions
CONFIDENTIAL
8
CloudFoundryORG ndash Community Open Source Project
githubcomcloudfoundry
sect NET x 2
sect PHP
sect JRuby
sect Python
sect Rails 2x
sect Clojure
sect Erlang
sect Haskell
sect Memcached
sect SQL Server
sect Neo4j
sect CouchDB
sect VirtualBox
sect Mono
sect Rack
CONFIDENTIAL
Main Risk Lock In
9
Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
7
CloudFoundryORG ndash Community Open Source Project
DownloadCode
Setup Environment
Deploy Behind Firewall
Tool Chain ampScripts
Apache2 license
Your Infrastructure
Cloud Foundry BOSH
CloudFoundryORG
Community Frameworks Contributions
Community Services Contributions
CONFIDENTIAL
8
CloudFoundryORG ndash Community Open Source Project
githubcomcloudfoundry
sect NET x 2
sect PHP
sect JRuby
sect Python
sect Rails 2x
sect Clojure
sect Erlang
sect Haskell
sect Memcached
sect SQL Server
sect Neo4j
sect CouchDB
sect VirtualBox
sect Mono
sect Rack
CONFIDENTIAL
Main Risk Lock In
9
Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
8
CloudFoundryORG ndash Community Open Source Project
githubcomcloudfoundry
sect NET x 2
sect PHP
sect JRuby
sect Python
sect Rails 2x
sect Clojure
sect Erlang
sect Haskell
sect Memcached
sect SQL Server
sect Neo4j
sect CouchDB
sect VirtualBox
sect Mono
sect Rack
CONFIDENTIAL
Main Risk Lock In
9
Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
Main Risk Lock In
9
Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
10
Cloud Foundry - Making Multi-Cloud a Reality
Public Cloud Operators
COM
Management and Deployment
Private Cloud Distributions
Bare metal
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
Cloud Foundry Clouds
11
sect Joyent
bull community lead for Nodejs
sect ActiveState
bull community lead for Python Perl
bull Providers of Stackato private PaaS
sect AppFogcom
bull community lead for PHP
bull PaaS for PHP
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Demos
12
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
VCAP_
VCAP_APP_HOST = 192168113
VCAP_APP_PORT = 58121
VCAP_SERVICES = redis-22 [ name my-redis-service label redis-22 plan free tags [ key-value nosql redis-22 redis ] credentials hostname 127001 host 127001 port 5000 password ce7b483f-66d1-436d-8aa7-7c33a9ee31ac name e740add8-24ce-40f5-94ed-8a2623e0be57 ] postgresql-90 []
13
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
Auto-reconfigurationsectWorks for Spring Node RubysectSpring Uses a BeanFactoryPostProcessor
under the hoodbulladds a jar to your appbullmodifies webxml to load the BFPPbullalso adds correct jdbc driver jar
sectOnly works if no ambiguity (80 of apps)bull One service of a kind
14
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
15
sect 500 ndash 5000 VMs
sect 40+ unique node types
sect 75+ unique software packages
sect 75+ unique environments
sect 2xweek cfcom updates
sect 24x7x365 non-stop operation
sect No-downtime deployments
sect Reliable robust repeatable deployments updates capacity adjustments
sect Small teams manage many instances
Production Grade Cloud Foundry Clusters
Google style problem egrave Google style solution
cloudfoundrycom
production staging stress qa dev
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
16
sect Cloud Foundry BOSH is an open source tool-chain for release engineering deployment and lifecycle management of large scale distributed servicesbull Prescriptive way of creating releases and managing systems and services
bull It is not a collection of shell scripts not a pile of Perl
sect Built to deploy and manage production-class large scale clustersbull Production grade Cloud Foundry clusters 500+ VMs 40+ jobs 75+ packages
bull Multi-node multi-tier complex clusters eg our GerritJenkins Cluster
sect Built for devops usage and scale by a crack team of veteransbull A project not a product command line interface YAML etc
bull Continuous improvement iterative development rough edges
Cloud Foundry BOSH
githubcomcloudfoundrybosh
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONFIDENTIAL
17
Key Takeaways
sect PaaS is the application platform for the Cloud era
sect Cloud Foundry is the Industryrsquos Open PaaSbull Developer agility
bull Portability without changes
bull Open system
sect Whatrsquos nextbull Free Signup wwwcloudfoundrycom (use ldquocloudtodayrdquo as a promocode)
bull Get started docscloudfoundrycomgetting-startedhtml
bull Learn more on the blog blogcloudfoundrycom
bull Download your Micro Cloud Foundry mycloudfoundrycommicro
bull Get the source code wwwcloudfoundryorg
bull Follow us cloudfoundry
bull Watch us wwwyoutubecomcloudfoundry
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Cloud Best PracticesEric BOTTARDDeveloper Advocateebottard ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Developer Advocate bull VMware
tebottardAumlericbottard
Eric Bottard
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Agenda
10 in theCLOUD
DOsDONrsquoTs
amp
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
DISCLAIMER
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CA
PTA
IN O
BVI
OU
S t-
shirt
ava
ilabl
e at
thre
adle
ssc
omD
esig
n by
Nat
han
Stilli
e an
d Jo
shua
Kem
ble
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Http TrafficLatency Matters
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Wherersquos the Data Center
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Wherersquos the Data Center
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
LEARNLots of Literature
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
DIAGNOSEChrome Dev Tools
YSlowGoogle PageSpeed
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
FIX Unique (eg hash) Paths
Far Future Expires HeaderMinification
CSS SpritesCDN
Spring ResourceHandler AbstractionWRO4J RoR Asset Pipeline
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
FileSystemJust pretend itrsquos not there
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Is your File there Is it Not
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Is your File there Is it Not
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
IT IS THEREBut
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
ITrsquoS EPHEMERAL(disappears on restarts)
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
ITrsquoS NOT SHAREDEither
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Use Some Persistent
STORAGE
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Use Some Persistent
STORAGEbull Mongo GridFS
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Use Some Persistent
STORAGEbull Mongo GridFSbull Database Blob
bull External Blob Service
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
StateItrsquos Better Not To Have It
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Try to be
STATELESS
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Try to be
STATELESSbull Horizontal Scaling
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Try to be
STATELESSbull Horizontal Scalingbull High Availability
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Try to be
STATELESSbull Horizontal Scalingbull High Availability
bull Zero Downtime Deploy
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
6rsquo6rdquo
6rsquo0rdquo
5rsquo6rdquo
5rsquo0rdquo
4rsquo6rdquo
4rsquo0rdquo
The Usual Suspects
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
The Usual Suspects
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
IF there is state
PUSH TO CLIENT(eg Cookie HTML5 apps)
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
IF there is state
USE CENTRAL SERVICE(eg Redis)
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
IF there is state
MAKE IT PER USER+ Sticky Sessions
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
DatabasesThey Have A Right To Evolve Too
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
vmc tunnel (caldecott)$ vmc tunnel
1 foobar-mq2 foobar-pg3 postgresql-handson-cfWhich service instancegt 3
1 none2 psqlWhich client would you like to startgt 2
Opening tunnel on port 10000
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
HUMANEQUALS(ERROR)(when they simply donrsquot forget)
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
YOUR CODE IS VERSIONEDWhy isnrsquot your DB
It is right
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
DONrsquoT ROLL YOUR OWN(and beware of clusters)
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Donrsquot Roll your Own
MIGRATIONS
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Hotel CaliforniaBetter Stay Out of It
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Main Risk Lock InWelcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year you can find it here
Last thing I remember I was
Running for the door
I had to find the passage back
To the place I was before
rsquorelaxrsquo said the night man
We are programmed to receive
You can checkout any time you like
But you can never leave
-the Eagles
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Donrsquot Code to (any) Cloud
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
ltxml version=10 encoding=UTF-8gtltbeans xmlns=httpwwwspringframeworkorgschemabeansgt
ltbean id=mongoTemplate class=orgspringframeworkdatamongodbcoreMongoTemplategt
ltconstructor-arg ref=mongoDbFactory gt ltbeangt
ltbeans profile=defaultgt ltmongodb-factory id=mongoDbFactory
dbname=test host=127001 port=27017 username=foo password=bar gt
ltbeansgt
ltbeans profile=cloudgt ltcloudmongo-db-factory id=mongoDbFactory service-name=myBoundServiceName gt ltbeansgtltbeansgt
Donrsquot Code to (any) Cloudsect Auto-Reconfiguration
sect For the Last 5bull Insulate your Code
bull Leverage Frameworks eg Spring Profiles
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Beware of Data
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
SegregationAll Environments Were Created Equal
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Dev vs Test vs Staging vs Prod
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Traditional Cloud
Machines Dev ne Staging ne Prod Identical
Process Manual inconsistent Automated
People Dev ne Ops Devops
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
One app Many deploys
Build
Config
Code
Deployment
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
One app Many deploys
Build
Config
Code
Deployment
ONE set ofdeliverables
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
One app Many deploys
Build
Config
Code
Deployment
MANY deploys
ONE set ofdeliverables
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
ldquoThe Twelve Factor App httpwww12factornet
Environment Variables [] unlike custom config files or other config mechanisms such as Java System Properties are a language- and OS-agnostic standard
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
S O AThis time itrsquos for real
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Do your current apps look like this
Tomcat
MySQLBrowser Apachewar
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
ldquo SOA is like Adam Sandlerrsquos careerDo one thing and do it well
Rob Spectre Developer Evangelism Twilio
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Another way to look at itcut -d -f1 lt accesslog | sort | uniq -c | sort -rn | less
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Chances are they will soon look like this
MySQL
DesktopBrowser
Tomcat
userswar
Tomcat
searchwar
Tomcat
orderswar
MongoNativeMobile
App
HTML5 Mobile
App
NodejsFront End
Message Buseg RabbitMQ
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Communication
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
SYNCH vs ASYNCHeg HTTP vs AMQP
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
FORMATXML JSON PBuffers Thrift
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
LOW TECHDatabase + cron
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
When To Do It
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
EARLY ONYAGNISlows Progress
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
NOWWould be a Good Time
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
LATER ONNow You Need ItHard To Refactor
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Spring Integrationsect Pipes amp Filters Architecture
sect Promotes Loose Couplingbull Handles the Plumbing for you
sect Declarative Model
sect Internal amp External Messaging
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
DeployDo It Early amp Do It Often
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONTINUOUS INTEGRATIONAutomatic builds tests
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
CONTINUOUS DELIVERYCI + automatic deploy
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
ITrsquoS OKIf itrsquos not PROD
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Automateltbuildgt ltpluginsgt ltplugingt ltgroupIdgtorgcloudfoundryltgroupIdgt ltartifactIdgtmaven-cf-pluginltartifactIdgt ltversiongt100M4-SNAPSHOTltversiongt ltconfigurationgt ltservergtmycloudfoundry-instanceltservergt lttargetgthttpapicloudfoundrycomlttargetgt ltappnamegtspring-integration-rocksltappnamegt lturlgtspring-int-rockscloudfoundrycomlturlgt ltmemorygt1024ltmemorygt ltservicesgt ltservicegt ltnamegtmysql-testltnamegt ltvendorgtmysqlltvendorgt ltservicegt ltservicegt ltnamegtmongodb-testltnamegt ltvendorgtmongodbltvendorgt ltservicegt ltservicesgt ltconfigurationgt ltplugingt ltpluginsgtltbuildgt
oplus
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
ScaleYour own Way
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Every app is
DIFFERENT
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Every app is
DIFFERENTbull CPU
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Every app is
DIFFERENTbull CPUbull RAM
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Every app is
DIFFERENTbull CPUbull RAMbull DISK
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Every app is
DIFFERENTbull CPUbull RAMbull DISKbull Bugs
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Write your own logic
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Write your own logic
Use system-level metrics
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Write your own logic
Use system-level metrics
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Write your own logic
Use system-level metrics
as well as
business-relatedinfo
$vmc stats myappinstance 0 cpu 00 of 2 cores memory 1916M of 512M disk 150M of 2G
httpwwwsxchuphoto1128191
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Write your own logic
Use Inter-process scaling
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Write your own logic
Use Inter-process scaling
$vmc scale myapp --instances 3 --memory 1G
as well as
intra-process(thread pools)
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
UpgradeWith Zero Downtime
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment$vmc app awesome awesome running platform spring on java usage 512M times 1 instance urls awesomecloudfoundrycom services postgresql-db
Users LB Proxy
Version N Version N
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment
$vmc push --name awesome_v2 --url awesome_secretcloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BlueGreen Deployment$vmc unmpap awesome awesomecloudfoundrycom$vmc map awesome_v2 awesomecloudfoundrycom
Users LB Proxy
Version N Version N
Version N+1 Version N+1
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Variations
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Variations
1Have some
(privileged) population
use N+1
CanaryRelease
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Variations
1Have some
(privileged) population
use N+1
2then roll out
CanaryRelease
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Variations
A|B Testing
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Variations
1Have some share of
the population try
a different version
A|B Testing
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Variations
1Have some share of
the population try
a different version
2then decide
A|B Testing
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
What about db changes
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
BEFORECode Version N
firstnameidPerson
lastnameaddress
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
TRANSITIONCode Version N amp N+1
firstnameidPerson
lastnameaddress
person_ididAddress
cityzipcodestreet
country
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
AFTERCode Version N+2
firstnameidPerson
lastnameperson_ididAddress
cityzipcodestreet
country
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
MIGRATIONS
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Limit your Http TrafficThere is no File System
Strive for StatelessnessAutomate your DB Migrations
Avoid Vendor Lock-inTreat all envs as Identical
Itrsquos all about Loose CouplingUse Frequent DeploymentsTargeted and Custom Scaling
Upgrade with Zero Downtime
Thank YouEric Bottard
Developer Advocate bull VMware
tebottardAumlericbottard
ebottardvmwarecom
Recommended