dockercon sf 2015: the distributed system toolkit

24
The Distributed System Toolkit Composite Containers for Modular Architectures Brendan Burns - Google Cloud Platform @brendandburns

Upload: docker-inc

Post on 31-Jul-2015

2.718 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: DockerCon SF 2015: The Distributed System Toolkit

The Distributed System Toolkit Composite Containers for Modular Architectures

Brendan Burns - Google Cloud Platform@brendandburns

Page 2: DockerCon SF 2015: The Distributed System Toolkit

https://www.flickr.com/photos/greeblie/2224507899

Page 3: DockerCon SF 2015: The Distributed System Toolkit

Modular Container Design“Good fences make good neighbors” - Robert Frost

Page 4: DockerCon SF 2015: The Distributed System Toolkit

A Quick Look @ Your Code

Page 5: DockerCon SF 2015: The Distributed System Toolkit

& Your Code Community

Contribute

Share Use Keep

Page 6: DockerCon SF 2015: The Distributed System Toolkit

Quick Look @ Your Cluster

Page 7: DockerCon SF 2015: The Distributed System Toolkit

Your Next App. Design

Don’t think of a container as the boundary of your application

A container is more like a class in an object oriented language.

Page 8: DockerCon SF 2015: The Distributed System Toolkit

Benefits...

Build applications more quickly● Re-use existing containers in more places● Build things that are easy to use● Container boundaries are natural boundaries for

teams

Page 9: DockerCon SF 2015: The Distributed System Toolkit

Benefits...

Build applications more reliably● Leverage expert knowledge everywhere● Only make mistakes once● Only update the bits that need updating

Page 10: DockerCon SF 2015: The Distributed System Toolkit

Modular Container Design● Separate concerns (e.g. “webserver”, “git syncher”)

● Build consistent experiences

● Avoid NIH

Page 11: DockerCon SF 2015: The Distributed System Toolkit

Requirements...

Sharing between containers● Share namespaces (esp. PID, Network and IPC)● Share filesystems

Page 12: DockerCon SF 2015: The Distributed System Toolkit

Requirements...

Co-scheduling of containers● Composition requires co-location

Page 13: DockerCon SF 2015: The Distributed System Toolkit

Requirements...

Parameterization of containers● Configurable at runtime● Documented and discoverable

Page 14: DockerCon SF 2015: The Distributed System Toolkit

Patterns...

● Don’t design in a vacuum!● Don’t think that you are special!● Do share best practices and ideas!

Page 15: DockerCon SF 2015: The Distributed System Toolkit

Composite Container Application

Sidecars

Application Container

node.jsGit Synchronizer

Sidecars extend and enhance

Sidecar Container

Page 16: DockerCon SF 2015: The Distributed System Toolkit

Composite Container Application

Sidecar Pattern

Application Container

nginxGit Synchronizer

Sidecars extend and enhance

Sidecar Container

Page 17: DockerCon SF 2015: The Distributed System Toolkit

Composite Container Application

Ambassador Pattern

PHP app twemproxy

Ambassadors represent and present

localhost

Application Container Ambassador Container

MemcacheShards

Page 18: DockerCon SF 2015: The Distributed System Toolkit

Composite Container Application

Adapter Pattern

redis redis exporter

Adapters normalize and abstract

localhost

Application Container Adapter ContainerMonitoring System

Otheradapters

Page 19: DockerCon SF 2015: The Distributed System Toolkit

Demo

Page 20: DockerCon SF 2015: The Distributed System Toolkit

From Legos to Starships

Page 21: DockerCon SF 2015: The Distributed System Toolkit

Replication

Page 22: DockerCon SF 2015: The Distributed System Toolkit

Micro-Service Load BalancerConsistent, Discoverable Name

Page 23: DockerCon SF 2015: The Distributed System Toolkit

Complete Application

“Cassandra”

Cassandra Template

“Frontend”

NodeJS Template

Page 24: DockerCon SF 2015: The Distributed System Toolkit

Thank youBrendan Burns

#google-containers - @brendandburns - bburns [at] google.comgithub.com/GoogleCloudPlatform/kubernetes