What s in a container

Aus PrivateKrankenversicherung.wiki
Wechseln zu: Navigation, Suche

Briefly, a container encapsulates and isolates utility code inside a container process that makes the code believe it has a machine all to itself, translating any system service calls out to the Container Management host. Since containers are really just processes, many (probably 1000's of) containers can simply share a single server, be it physical or virtual.

The contained utility bits assume they've a complete running operating system to themselves (like they might if hosted in a digital machine), but they are actually sharing the host OS. That is less isolation between applications than digital machines provide, but also more efficient (because every container is just not running its own OS).

There are different advantages. Containers run in user area and thus are less likely to corrupt, block or crash anything at the kernel level. Containers are shortly copied, often cached, and may be readily spun up and down. By design, containers may be totally constructed virtually anyplace (like on all these developer MacBooks) after which run wherever else persistently (like on Amazon Internet Providers). However all this means that containers have been originally designed to be stateless, containing no knowledge that needed safety or persistence.

Containers were initially designed for building microservices. A microservices architecture is nice for apps architected to be hosted in a cloud. These new apps have containerized bits which might be stateless in that they persist no internal information and can come and go (outside of atomic micro-transactions) dynamically as operational wants dictate.

Containerized application storage, however, is still huge thorn. Apps running inside a container can access the local OS storage, but when the container is moved (or cloned, replicated, etc.) to a different container host, it doesn't take any current host knowledge with it. As such, stateless containers will not be suitable for all kinds of functions that need a reliable and persistent knowledge service. Microservices that persist information at a micro-transaction degree into cloud storage, corresponding to AWS S3, work well, however most applications want more than that.