Containers and VMs Hosted Together
Make VMs and containers co-exist side-by-side within the same infrastructure and be orchestrated by the same cloud platform for more efficient hosting.
Join the DZone community and get the full member experience.Join For Free
Nowadays more and more companies are moving to container-based infrastructure. But nevertheless, virtual machines hold a massive part of the market. For many projects, the transformation from VMs to containers is a slow and complicated process that cannot be performed at once or is not feasible at all. Thus the infrastructure management becomes even more challenging while running cloud-native services on container-based platforms and at the same time keeping legacy applications on VMs.
So how do we overcome such complexity? The answer is to make VMs and containers co-exist side-by-side within the same infrastructure and be orchestrated by the same platform. In this way, you can host all types of projects using a single point of management and perform transformation gradually based on the current needs and possibilities.
Virtual Machines vs Containers
Before diving any further into VMs and container merge, let's cover the main differences between these two virtualization approaches.
- Virtual Machines: This is a virtualization type that allows splitting bare metal servers into multiple independent instances with separate operating systems inside. Such virtualization allows moving away from the approach of running one application or service per physical server, as well as to better utilize the ever-growing capacities.
However, the necessity in separate operating systems causes additional overhead in memory and storage footprint that leads to extra resource usage. Also, VMs are characterized by a lack of vertical scaling elasticity and relatively long provisioning time.
- Containers: This is a next-generation virtualization type that significantly simplifies and speeds up the creation of isolated containers on the physical server. Each container shares the host OS kernel, the binaries, and libraries. As a result, containers are exceptionally lightweight and fast to start. Application and system containers allow the implementation of the microservice principles more efficiently due to their elasticity and easy provisioning
In short, VMs virtualize hardware is used to run multiple OS instances, while containers virtualize operating systems so that multiple workloads can run on a single OS. Hosting on virtual machines is commonly used for traditional, monolithic, "all-in-one" applications. While containers are more adopted by cloud-native applications as each service component becomes a separate element in a microservice architecture.
Is it "bad" to work with one type over the other? It is different but most applications can work either way. Containers can offer multiple benefits such as elasticity and efficiency, ease of delivery, and simplicity of management. Still, many customers keep using applications that were not adopted for the container world. In this case, migrating to a new virtualization model requires a heavy investment in experts, resources, and time, which can be economically unprofitable compared to just keeping the already working application as is.
Running Containers and VMs Side by Side
Continuing with the freedom of choice philosophy, we added support of traditional VMs to the Jelastic PaaS where they can be run in a perfect union with containers. Thus, you can combine both types of virtualization within the same platform and infrastructure based on your projects’ requirements. This gives more flexibility for the teams to host and manage the applications with cutting-edge technologies in addition to long-present standards and methodologies.
Modernization of legacy monolithic systems is tedious and almost impossible to make quickly in one go, so it is recommended to progress gradually with enough time to analyze and implement each step. A possibility to run VM and container-based versions of the application on the same infrastructure offers great benefits. For example, when comparing these implementations through tests (performance, resource usage, load handling) or new features analysis (e.g. containers scaling). There is no need to choose blindly when you can check both application types and move forward with the most beneficial option or combine the best sides from each approach.
What Does It Bring for Cloud Hosting Providers?
As a cloud hosting provider, you don't want to miss customers from the VM and container market segments, so an obvious solution would be to support both virtualization types. However, it is not that simple. The complexity of the orchestration and infrastructure customization scares off most dual-hosting enthusiasts. Usually, hosting providers prefer to stick to one type omitting the other one. Some clouds offer support of both virtualization types but actually host them on separate infrastructure and use different orchestration platforms.
Published at DZone with permission of Tetiana Fydorenchyk, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.