beyond 12 factor - developing cloud native applications

45
Beyond 12 Factor - Developing Cloud Native Applications OpenCloud Day 2016 June 16, 2016 Maximilian Schöfmann | @schoefmann Container Solutions

Upload: container-solutions

Post on 11-Apr-2017

449 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Beyond 12 Factor - Developing Cloud Native Applications

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
Page 3: Beyond 12 Factor - Developing Cloud Native Applications
Page 4: Beyond 12 Factor - Developing Cloud Native Applications

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

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

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

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

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

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

12 Factor12 Factor12 Factor

Page 11: Beyond 12 Factor - Developing Cloud Native Applications

www.container-solutions.com | [email protected]

Page 12: Beyond 12 Factor - Developing Cloud Native Applications

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

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 14: Beyond 12 Factor - Developing Cloud Native Applications

www.container-solutions.com | [email protected]

CNAs want to be orchestrated

Page 15: Beyond 12 Factor - Developing Cloud Native Applications

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

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

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 18: Beyond 12 Factor - Developing Cloud Native Applications

www.container-solutions.com | [email protected]

Schedulers, Resource Managers

Page 19: Beyond 12 Factor - Developing Cloud Native Applications

www.container-solutions.com | [email protected]

Schedulers, Resource Managers

NOT ENOUGH!

Page 20: Beyond 12 Factor - Developing Cloud Native Applications

Options

Page 21: Beyond 12 Factor - Developing Cloud Native Applications

Options

fully automatedapplication mgm?

Page 22: Beyond 12 Factor - Developing Cloud Native Applications

Options

self-organising components?

fully automatedapplication mgm?

Page 23: Beyond 12 Factor - Developing Cloud Native Applications

Options

self-organising components?

ephemeral, event-triggered functions?

fully automatedapplication mgm?

Page 24: Beyond 12 Factor - Developing Cloud Native Applications

Lifetime of individual components

short lived

long lived

Page 25: Beyond 12 Factor - Developing Cloud Native Applications

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

www.container-solutions.com | [email protected]

Page 27: Beyond 12 Factor - Developing Cloud Native Applications

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

www.container-solutions.com | [email protected]

Custom Kubernetes Schedulers

+github.com/kelseyhightower/scheduler

Page 29: Beyond 12 Factor - Developing Cloud Native Applications

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
Page 31: Beyond 12 Factor - Developing Cloud Native Applications
Page 32: Beyond 12 Factor - Developing Cloud Native Applications

www.container-solutions.com | [email protected]

ContainerPilot (Joyent)

Page 33: Beyond 12 Factor - Developing Cloud Native Applications

www.container-solutions.com | [email protected]

autopilotpattern.io

Page 34: Beyond 12 Factor - Developing Cloud Native Applications

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

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

www.container-solutions.com | [email protected]

Page 37: Beyond 12 Factor - Developing Cloud Native Applications

www.container-solutions.com | [email protected]

TANSTAAFL

Page 38: Beyond 12 Factor - Developing Cloud Native Applications

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

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

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

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

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

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

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 - …

Page 45: Beyond 12 Factor - Developing Cloud Native Applications

[email protected] | @schoefmann

container-solutions.com/careers

softwarecircus.io (Aug 31 - Sep 2)