Architecting for Failure in a Containerized World
Tom Faulhaber Infolace
Architecting for Failure in a Containerized World Tom Faulhaber - - PowerPoint PPT Presentation
Architecting for Failure in a Containerized World Tom Faulhaber Infolace How can container tech help us build robust systems? Key takeaway: an architectural toolkit for building robust systems with containers The Rules Decomposition
Tom Faulhaber Infolace
Decomposition Orchestration and Synchronization Managing Stateful Apps
Counter Service
1 2 3 4 5
…
Counter Service
1 2 3 4 5
… x
Counter Service
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
Counter Service
1 2 3 4 5
…
Counter Service
1 2 3 4 5
…
Load Balancer
1 2 3 4 5 1 2 3 4 5
App Server Service #1 Service #2 Service #3
App Server
App Core Code Logging Driver
Config
Logging Server
Logger App Core Code Logging Driver
Config
Logging Server
StdOut
Relational DB Session Store
Redis MySQL
time
time
time
time
time
time
time
Decomposition Decompose vertically Separation of concerns Constrain state Battle-tested tools High code churn, easy restart No start-up order! Consider higher-order failure Orchestration and Synchronization Managing Stateful Apps
Mesos Agent Framework Executor Mesos Master Framework Driver Mesos Agent Framework Executor Mesos Agent Framework Executor
Tools:
Patterns:
(Source: http://blog.cloudera.com/blog/2014/03/zookeeper-resilience-at-pinterest/)
Decomposition Decompose vertically Separation of concerns Constrain state Battle-tested tools High code churn, easy restart No start-up order! Consider higher-order failure Orchestration and Synchronization Use framework restarts Create your own framework Use synchronized state Minimize synchronized state Managing Stateful Apps
(State is the weak point)
Execution cluster Database cluster
Pros
clustering directly
Cons
problem!
locality
etc.
HDFS Mesos Marathon App HDFS Mesos Marathon App HDFS Mesos Marathon App
Pros
Cons
failure
complexity
Mesos Marathon App MemSQL Mesos Marathon App MemSQL Mesos Marathon App MemSQL
Pros
Cons
down
framework
Mesos Marathon App Cassandra Mesos Marathon App Cassandra Mesos Marathon App Cassandra
Pros
volumes
Cons
Mesos Marathon App ImageMgr Mesos Master Framework Mesos Marathon App ImageMgr Mesos Marathon App ImageMgr
Pros
containers
Cons
Decomposition Decompose vertically Separation of concerns Constrain state Battle-tested tools High code churn, easy restart No start-up order! Consider higher-order failure Orchestration and Synchronization Use framework restarts Create your own framework Use synchronized state Minimize synchronized state Managing Stateful Apps Battle-tested tools Choose the DB architecture Have replication
“Are We There Yet?” (https://www.infoq.com/presentations/Are-We- There-Yet-Rich-Hickey) “Simple Made Easy” (https://www.infoq.com/presentations/Simple- Made-Easy-QCon-London-2012)
Trenches, Bleeding Edge Press, 2015
Decomposition Decompose vertically Separation of concerns Constrain state Battle-tested tools High code churn, easy restart No start-up order! Consider higher-order failure Orchestration and Synchronization Use framework restarts Create your own framework Use synchronized state Minimize synchronized state Managing Stateful Apps Battle-tested tools Choose the DB architecture Have replication