talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design...

52
Daniël van Gils @folding beauty [email protected] www.cloud66.com How the hell do I run Microservices Docker in Production?... and will it scale?

Transcript of talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design...

Page 1: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

Daniël van Gils @folding beauty [email protected]

www.cloud66.com

!"

How the hell do I run Microservices Docker in Production?...

and will it scale?

Page 2: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

OpsDev

Design

Developer Advocate

Page 3: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

Build, deploy and maintain any application on any server, on the cloud provider of your choice or bring your own servers.

Running Docker in production for almost 1½ years for our customers.

We simplify DevOps.

Researched how our customers are using Docker.

Page 4: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

Daniël van Gils @folding beauty [email protected]

www.cloud66.com

!"

How the hell do I run Docker in Production?...

and will it scale?

Page 5: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

#

$

%

#1 the right container image

#2 containers in production

$$

Page 6: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

api / ruby

static / middleman

whatsapp api / python

AI / tensor flowhidden service / tor

chat bot / go

analytics / R

bigdata / java

iot / c++

Page 7: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the
Page 8: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

NOISE

$docker run alpine echo 'hello world’

you don’t know what kind of skills you need

production

you know what kind of skill you need

you think you know your gained all the skills

but you don’t know

time

skill

s

Page 9: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

$

&&

containers

$ $$$$$

$

bin/libs

os

#

bin/libs bin/libs

'

(

)*

#

&server

os

bin/libs

(

+

&&

cloud/VM

os

bin/libs

#

'

(

&os

bin/libs

Page 10: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

'

(

cloud/VM

#

'

(

)*

containers

##(

server

dev

ops

ops

ops

dev dev+

Page 11: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

simple

complex

%Minimal Lovable Service

Page 12: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

technology

%♥

NOISE

Page 13: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the
Page 14: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

- service

$ containers

server cluster(s)&

image$%

$$

= code

= docker file

= docker engine

= platform

$

build

ship

deploy

Page 15: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

#containerisation

'

(

)*

the containerisation machine

$$$

Page 16: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

'you can’t polish a turd

#

$

containerisation

(

).

$$$ =

Page 17: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

dev » test » stage » production

small - secure - performant - stable - immutable

%Minimal Lovable Service Image

Page 18: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SMALL SECURE

PERFORMANT STABLE

IMMUTABLE

$%

Page 19: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SMALL Start with the smallest minimal image you can find. Remove compile time dependencies. Remove packages you don’t need. Run stats for the image.

$%

Page 20: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SMALL SECURE

PERFORMANT STABLE

IMMUTABLE

$%

Page 21: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SECURE Remove all the secrets. Patch to the latest security updates. Run the image with the right UID. Test the image.

$%

Page 22: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SMALL SECURE

PERFORMANT STABLE

IMMUTABLE

$%

Page 23: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

PERFORMANT Optimise code. Memory and cpu usage. One process. Load testing.

$%

Page 24: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SMALL SECURE

PERFORMANT STABLE

IMMUTABLE

$%

Page 25: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

STABLE Lock the image version. Lock the runtime version(s). Tag your image. Proper logging. Image guideline for your team.

$%

Page 26: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SMALL SECURE

PERFORMANT STABLE

IMMUTABLE

$%

Page 27: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

IMMUTABLE Use volumes wisely. Loosely coupled. Don’t use databases inside a image. Use external services for persistency.

$%

Page 28: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

dev » test » stage » production

small - secure - performant - stable - immutable

%Minimal Lovable Service Image

Page 29: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

How the hell do I run Docker in Production?...

and will it scale?

Page 30: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

-

$%

$ 0

monolith containerisation ± 70 %

monolith 1x

monolith image FAT

Page 31: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

-

$%

$

0

API first containerisation ± 20%

$%

$api 1x

frontend 1x

image frontend FAT

image api FAT

Page 32: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

-

$%

$

0

splitting monolith containerisation ± 6%

$%api 6x

frontend 1x $%

$

workers 10x

$$$$$$$$$

image frontend FAT

image api THIN

image workers THIN

$$$$$$

Page 33: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

-

$%

10

$%A 6x

B 12x $%

$

C 10x

$$$$$$$$$

image B THIN

image A THIN

image C THIN

$$$$$$

microservice architecture ± 4%

$$$$$$$

$$$$$

message queue

Page 34: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

people

good service

%

Page 35: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DEV/OPS/DESIGN FLOW ORCHESTRATION DISCOVERY SCALING DATA MANAGMENT MONITORING SECURITY

0

Page 36: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DEV/OPS/DESIGN FLOW Have an image guideline. Create a workflow using the same image in all the software cycle stages. From design to production mimic the environment. Test heavily.

20

Page 37: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DEV/OPS/DESIGN FLOW ORCHESTRATION DISCOVERY SCALING DATA MANAGMENT MONITORING SECURITY

3

Page 38: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

ORCHESTRATION Isolation of services. Make use of the resource available. Self healing. Load distribution. Adding nodes to your cluster.

23

Page 39: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DEV/OPS/DESIGN FLOW ORCHESTRATION DISCOVERY SCALING DATA MANAGMENT MONITORING SECURITY

4

Page 40: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DISCOVERY Find your services and datasources with minimal code change. Versioning of running services. Automagically update discovery when new services are online or scaled up/down.

24

Page 41: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DEV/OPS/DESIGN FLOW ORCHESTRATION DISCOVERY SCALING/SCHEDULING DATA MANAGMENT MONITORING SECURITY

5

Page 42: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SCALING/SCHEDULING Scale your containers. Scale your docker cluster. Scale your on/off jobs. Failover groups. Cross cloud clusters. Load balancing.

25

Page 43: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DEV/OPS/DESIGN FLOW ORCHESTRATION DISCOVERY SCALING DATA MANAGMENT MONITORING SECURITY

Page 44: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DATA MANAGEMENT Backup and restores. Clustering. Verify your backups. Run natively not in a container.

2

Page 45: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DEV/OPS/DESIGN FLOW ORCHESTRATION DISCOVERY SCALING DATA MANAGMENT MONITORING SECURITY

6

Page 46: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

MONITORING Get all the statistics of resources (mem/load/net/res) used. Aggregating of logs. Debugging your containers.

26

Page 47: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

DEV/OPS/DESIGN FLOW ORCHESTRATION DISCOVERY SCALING DATA MANAGMENT MONITORING SECURITY2

Page 48: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SECURITY Intrusion detection and prevention systems. Denial of service protection. Firewalling. Failover groups. Segregate container groups VPC / bastion servers. Verification of images.

22

Page 49: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

'start small & smart - scale up later

#

$

containerisation

(

7.

$$$

Page 50: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

SMALL SECURE PERFORMANT STABLEIMMUTABLE

$%DEV/OPS/DESIGN FLOW ORCHESTRATION DISCOVERY SCALING/SCHEDULING DATA MANAGMENT MONITORING SECURITY

#

MLI PLATFORM CONTAINERS AS A SERVICE

Page 51: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

When you get DevOps right, Microservices architecture right and creating the right minimal lovable Image and having the right platform to run containers. Ohh man, the future is bright and you don’t go to hell!

%

Page 52: talk how the hell · Microservices Docker in Production?... and will it scale? Dev Ops Design Developer Advocate. Build, deploy and maintain any application on any server, on the

Daniël van Gils @folding beauty [email protected]

www.cloud66.com

!"

www.cloud66.com blog.cloud66.com habitus.io startwithdocker.com

ready for your quest?

thank you