Unikernels and the Future of Cloud Computing

Editor’s Note

At the time of writing, Docker had not yet acquired Unikernel Systems, and it’s remarkable that Vineet more or less predicted this acquisition. You’re going to gain a solid understanding of the context of the container, VM, and unikernel discussion, as well as see why it was only logical that Docker would acquire Unikernel Systems. Read on to learn more about the power of unikernels and why they are the way forward for microservices infrastructures!

A Brief History of the Cloud

Cloud computing is increasingly becoming a one-stop solution for large enterprises. The cloud enables large firms to treat all of their computing resources as a utility, thereby making budgeting and forecasting significantly less challenging. Because of the cloud’s rapid growth in the enterprise world, a number of supporting technologies have grown up alongside it.

Traditionally, hypervisor virtualization has allowed customers to multiplex virtual machines on a shared cluster of physical machines. If we look at traditional hypervisor virtualization in Linux, we’ll see an entire operating system running as a guest OS on top of the host OS using a hypervisor like Xen.

The Key Differences between Virtual Machines and Containers

Container virtualization is much lighter than the traditional hypervisors. In this form of virtualization, virtual machines are carved out of host operating systems sharing the same OS kernel —  these carved-out VM’s are referred to as Containers. You can take a quick look at an earlier post, Container Virtualization: what makes it work so well? for a bit of background. 

Containers provide encapsulation for a set of processes to run in isolation from the rest of the system. This means that the applications running inside containers appear to be running on a separate environment or operating system with a dedicated set of resources.

Containers don’t employ the overhead of guest operating systems or of a supporting hypervisor, which means more applications can run on a single host OS compared to a traditional virtualization approach. 

Booting and restarting container applications is faster than using VM’s because the host OS containers are nothing but process. Using containers this way contributes to less downtime and greater productivity.

Because of the container’s lightweight memory footprint, quick boot time, and ease of packaging, many experts believe that containers are the future of virtualization. The above advantages of containers offer an edge over hypervisor virtualization, but that doesn’t mean an end to hypervisor virtualization.

I’ll explain why.

The Rise of Unikernels – A Stripped-Down OS

Unikernels are largely seen as the answer from hypervisor virtualization for the emerging container concept.

Cloud operating systems or Unikernels are lightweight operating systems that are the backbone of a new form of cloud computing where a single hypervisor instance can support a large number of VMs.  These Unikernels are meant to be used within a virtual machine and can’t be run directly on a host OS/machine.

The Constraints of Traditional Virtual Machines

If we look at the traditional architecture of VM’s we see an entire, fully-loaded guest OS running as part of a VM. These operating systems are monolithic even if slimmed down. They are designed to be multi-user, multi-purpose, multi-process, and are extremely complex even for an engineer. They are meant to interact with hardware and thus involve all sorts of complexity needed to support device drivers from various vendors. The complexities listed above will come along if we are running a copy of the operating system even if it is not required.

These traditional systems are meant to interact with hardware, and therefore involve the complexity needed to support device drivers from various vendors. The complexities listed above are dragged along if we are running a copy of an OS — even if it is not required. This means we are bringing a big chunk of dead code with us when it isn’t required in the life-cycle of a Virtual Machine.

Even when the size of a container instance is in hundreds of MBs (if not in GBs) there is much more in the containers than the simple hosted application. This seems like a clumsy way to operate when we are all optimizing everything we can.

The Unikernel Approach: A Leaner System

The primary philosophy behind the unikernel is to tear off all the unnecessary sets of libraries and keep only a selected set of services which the application requires to function. Those libraries are compiled with internal applications, resulting in a complete system we call a unikernel. Unikernels are designed with the understanding that they will not need to run on hardware; consequently, unikernels lack the bloat and complexities of drivers. They aren’t meant to be multi-process or multi-user so they can focus on threads of code which are required to keep your applications running.

The unikernel model removes the need for an entire Operating System altogether, allowing applications to run directly on the hypervisor.

Some of the advantages of using the Unikernels model include:

Advantage #1: Smaller Size
By removing most of the unwanted libraries from operating systems and generating a runtime environment to enable a single application means that a unikernel requires fewer resources. Unikernels carry with them only what is required.

Advantage #2: Enhanced Security
Unikernels provide an excellent security mechanism. They accomplish this by reducing the surface area of a potential attack. Since unikernels compile with only essential elements, they reduce potential approaches for attacking the system. They don’t carry the potential vulnerabilities that would have come with the standard Operating System. There aren’t any shells or utilities to exploit.
Unikernel diagram
Advantage #3: Faster Speed
Unikernels boot fast as they don’t possess the overhead of bringing up unnecessary services that are not required by the compiler’s application.

Advantage #4: Scalability
With reduced guest operating system overhead and smaller memory footprint, unikernels permit a considerably high number of Virtual Machines to run on the hypervisor as compared to traditional VM’s.

Putting It All Together

The cloud is an environment where resources are rented and charged based on usage. The major reasons customers choose cloud computing over the alternatives is the reduced price and the efficient utilization of their underlying resources.
Technologies like Docker and CoreOS have done fantastic work to modernize how we consume infrastructure so that microservices are a reality. These technologies must not rest on their laurels but need to evolve to leverage the power unikernels.

Unikernels will have a major impact on the way we work, now and in the future.

Want to learn more about all this? Check out our Docker and Container Technologies learning path. You’ll learn everything you ever wanted to know about these technologies, including Docker advanced concepts, Ubuntu Core Cloud Computing OS and Snappy Package Manager, and more!

Written by

Vineet Badola

Working as a cloud professional for last 6 years in various organizations, I have experience in three of the most popular cloud platforms, AWS IaaS, Microsoft Azure and Pivotal Cloud Foundry PaaS platform.Having around 10 years of IT experience in various roles and I take great interest in learning and sharing my knowledge on newer technologies. Wore many hats as developer, lead, architect in cloud technologies implementation. During Leisure time I enjoy good soothing music, playing TT and sweating out in Gym. I believe sharing knowledge is my way to make this world a better place.

Related Posts

— January 15, 2019

2018 Was a Big Year for Content at Cloud Academy

As Head of Content at Cloud Academy I work closely with our customers and my domain leads to prioritize quarterly content plans that will achieve the best outcomes for our customers.We started 2018 with two content objectives: To show customer teams how to use Cloud Services to solv...

Read more
  • Amazon Web Services
  • Cloud Computing
  • Google Cloud Platform
  • microsoft azure
— December 21, 2018

2019 Cloud Computing Predictions

2018 was a banner year in cloud computing, with Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP) all continuing to launch new and innovative services. We also saw growth among enterprises in the adoption of methodologies supporting the move toward cloud-native...

Read more
  • 2019 Predictions
  • Cloud Computing
Albert Qian
— August 28, 2018

Introducing Assessment Cycles

Today, cloud technology platforms and best practices around them move faster than ever, resulting in a paradigm shift for how organizations onboard and train their employees. While assessing employee skills on an annual basis might have sufficed a decade ago, the reality is that organiz...

Read more
  • Cloud Computing
  • Product Feature
  • Skill Profiles
— July 31, 2018

Cloud Skills: Transforming Your Teams with Technology and Data

How building Cloud Academy helped us understand the challenges of transforming large teams, and how data and planning can help with your cloud transformation.When we started Cloud Academy a few years ago, our founding team knew that cloud was going to be a revolution for the IT indu...

Read more
  • Cloud Computing
  • Skill Profiles
— June 26, 2018

Disadvantages of Cloud Computing

If you want to deliver digital services of any kind, you’ll need to compute resources including CPU, memory, storage, and network connectivity. Which resources you choose for your delivery, cloud-based or local, is up to you. But you’ll definitely want to do your homework first.Cloud ...

Read more
  • AWS
  • Azure
  • Cloud Computing
  • Google Cloud
Albert Qian
— May 23, 2018

Announcing Skill Profiles Beta

Now that you’ve decided to invest in the cloud, one of your chief concerns might be maximizing your investment. With little time to align resources with your vision, how do you objectively know the capabilities of your teams?By partnering with hundreds of enterprise organizations, we’...

Read more
  • Cloud Computing
  • Product Feature
  • Skill Profiles
— April 5, 2018

A New Paradigm for Cloud Training is Needed (and Other Insights We Can Democratize)

It’s no secret that cloud, its supporting technologies, and the capabilities it unlocks is disrupting IT. Whether you’re cloud-first, multi-cloud, or migrating workload by workload, every step up the ever-changing cloud capability curve depends on your people, your technology, and your ...

Read more
  • Cloud Computing
— March 29, 2018

What is Chaos Engineering? Failure Becomes Reliability

In the IT world, failure is inevitable. A server might go down, an app may fail, etc. Does your team know what to do during a major outage? Do you know what instances may cause a larger systems failure? Chaos engineering, or chaos as a service, will help you fail responsibly.It almo...

Read more
  • Cloud Computing
  • DevOps
— November 22, 2017

AWS re:Invent 2017: Themes and Tools Shaping Cloud Computing in 2018

As the sixth annual re:Invent approaches, it’s a good time to look back at how the industry has progressed over the past year. How have last year’s trends held up, and what new trends are on the horizon? Where is AWS investing with its products and services? How are enterprises respondi...

Read more
  • AWS
  • Cloud Adoption
  • Cloud Computing
  • reInvent17
— October 27, 2017

Cloud Academy at Cloud Expo Santa Clara, Oct 31 – Nov 2

71% of IT decision-makers believe that a lack of cloud expertise in their organizations has resulted in lost revenue.1 That’s why building a culture of cloud—and the common language and skills to support cloud-first—is so important for companies who want to stay ahead of the transfo...

Read more
  • Cloud Computing
  • Events
— October 24, 2017

Product News: Announcing Cloud Academy Exams, Improved Filtering, Navigation, and More

At Cloud Academy, we’re obsessed with creating value for the organizations who trust us as the single source for the learning, practice, and collaboration that enables a culture of cloud.Today, we’re excited to announce the general availability of several new features in our Content L...

Read more
  • Cloud Computing
— August 29, 2017

On ‘the public understanding of encryption’ Tweet by Paul Johnston

Some of the questions by journalists about encryption prove they don't get it. Politicians don't seem to get it either (most of them). In fact, outside technology, there are some ridiculous notions of what encryption means. Over and over again, the same rubbish around encryption gets re...

Read more
  • Cloud Computing