Container Types and Use Cases
System and application containers in nested architecture: certified containers, elastic VPS, custom Docker images, native Docker Engine and Kubernetes cluster.
Join the DZone community and get the full member experience.
Join For FreeThere are two types of containers that are oriented to solve different problems.
- System Containers — one of the oldest container types, which is quite similar to virtual machines. It is a stateful, operating system-centric solution that can run multiple processes. System containers are usually used for traditional or monolithic applications, as they allow to host architectures, tools, and configurations implemented for VMs. There are different implementations of system containers: LXC/LXD, OpenVZ/Virtuozzo, BSD jails, Linux vServer, and some others.
- Application Containers — a relatively new container type, which commonly runs a single process inside. It is a stateless microservice-centric solution that is easily scalable horizontally. Application containers are the most suitable for immutable and ephemeral infrastructures. Several application container implementations are available at the market: Docker, containers, CRI-O, and some others.
Talking about containers nowadays, people often think of Docker technology, as it was highly promoted and adopted during the last years. Most cloud vendors offer Docker application containers inside Virtual Machines. Each VM includes Guest OS with its memory, CPU, and disk footprint that increases the number of required resources to run the application and thus makes its hosting more expensive. In the case with Jelastic, Docker technology is running inside system containers within the same kernel. Thus they share OS resources from the host operating system and reduce consumption. And while being more lightweight than VMs, these nested containers are still highly isolated and secure.
Jelastic PaaS uses Virtuozzo system containers and Docker application containers in a nested architecture. Within the platform, different container types can be used for various use cases:
- Certified Managed Containers
- Elastic Virtual Private Servers (Elastic VPS)
- Custom Docker Containers
- Docker Engine CE (Docker Native)
- Kubernetes Cluster
Below we will review each case in detail, as well as provide some hints on what options can be more appropriate for your project.
Certified Managed Containers
The most common and recommended choice for Jelastic customers is certified containers. The platform offers multiple pre-configured and managed software stacks, that allow the creation of flexible topologies with the required application server (Java, PHP, Node.js, Ruby, Python, or Go), load balancer, databases, etc.
All of these certified containers are thoroughly tested and optimized specifically for the most common scenario within the platform. Jelastic team regularly updates these software stacks to the newest available stable versions or apply security patches to already released container images.
Usually, these containers also benefit from additional integrations, such as automated configuration based on the resource (cloudlet) scaling limits, automated SSL certificates installation, application deployment automation, built-in auto-clustering, managed delivery of security updates, and others.
Virtual Private Servers (Elastic VPS)
The most straightforward example of a system container implementation is a virtual private server. Jelastic offers Elastic VPS containers with the following pre-installed operating systems: CentOS, Ubuntu, and Debian. It is a pure OS-based container without any additional customization or software installed. It can be considered as the most suitable option for containerizing legacy applications as it requires minimal to no changes while migration from VMs.
Since it is practically “empty” after the installation, all the required configurations should be done by the end-user. To help you with this task, root access is provided to Elastic VPS containers. It’s almost like a virtual machine but more lightweight and with the advantages of automatic vertical and horizontal scaling.
Custom Docker Containers
The Custom Docker Container is a Docker image (based on the supported OS) deployed inside the Jelastic system container, which makes it compatible with the most (but not all) platform-distinguishing features, such as built-in vertical and horizontal scaling. In other words, the filesystem of your custom Docker image is unpacked inside the system container runtime.
Compared to the certified managed containers, this option provides access to a wider choice of software stacks. You can select from a vast range of 3rd party Docker images available at the Docker Hub or any other compatible public or private container registry. However, software operability and compatibility within the platform cannot be guaranteed as it is managed by respective 3rd party image maintainers.
Docker Engine CE (Docker Native)
Jelastic PaaS provides support for the Docker Engine Community Edition that is running inside system containers but at the same time has full compatibility to the native Docker ecosystem.
Such integration makes it possible to work with the core tools of Docker container technology, namely:
- Docker Engine — processes Dockerfile manifests or runs pre-built container images
- Docker Registry — stores and provides access to numerous public and private images, intended for deployment within Docker Engine
- Docker Compose — helps to assemble applications, that consist of multiple components where all the required configurations are declared within a single compose file
- Docker Swarm — represents several independent Docker nodes, interconnected into a cluster
Jelastic provides a pre-packaged version of the Docker Engine CE solution and Docker Swarm Cluster with integrated auto-clustering.
Kubernetes Cluster
Application containers can be run and managed with the help of the Kubernetes orchestration tool. It is an open-source platform designed for deployment and management of fault-tolerant containerized applications. It can handle complex tasks of container orchestration, such as deployment, service discovery, rolling upgrades, self-healing, and security management.
Jelastic PaaS Kubernetes implementation automates cluster installation, configuration, updates, and supplies multiple pre-integrated services (e.g. Weave CNI, CoreDNS, Traefik, etc.).
In other words, we run Kubernetes with the help of Jelastic orchestration providing maximum interoperability for projects that were designed for Kubernetes from the beginning. The major benefit of Jelastic Kubernetes' implementation is the advanced pay-per-use model that solves the right-sizing problem and makes hosting of multiple containers more cost-efficient.
Now, you know about various container types available at the cloud market, as well as their specifics within Jelastic PaaS. Hopefully, this will help you to choose the most suitable option for your project needs.
Published at DZone with permission of Tetiana Fydorenchyk, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments