Download - Why should i care about stateful containers?
![Page 1: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/1.jpg)
Why should I care about stateful containers?
Luke MarsdenCTO, ClusterHQ
@lmarsden @clusterhq
![Page 2: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/2.jpg)
Microservices are smashing up monolithic databases
Many more database instances, many more flavours
prod
staging in cloud 2
DR in cloud 3
hosted CIdev
laptop
![Page 3: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/3.jpg)
Aren’t containers stateless?
12 factor apps
![Page 4: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/4.jpg)
One platform
![Page 5: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/5.jpg)
Dev/prod parity
![Page 6: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/6.jpg)
Cloud services are effectively closed source
![Page 7: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/7.jpg)
Portability
![Page 8: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/8.jpg)
OK, who’s in?
![Page 9: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/9.jpg)
Cattle vs. petsDeep dive
![Page 10: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/10.jpg)
compute
local storage
infrastructure evolution1990s
servers with disks in
Servers Volumes
Pets Pets
Cattle Pets
Cattle Cattle
![Page 11: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/11.jpg)
SAN storage
VM VM VM
infrastructure evolution2000s
vol vol vol
VMware hosts
virtualisation and shared storage
Servers Volumes
Pets Pets
Cattle Pets
Cattle Cattle
![Page 12: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/12.jpg)
EBS
VM VM VM
infrastructure evolution2010s
cloudVMs no longer HA
vol vol vol
EC2Servers Volumes
Pets Pets
Cattle Pets
Cattle Cattle
![Page 13: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/13.jpg)
infrastructure evolution2010s
computelocal storage
on-prem “hyperconverged” or “SDS”eg OpenStack + Ceph or ScaleIO
VM
vol vol
Servers Volumes
Pets Pets
Cattle Pets
Cattle Cattle
![Page 14: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/14.jpg)
infrastructure evolution2010s
computelocal storage
distributed databasesbare metal / cloud VMs + local storage
db
Servers Volumes
Pets Pets
Cattle Pets
Cattle Cattle
db
![Page 15: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/15.jpg)
infrastructure evolution2010s
computelocal storage
distributed databases on SDS
vol vol
Servers Volumes
Pets Pets
Cattle Pets
Cattle Cattle
db db
![Page 16: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/16.jpg)
infrastructure evolution2015
computelocal storage
distributed databases on SDSin container clusters
vol vol
Servers Volumes
Pets Pets
Cattle Pets
Cattle Cattle
db db
container scheduler
![Page 17: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/17.jpg)
Servers Volumes What is it?
Pets Pets just crap
Cattle Pets storage orchestration
Cattle Cattleephemeral
stateful containers
Pet ~= HA provided by infrastructure/platformCattle ~= HA provided by application
![Page 18: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/18.jpg)
Pros & consStorage orchestration• Run any database/stateful app• Storage layer responsible for
data resilience• Ops independent of database
types• Works within a storage zone
Ephemeral stateful containers• Requires distributed database(s)• Database-defined data resilience• Ops requires understanding each
data service• Can span storage zones
![Page 19: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/19.jpg)
Ephemeral stateful
![Page 20: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/20.jpg)
Storage orchestration
![Page 21: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/21.jpg)
Why should data be pets when servers are cattle?
![Page 22: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/22.jpg)
![Page 23: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/23.jpg)
![Page 24: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/24.jpg)
Relocatable
EBS/SDS/SAN…
![Page 25: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/25.jpg)
Stateless things scale outStateful things scale up
Container can be a shard
![Page 26: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/26.jpg)
You can mix and match stateful + stateless in a
container cluster
![Page 27: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/27.jpg)
Use case: rebalance cluster
storagev1
compute
containerhost
(VM orbare metal)
c1 c2
container composer + scheduler + SD
v2
![Page 28: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/28.jpg)
Use case: rebalance cluster
storagev1
compute
containerhost
(VM orbare metal)
c1 c2
v2
container composer + scheduler + SD
![Page 29: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/29.jpg)
Use case: drain a node
storagev1
compute
containerhost
(VM orbare metal)
c1 c2
v2 v3
c3 c4
v4
container composer + scheduler + SD
![Page 30: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/30.jpg)
Use case: drain a node
storage
compute
containerhost
(VM orbare metal)
v3
c3 c4
v4
v1
c1 c2
v2
container composer + scheduler + SD
![Page 31: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/31.jpg)
Use case: drain a node
storage
compute
containerhost
(VM orbare metal)
v3
c3 c4
v4
v1
c1 c2
v2
container composer + scheduler + SD
![Page 32: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/32.jpg)
Use case: HA when node fails
storagev1
compute
containerhost
(VM orbare metal)
c1
container composer + scheduler + SD
![Page 33: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/33.jpg)
Use case: HA when node fails
storagev1
compute
containerhost
(VM orbare metal)
container composer + scheduler + SD
![Page 34: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/34.jpg)
Use case: HA when node fails
storagev1
compute
containerhost
(VM orbare metal)
c1
container composer + scheduler + SD
![Page 35: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/35.jpg)
Use case: speed up distributed database recovery
storagev1
compute
containerhost
(VM orbare metal)
c1
container composer + scheduler + SD
c2
container overlay network
v2
10.0.0.1 10.0.0.2
c3
v3
10.0.0.3
![Page 36: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/36.jpg)
Use case: speed up distributed database recovery
storagev1
compute
containerhost
(VM orbare metal)
c1
container composer + scheduler + SD
c2
container overlay network
v2
10.0.0.1 10.0.0.2
c3
v3
10.0.0.3
![Page 37: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/37.jpg)
Use case: speed up distributed database recovery
storagev1
compute
containerhost
(VM orbare metal)
container composer + scheduler + SD
c2
container overlay network
v2
10.0.0.2
c3
v3
10.0.0.3
![Page 38: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/38.jpg)
Use case: speed up distributed database recovery
storagev1
compute
containerhost
(VM orbare metal)
container composer + scheduler + SD
c2
container overlay network
v2
10.0.0.2
c3
v3
10.0.0.3
c110.0.0.1
![Page 39: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/39.jpg)
Connecting storage to containers
![Page 40: Why should i care about stateful containers?](https://reader031.vdocuments.us/reader031/viewer/2022022413/58eccf7b1a28ab3e318b4603/html5/thumbnails/40.jpg)
Try Flocker todayFor stateful microservices
github.com/clusterhq/flocker
We are hiring in Bristol (1 hour hop from Schiphol)+ SF Bay Area!
clusterhq.com/careers