eBooks/eGuides

A Beginner's Guide to Containers

Issue link: https://insights.oneneck.com/i/1481431

Contents of this Issue

Navigation

Page 1 of 3

AlertLogic.com B E G I N N E R S T O O L F O R C O N TA I N E R S 2 What Are Containers? A container is a lightweight virtualized software image that is bundled with all the libraries and runtime tools it needs to run effectively. They are very easy to package and port to other platforms, which makes these small environments very useful and sought after for devops and general software development. Containers utilize a lightweight process virtualization, encapsulating applications in their own contained memory space. This allows easy scalability and a faster deployment than the usual applications that share memory resources with other applications. Containers also leverage the host OS kernel, meaning they don't require a separate guest OS kernel to run. This is appealing because booting a whole virtual guest OS for development or general server environments can get costly when it comes to both memory consumption and disk space. Instead you just run the application from within a container image with control over all resources needed. This level of control and low overhead allows users to run multiple instances of the same software at the same time, taking microservice architecture to another level. Containers: A Brief History It's worth noting that the idea of containerization isn't exactly new. It was introduced in Unix in 1979 with a software protection known as chroot or by the more familiar term it was later given—the chroot jail/change root. A chroot jail is a modified environment that changes the root directory structure for the current running process and its children. This virtualization of root directories makes it significantly more difficult for intruders, malicious insiders and/or anyone else to cause harm to the operating system or web platform by accident or with intent. Chroot jails were eventually added to BSD in 1982 and their functionality continued to grow until 2003, when microservice providers began offering chrooted proxies, shells, and IRC servers as well as other types of software. In 2005 Sun released Solaris containers— which they called "chroot on steroids." Eventually in 2008 the Linux Container— fashionably named LxCO was released and then evolved into what we know today as the docker container. Why Containers? Monolothic Vs. Microservice Arch Many application platforms use what is known as a monolithic model. Essentially, you have single tiered software appli- cation with a couple of components, all dependent on each other to function effectively. Picture an online shopping cart application that has four main components: a web interface, products, a shopping cart, and a payment system. With a monolithic application all of these parts would access the same database and highly depend on each other for function- ality—making each component a single point of failure. This can also make for a difficult situation when trying to scale, update software, or add a new component or feature enhancement to the existing platform. UI DATABASE BUSINESS LOGIC DATA ACCESS LAYER DATABASE Monolithic Architecture Vs. Microservice Architecture MICROSERVICE UI DATABASE DATABASE MICROSERVICE MICROSERVICE Figure 1: The diagram above illustrates the differences between monolithic and microservice architecture

Articles in this issue

Links on this page

Archives of this issue

view archives of eBooks/eGuides - A Beginner's Guide to Containers