To persist or not to persist container data
- Slides: 19
To persist, or not to persist (container data), that is the question John Griffith, Solid. Fire Kenneth Hui, Rackspace Shamail Tahir, IBM
Presenters Kenneth Hui Open. Stack Evangelist Rackspace @kenhuiny
What’s To Know About Container Persistence?
What is a container? Defines available operations, exec environment, FS setup, resource reservations, etc. Container Format LXC run. C (libcontainer) Filesystem OS Features Union. FS namespaces Used to provide container specific view of the system (isolated PID, net, user, etc. namespaces) Image Container R/W Layer (0 MB) Layer 2 (6 MB) Changes made to the running containers are stored in R/W layer Layer 1 (120 MB) cgroups Cgroups are used to limit resources available to the container (RAM, CPU, Block I/O) Images consist of read-only layers that create the aggregated contents/config of container at initialization
Introduction to micro services… UI API UI UI API Container Application Logic Database Logic X Logic Y Logic Z Container Single Instance Data Container Monolith Microservices Architecture
…So why a whole session on persistence? This service is stateless and I don’t care if the data goes *poof* Container R/W Layer Data in this layer is ephemeral and will be discarded when the container is terminated I will create a new image to retain the new content ┬─┬� ノ( ゜-゜ノ) I’m sure there are better ways to maintain persistence
Numerous persistence options Local Storage Container Host Remote Storage Container Host Distributed Storage Container Host Data stores Container Host SDS Database Dedicated Storage
So You Want Container Storage: Do’s and Don’ts
Are you sure you are doing this right? ONE DOES NOT SIMPLY ATTACH STORAGE TO A CONTAINER • Don’t treat your containers like lightweight virtual machines • Don’t attach volumes to all your containers • Don’t use traditional SAN Storage
Don’t treat your containers like lightweight VMs • Large images are anchors • Containers shouldn’t be treated like pets
Don’t attach volumes to all your containers • You lose benefits of ephemeralness • You reduce your elasticity
Don’t use traditional SAN storage • You limit your scalability • You create SPOF
There is a better way to do this • Do use loosely coupled backend services • Do use persistent storage only when necessary • Do use distributed storage
Do use loosely coupled backend services • Use object storage for file data • Use DB-as-a-Service for data stores
Do use persistent storage only when necessary • Focus on keeping containers stateless • Use for data stores that may be difficult to replicate
Do use distributed storage
Adding Persistent Storage To Your Containers
Demo
- Tuck everlasting vocabulary words
- Difference between hauled and stationary container system
- Uncontrolled, lacking in restraint
- Persistent data container
- Ucl desktop everywhere
- Pete container
- Stress container
- Www.mystericycle.com http //www.mystericycle.com
- Tomcat webapps folder
- Star india container line
- Suse container platform
- "a movable resizable container for text or graphics"
- Advantages and disadvantages of hauled container system
- Ship loads
- Servlet 4
- Rough terrain cargo handler
- Serving per container
- A physical container or wrapping for a product
- Java containment hierarchy
- Cross-container attacks