dockercon sf 2015: the distributed system toolkit
TRANSCRIPT
![Page 1: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/1.jpg)
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://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/2.jpg)
https://www.flickr.com/photos/greeblie/2224507899
![Page 3: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/3.jpg)
Modular Container Design“Good fences make good neighbors” - Robert Frost
![Page 4: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/4.jpg)
A Quick Look @ Your Code
![Page 5: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/5.jpg)
& Your Code Community
Contribute
Share Use Keep
![Page 6: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/6.jpg)
Quick Look @ Your Cluster
![Page 7: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/7.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/8.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/9.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/10.jpg)
Modular Container Design● Separate concerns (e.g. “webserver”, “git syncher”)
● Build consistent experiences
● Avoid NIH
![Page 11: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/11.jpg)
Requirements...
Sharing between containers● Share namespaces (esp. PID, Network and IPC)● Share filesystems
![Page 12: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/12.jpg)
Requirements...
Co-scheduling of containers● Composition requires co-location
![Page 13: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/13.jpg)
Requirements...
Parameterization of containers● Configurable at runtime● Documented and discoverable
![Page 14: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/14.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/15.jpg)
Composite Container Application
Sidecars
Application Container
node.jsGit Synchronizer
Sidecars extend and enhance
Sidecar Container
![Page 16: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/16.jpg)
Composite Container Application
Sidecar Pattern
Application Container
nginxGit Synchronizer
Sidecars extend and enhance
Sidecar Container
![Page 17: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/17.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/18.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/19.jpg)
Demo
![Page 20: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/20.jpg)
From Legos to Starships
![Page 21: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/21.jpg)
Replication
![Page 22: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/22.jpg)
Micro-Service Load BalancerConsistent, Discoverable Name
![Page 23: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/23.jpg)
Complete Application
“Cassandra”
Cassandra Template
“Frontend”
NodeJS Template
![Page 24: DockerCon SF 2015: The Distributed System Toolkit](https://reader030.vdocument.in/reader030/viewer/2022032618/55ba8da3bb61eb2a0a8b47cb/html5/thumbnails/24.jpg)
Thank youBrendan Burns
#google-containers - @brendandburns - bburns [at] google.comgithub.com/GoogleCloudPlatform/kubernetes