How it works

Unikraft Cloud takes a first principles approach in order to provide the first millisecond cloud compute platform with efficiency and performance as first class citizens.

Cloud traffic is almost always intermittent or bursty, in timescales of milliseconds. To cater to this, Unikraft Cloud represents the first platform able to provide millisecond cold boots, scale-to-zero and autoscale, as well as high server density (e.g., thousands of instances on a single server) – all of the while ensuring strong, hardware-level isolation across instances and a familiar Docker-based user interface.

In order to provide such efficient, millisecond semantics, Unikraft Cloud ensures that every component in the chain, from receiving a request to a service replying, can carry out its work fast – in millisecond scales at worst, and often faster. More concretely, we’ve had to optimize the (1) network components, (2) cloud stack and (3) application start time, as illustrated here:

CUSTOM PROXYCUSTOM CONTROLLERFAST VMMUNIKERNELSFAST SNAPSHOTTINGNETWORKAPP START TIMECLOUD STACK(milliseconds)(milliseconds)(milliseconds)

Cloud Stack Unikernels at the Core

On the cloud, the hypervisor, and the virtual machines that run on top of it, are the golden standard for providing strong, hardware-level isolation. Unikraft Cloud takes this to heart, but with a firm belief in efficiency: the result is the world’s most specialized VMs, called unikernels, in order to provide the smallest memory consumption, fastest start up times, and most efficient I/O, to name a few metrics.

APPLIBRARIESOS/KERNEL

Unikraft Cloud’s unikernels are based on the award-winning, Linux Foundation open source Unikraft project; this allows the platform to leverage lean images that contain the app, the code the app needs to run, and nothing more. Such lean images have security benefits too, as much fewer lines of code are deployed than with conventional images. Unikraft Cloud couples these with a modified version of the Firecracker Virtual Machine Monitor (VMM) to provide images that can start lightning fast.

Network Our Proxy and Controller

Unikernels on the platform can start in milliseconds, but what good would that do when controllers take seconds or minutes to take any action? For Unikraft Cloud to be fast and scalable, we needed a controller that could react in milliseconds and be scalable to thousands, or more, instances. The result is a custom platform controller that provides best-in-class, reactive, millisecond semantics and scalability.

To make network processing fast, Unikraft Cloud couples this controller with a custom proxy which is able to very quickly react to incoming requests.

App Start Time Fast VM Snapshotting

A lightning fast load balancer, controller, and unikernels, is that enough? In some cases, no: some applications can take seconds or even minutes to actually initialize, which could, in principle, break the platform’s millisecond semantics. To prevent this, each instance can be optionally deployed with snapshotting enabled: with this on, Unikraft Cloud will wait for the application to fully initialize, then take a memory snapshot, and only then scale it to zero; cold starts are then done from the snapshot, reducing cold starts from seconds or minutes down to tens of milliseconds, even for heavy apps. This mechanism further allows Unikraft Cloud to optionally provide stateful scale to zero where needed.

Putting it all Together A Millisecond, Reactive Platform

How do all the components of Unikraft Cloud platform work in conjunction? When a request comes in, the platform's proxy buffers it, and notifies the controller that it did. The controller will look up whether an instance exists to service the request, and, if it does, will ask the VMM to wake the instance (read: unikernel) up. When ready, the controller will notify the proxy, which will then unbuffer the request so that the unikernel can receive it and reply to it.

User

On Unikraft Cloud that entire chain of events happens within milliseconds, and so hidden within the Internet’s typical RTTs. As far as the end user is concerned the instance was always up; as far as the platform is concerned, it was on standy, consuming no resources. Similar mechanisms allow Unikraft Cloud to offer millisecond autoscale and cold starts.

The End Result The Only True Serverless, Millisecond Platform

  • Cold starts in milliseconds, even for heavy apps vs. seconds or minutes on other platforms.
  • True (optionally stateful) scale to zero: requests (and their absence) are detected in milliseconds versus seconds or minutes on other platforms.
  • Reactive autoscale in milliseconds, versus seconds or minutes on other platforms.
  • High server density: thousands of instances on a single server.
Unikraft Cloud takes a radical leap forward to remove the orders of magnitude dissonance between (1) the legacy cloud infrastructure built with seconds or minutes semantics trying to (2) service intermittent and bursty cloud workloads happening in milliseconds timescales.
Get Started Today