beyond 12 factor - developing cloud native applications
TRANSCRIPT
Beyond 12 Factor - Developing Cloud Native Applications
OpenCloud Day 2016
June 16, 2016
Maximilian Schöfmann | @schoefmann
Container Solutions
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.
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.
www.container-solutions.com | [email protected]
Some History…1990s
fat clients
monolithic backend on heavyweight middleware
physical infrastructure, bare metal servers
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
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
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
12 Factor12 Factor12 Factor
www.container-solutions.com | [email protected]
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
www.container-solutions.com | [email protected]
“A microservice system is stateful, even if all constituent services are stateless”
LukaszGuminskioncontainer-solutions.com/containerpilot-on-mantl
www.container-solutions.com | [email protected]
CNAs want to be orchestrated
www.container-solutions.com | [email protected]
CNAs want to be orchestrated
Locality: Where should I run?
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?
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?
www.container-solutions.com | [email protected]
Schedulers, Resource Managers
Options
Options
fully automatedapplication mgm?
Options
self-organising components?
fully automatedapplication mgm?
Options
self-organising components?
ephemeral, event-triggered functions?
fully automatedapplication mgm?
Lifetime of individual components
short lived
long lived
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?
www.container-solutions.com | [email protected]
www.container-solutions.com | [email protected]
Minimesos.org
+ github.com/ContainerSolutions/mesos-starter (Spring Boot boiler plate)
www.container-solutions.com | [email protected]
Custom Kubernetes Schedulers
+github.com/kelseyhightower/scheduler
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?
www.container-solutions.com | [email protected]
ContainerPilot (Joyent)
www.container-solutions.com | [email protected]
autopilotpattern.io
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?
www.container-solutions.com | [email protected]
serverlessconf.io
serverless.com
github.com/fabric8io/funktion
FaaS (“Function as a Service”)
www.container-solutions.com | [email protected]
www.container-solutions.com | [email protected]
TANSTAAFL
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
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
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
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
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
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
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 - …