![Page 1: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/1.jpg)
Beyond 12 Factor - Developing Cloud Native Applications
OpenCloud Day 2016
June 16, 2016
Maximilian Schöfmann | @schoefmann
Container Solutions
![Page 2: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/2.jpg)
![Page 3: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/3.jpg)
![Page 4: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/4.jpg)
The MissionMission of the Cloud Native Computing Foundation. The Foundation’s mission is to create and drive the adoption of a new computing paradigm that is optimized for modern distributed systems environments capable of scaling to tens of thousands of self healing multi-tenant nodes. Cloud native systems will have the following properties: (a) Container packaged. Running applications and processes in software containers as an isolated unit of application deployment, and as a mechanism to achieve high levels of resource isolation. Improves overall developer experience, fosters code and component reuse and simplify operations for cloud native applications. (b) Dynamically managed. Actively scheduled and actively managed by a central orchestrating process. Radically improve machine efficiency and resource utilization while reducing the cost associated with maintenance and operations. (c) Micro-services oriented. Loosely coupled with dependencies explicitly described (e.g. through service endpoints). Significantly increase the overall agility and maintainability of applications. The foundation will shape the evolution of the technology to advance the state of the art for application management, and to make the technology ubiquitous and easily available through reliable interfaces.
![Page 5: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/5.jpg)
The MissionMission of the Cloud Native Computing Foundation. The Foundation’s mission is to create and drive the adoption of a new computing paradigm that is optimized for modern distributed systems environments capable of scaling to tens of thousands of self healing multi-tenant nodes. Cloud native systems will have the following properties: (a) Container packaged. Running applications and processes in software containers as an isolated unit of application deployment, and as a mechanism to achieve high levels of resource isolation. Improves overall developer experience, fosters code and component reuse and simplify operations for cloud native applications. (b) Dynamically managed. Actively scheduled and actively managed by a central orchestrating process. Radically improve machine efficiency and resource utilization while reducing the cost associated with maintenance and operations. (c) Micro-services oriented. Loosely coupled with dependencies explicitly described (e.g. through service endpoints). Significantly increase the overall agility and maintainability of applications. The foundation will shape the evolution of the technology to advance the state of the art for application management, and to make the technology ubiquitous and easily available through reliable interfaces.
![Page 6: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/6.jpg)
www.container-solutions.com | [email protected]
Some History…1990s
fat clients
monolithic backend on heavyweight middleware
physical infrastructure, bare metal servers
![Page 7: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/7.jpg)
www.container-solutions.com | [email protected]
Some History…1990s
fat clients
monolithic backend on heavyweight middleware
physical infrastructure, bare metal servers
2010-15
web/native apps
backends services + managed cloud services
virtual machines, public or private cloud
![Page 8: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/8.jpg)
www.container-solutions.com | [email protected]
Some History…1990s
fat clients
monolithic backend on heavyweight middleware
physical infrastructure, bare metal servers
2010-15
web/native apps
backends services + managed cloud services
virtual machines, public or private cloud
2015+
modular web apps
microservices
Multi-cloud, containerisation
![Page 9: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/9.jpg)
www.container-solutions.com | [email protected]
Moving Parts…1990s 2010-15 2015+
fat clients web/native apps modular web apps
backends services + managed cloud services
monolithic backend on heavyweight middleware microservices
physical infrastructure, bare metal servers
virtual machines, public or private cloud
Multi-cloud, containerisation
10^1handfulof servers
10^2dozens- hundreds ofVMs
10^3thousands
ofcontainers
![Page 10: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/10.jpg)
12 Factor12 Factor12 Factor
![Page 11: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/11.jpg)
www.container-solutions.com | [email protected]
![Page 12: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/12.jpg)
www.container-solutions.com | [email protected]
VI. Processes Execute the app as one or more stateless processes IX. Disposability Maximize robustness with fast startup and graceful shutdown
![Page 13: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/13.jpg)
www.container-solutions.com | [email protected]
“A microservice system is stateful, even if all constituent services are stateless”
LukaszGuminskioncontainer-solutions.com/containerpilot-on-mantl
![Page 15: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/15.jpg)
www.container-solutions.com | [email protected]
CNAs want to be orchestrated
Locality: Where should I run?
![Page 16: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/16.jpg)
www.container-solutions.com | [email protected]
CNAs want to be orchestrated
Locality: Where should I run?
Lifecycle: What should I do when I start, stop, crash?
![Page 17: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/17.jpg)
www.container-solutions.com | [email protected]
CNAs want to be orchestrated
Locality: Where should I run?
Lifecycle: What should I do when I start, stop, crash?
Elasticity: What happens on load spikes or idling?
![Page 20: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/20.jpg)
Options
![Page 21: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/21.jpg)
Options
fully automatedapplication mgm?
![Page 22: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/22.jpg)
Options
self-organising components?
fully automatedapplication mgm?
![Page 23: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/23.jpg)
Options
self-organising components?
ephemeral, event-triggered functions?
fully automatedapplication mgm?
![Page 24: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/24.jpg)
Lifetime of individual components
short lived
long lived
![Page 25: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/25.jpg)
www.container-solutions.com | [email protected]
Smarts are in a central management software, knows state of all components
Examples:
• Mesos Frameworks, e.g. for elasticsearch
• Vitess from YouTube (MySQL scaling)
fully automatedapplication mgm?
![Page 26: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/26.jpg)
www.container-solutions.com | [email protected]
![Page 27: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/27.jpg)
www.container-solutions.com | [email protected]
Minimesos.org
+ github.com/ContainerSolutions/mesos-starter (Spring Boot boiler plate)
![Page 28: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/28.jpg)
www.container-solutions.com | [email protected]
Custom Kubernetes Schedulers
+github.com/kelseyhightower/scheduler
![Page 29: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/29.jpg)
www.container-solutions.com | [email protected]
Smarts are in individual components, aware of own state and some important siblings
Examples:
• ContainerPilot (Joyent)
• Habitat (Chef)
• Ringpop (Uber)
self-organising components?
![Page 30: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/30.jpg)
![Page 31: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/31.jpg)
![Page 34: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/34.jpg)
www.container-solutions.com | [email protected]
Components react to events and rely on runtime, fully unaware of their surroundings
Examples:
• AWS Lambda (Amazon)
• Cloud Functions (Google)
• Kubernetes Funktion (Fabric8)
ephemeral, event-triggered functions?
![Page 35: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/35.jpg)
www.container-solutions.com | [email protected]
serverlessconf.io
serverless.com
github.com/fabric8io/funktion
FaaS (“Function as a Service”)
![Page 36: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/36.jpg)
www.container-solutions.com | [email protected]
![Page 38: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/38.jpg)
www.container-solutions.com | [email protected]
syste
m au
tono
my &
resil
iency
standardisation & abstraction
10^1 10^2 10^3 10^4 10^5 10^6 10^7
The power of abstraction
![Page 39: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/39.jpg)
www.container-solutions.com | [email protected]
syste
m au
tono
my &
resil
iency
standardisation & abstraction
10^1 10^2 10^3 10^4 10^5 10^6 10^7
The power of abstraction
![Page 40: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/40.jpg)
www.container-solutions.com | [email protected]
syste
m au
tono
my &
resil
iency
standardisation & abstraction
10^1 10^2 10^3 10^4 10^5 10^6 10^7
The power of abstraction
![Page 41: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/41.jpg)
www.container-solutions.com | [email protected]
syste
m au
tono
my &
resil
iency
standardisation & abstraction
10^1 10^2 10^3 10^4 10^5 10^6 10^7
The power of abstraction
![Page 42: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/42.jpg)
www.container-solutions.com | [email protected]
pred
ictab
ility
& tu
nabil
ity
10^1 10^2 10^3 10^4 10^5 10^6 10^7
The price of scalability
![Page 43: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/43.jpg)
www.container-solutions.com | [email protected]
pred
ictab
ility
& tu
nabil
ity
whole system cognitive tax
10^1 10^2 10^3 10^4 10^5 10^6 10^7
The price of scalability
![Page 44: Beyond 12 Factor - Developing Cloud Native Applications](https://reader034.vdocuments.net/reader034/viewer/2022051520/58ec99981a28abb73b8b46e9/html5/thumbnails/44.jpg)
www.container-solutions.com | [email protected]
Central management vs. self-organisation
Central management: Higher-level functions
- Movement - Reasoning - …
Self-organisation: Lower-level functions
- Cell repair and growth - Knee-jerk reactions - …