Book Image

Containerization with LXC

By : Konstantin Ivanov
Book Image

Containerization with LXC

By: Konstantin Ivanov

Overview of this book

In recent years, containers have gained wide adoption by businesses running a variety of application loads. This became possible largely due to the advent of kernel namespaces and better resource management with control groups (cgroups). Linux containers (LXC) are a direct implementation of those kernel features that provide operating system level virtualization without the overhead of a hypervisor layer. This book starts by introducing the foundational concepts behind the implementation of LXC, then moves into the practical aspects of installing and configuring LXC containers. Moving on, you will explore container networking, security, and backups. You will also learn how to deploy LXC with technologies like Open Stack and Vagrant. By the end of the book, you will have a solid grasp of how LXC is implemented and how to run production applications in a highly available and scalable way.
Table of Contents (17 chapters)
Containerization with LXC
About the Author
About the Reviewer
Customer Feedback

Scaling applications with LXC

LXC is pretty well-suited for virtual machine replacement in sense that it can contain a complete root filesystem for a Linux distribution, in which case, the only shared component with the host OS is the kernel. Applications can be installed in the container's root filesystem so that the host or other containers cannot share them. This isolation is useful if we want to run different versions of the same application and its dependencies, or different Linux distributions altogether.

On the other hand, libvirt LXC allows for the execution of a single process or a group of processes from a binary which is shared from the host OS by all containers. In this case, the containers share the host filesystem and only abstract certain directories. This helps in scenarios where the application might not need its own dedicated filesystem, if, for example, the Linux distribution in the container is the same as the host OS. Scaling such applications is a matter of ensuring...