Beyond 12 Factor - Developing Cloud Native Applications

Post on 11-Apr-2017

451 views 1 download

Transcript of 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

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 | info@container-solutions.com

Some History…1990s

fat clients

monolithic backend on heavyweight middleware

physical infrastructure, bare metal servers

www.container-solutions.com | info@container-solutions.com

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 | info@container-solutions.com

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 | info@container-solutions.com

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 | info@container-solutions.com

www.container-solutions.com | info@container-solutions.com

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 | info@container-solutions.com

“A microservice system is stateful, even if all constituent services are stateless”

LukaszGuminskioncontainer-solutions.com/containerpilot-on-mantl

www.container-solutions.com | info@container-solutions.com

CNAs want to be orchestrated

www.container-solutions.com | info@container-solutions.com

CNAs want to be orchestrated

Locality: Where should I run?

www.container-solutions.com | info@container-solutions.com

CNAs want to be orchestrated

Locality: Where should I run?

Lifecycle: What should I do when I start, stop, crash?

www.container-solutions.com | info@container-solutions.com

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 | info@container-solutions.com

Schedulers, Resource Managers

www.container-solutions.com | info@container-solutions.com

Schedulers, Resource Managers

NOT ENOUGH!

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 | info@container-solutions.com

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 | info@container-solutions.com

www.container-solutions.com | info@container-solutions.com

Minimesos.org

+ github.com/ContainerSolutions/mesos-starter (Spring Boot boiler plate)

www.container-solutions.com | info@container-solutions.com

Custom Kubernetes Schedulers

+github.com/kelseyhightower/scheduler

www.container-solutions.com | info@container-solutions.com

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 | info@container-solutions.com

ContainerPilot (Joyent)

www.container-solutions.com | info@container-solutions.com

autopilotpattern.io

www.container-solutions.com | info@container-solutions.com

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 | info@container-solutions.com

serverlessconf.io

serverless.com

github.com/fabric8io/funktion

FaaS (“Function as a Service”)

www.container-solutions.com | info@container-solutions.com

www.container-solutions.com | info@container-solutions.com

TANSTAAFL

www.container-solutions.com | info@container-solutions.com

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 | info@container-solutions.com

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 | info@container-solutions.com

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 | info@container-solutions.com

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 | info@container-solutions.com

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 | info@container-solutions.com

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 | info@container-solutions.com

Central management vs. self-organisation

Central management: Higher-level functions

- Movement - Reasoning - …

Self-organisation: Lower-level functions

- Cell repair and growth - Knee-jerk reactions - …

maximilian.schoefmann@container-solutions.com | @schoefmann

container-solutions.com/careers

softwarecircus.io (Aug 31 - Sep 2)