What is MicroVM

microVM vs container vs virtual machine

At the very beginning of the story there were virtual machines, and the cloud came along, then containers made our job easier and the cloud leveled up. MicroVM, on the other hand, is an invention that has leveled up the cloud. Currently MicroVMs are used in many places including AWS lambda, AWS fargate. In this article, I want to talk about what microVMs are and why they are useful. Let’s start

Virtual Machines

To start with virtual machines, which is the first step of this process. The advantages and disadvantages I will list may vary according to many parameters, but this is usually the case.

Virtual Machines have their own operating systems. This gives you flexibility, but remember that you also need a license for each VM. They are more isolated than containers and require more resources. Startup times are long because they need more components

Advantages:

  • Virtual machines are independent of the machines they run on, so a single physical computer can run multiple operating systems
  • More isolated than containers
  • VMs don’t share memory

Disadvantages:

  • High system requirements
  • Long start-up time
  • Higher cost

Containers

The emergence of containers has brought about numerous changes in our lives. The most significant distinction between containers and virtual machines lies in their operational mechanism. Containers run on a container engine integrated within the operating system, obviating the necessity to install a separate OS for each container during boot-up. This not only offers a considerable advantage but also enhances efficiency through the use of a shared operating system. Moreover, their lightweight nature ensures shorter startup times compared to traditional virtual machines.

Advantages:

  • Lightweight and fast compared to virtual machines
  • Optimized CPU utilization
  • Easy to use

Disadvantages:

  • Less isolation
  • Less secure

MicroVM

MicroVM is a lightweight and optimized virtualization technology. MicroVMs have some of the advantages of Container-based virtualization and virtual machines. The most prominent of these are low resource consumption and isolation. To give an example, AWS Lambda and AWS Fargate are also using firecracker, a microVM developed as open source by AWS.

Firecracker, the most popular among MicroVMs, promises us: ” it includes only what you need to run secure and lightweight”. In fact, this is a minimal component, unlike the situation we see in traditional VMs with its own operating system. Also, firecracker can deliver less than 5 MiB memory overhead per microVM. that means we can run thousands of microVMs at the same time[4]

Use Cases

  • Multi tenant applications: You can create thousands of microVM on the same instance, so you can service a lot of customers at the same time. (lambda like services good fit for this case) You can build your own faas solution with microVMs
  • Security: Sometimes microVMs can also be used as security shields. For example, downloading a file you downloaded from the internet into the microVM and checking if there is a security risk.
  • Temporary environments: The CI/CD pipeline can be used to create a short-lived and volatile environment such as a test environment

That’s all I want to talk about microVMs for now. I will share an article about Firecracker soon. If you are interested in this article, you can check out my other articles!

References

1- https://www.vmware.com/topics/glossary/content/virtual-machine.html

2- https://firecracker-microvm.github.io/

3- https://www.techtarget.com/searchsecurity/definition/micro-VM-micro-virtual-machine

4- https://aws.amazon.com/tr/blogs/opensource/firecracker-open-source-secure-fast-microvm-serverless/

5- https://aws.amazon.com/tr/blogs/aws/firecracker-lightweight-virtualization-for-serverless-computing/


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *