Understand the differences in VM vs. container vs. serverless

VMs, containers and serverless computing provide organizations with application development flexibility, but they add management complexity.

Traditionally, applications were tightly linked to the server and the OS that executed their code. Through the years, vendors tried to lessen those dependencies and simplify deployments: VMs, containers and serverless computing represent different approaches that loosen those tight bonds. They each not only deliver higher degrees of portability, but they also introduce new management challenges for IT administrators. So, deciding among VM vs. container vs. serverless can become onerous.

Organizations spend a lot of time, money and effort allocating and managing their systems.

"Companies want to expend minimal resources maintaining computer infrastructure," said Torsten Volk, managing research director at Enterprise Management Associates in Boulder, Colo.

Taking the first step

VMs gained popularity because they dramatically increase server efficiency. Rather than deploy one server for each application, organizations can run multiple applications on a single computer. VMs are a well-established, understood and effective technology that almost every organization relies on.

"Virtual machines abstract server hardware capabilities and imitate dedicated hardware for an application," said Arun Chandrasekaran, distinguished vice president and analyst at Gartner in the San Francisco area.

At the time they were introduced, VMs were a major advancement in IT. However, VMs came with their own set of limitations. For example, each VM creates a system image that is tightly tied to the underlying OS. Organizations run multiple types of servers and generally migrate workloads to machines on an as-needed basis. VMs do not offer that level of portability, because a VM created for Microsoft cannot run on Linux, and vice versa.

VMs vs. containers vs. serverless computing

The next level of virtualization

Containers help address the limitations that come with VMs, such as reduced portability and inadequate resources.

"Containers virtualize an operating system, allowing multiple instances of an OS user space to share a single OS kernel," Chandrasekaran said. They run a layer above and separate application software from VMs.

In addition, containers break up software into small components that can be easily mixed and matched, which speeds up development. Studies show that container use will increase from $2.1 billion in 2019 to more than $4.3 billion in 2022, which is a compound annual growth rate of 30%, according to 451 Research.

However, containers are not perfect. Because containers are dynamic, they are also difficult to track. In addition, organizations generate large numbers of containers because they might run for a few minutes, or even seconds, and then disappear. Consequently, monitoring how containers function and what bottlenecks they create can become difficult.

One more variation

Serverless computing is an emerging approach designed to isolate developers from the bulk of the grunt work, such as allocating storage and establishing network connections, required for traditional computer infrastructure. Though applications still require server resources to run, developers no longer have to build them with serverless computing. Rather, they rely on high-level APIs that create resources on demand.

"Essentially, serverless functions abstract away the runtime environment, enabling developers to focus more on application design and configuration than on infrastructure-related provisioning and management," Chandrasekaran said.

But serverless computing also has its own flaws. With serverless computing, developers must rethink how they build applications and often require training because serverless operates antithetically to traditional applications.

In addition, system services have to boot in order for the application to run. As a result, latency delays might arise, which causes problems with real-time applications. Serverless also links organizations to a single supplier. For example, it's not easy to port a serverless application built for AWS so it can function on Microsoft Azure.

The final verdict

How should organizations choose among VM vs. container vs. serverless? That answer is application-dependent, according to Volk. For example, legacy systems typically rely on VMs, while greenfield cloud applications are often built on containers and serverless computing infrastructure.

Organizations do not have to make a definitive choice. The three approaches differ, but organizations can use them together. In a number of instances, containers can be put into VMs.

"Developers combine the management benefits that come with VMs with the flexibility that containers promise," Volk said.

Similarly, containers work well with serverless applications. For example, organizations might be building a new application that does not require tight connections with legacy applications. But VMs aren't used often with serverless computing because their foundations are so different.

Though organizations can mix the three approaches, managing the different systems is challenging because each approach has its own set of tools and capabilities. VM management services are quite strong, while container and serverless management products are in a nascent stage of development. But what organizations ultimately desire is a management offering that works with all three.

"While there is some convergence between these abstractions [VM and containers, containers and serverless], it is still very nascent to have a single unified control plane," Chandrasekaran said.

Organizations want to break the tight links found with applications and computer infrastructure. VMs, containers and serverless increase that desire, but an application development and management panacea remains elusive.

Next Steps

Choose the right serverless container service

What IT admins should consider when licensing a VM

Dig Deeper on Containers and virtualization

Software Quality
App Architecture
Cloud Computing
Data Center