The CaaS Revolution

Thibault Bronchain

Not so long ago, running even a website was a full time sys admin job. We had to find a “dedicated” server. We were buying very expensive high performance hardware in order to face peak audience times, to realize an upgrade was required a few months later. We were spending days configuring our first server, to spend the same amount of time again and again each time we wanted to add a new server to our infrastructure.

Configuration could last weeks, and maintenance was an everyday thing. Good old times!

From App to SaaS

With the democratization of unlimited, high speed, 247 broadband access everywhere in the world, more and more people are continuously connected to the Internet. This constant access to information changed one thing in the software industry: the location of resources. On-premise software slowly became SaaS (Software as a Service), presenting a lot of advantages for both developers and users (i.e. easier/faster access for user, better integration, faster upgrades, …). But, running Software as a Service solutions has a cost for product builders. While startups couldn’t afford to buy a sufficient number of bare-metal servers in order to compute and store user’s data, corporate-sized companies had to deal with enormous costs related to the high demand.

SaaS is actually part of a bigger concept: Cloud Computing. This “Cloud” is often defined by three categories: IaaS, PaaS and SaaS. Put simply, IaaS and PaaS define hosting platforms, which could be presented as solutions to SaaS high costs on standard infrastructures. They both let us host and manage the resources for the product we are building, but in different ways:

  • IaaS (Infrastructure as a Service) let people create their own “virtual datacenter”. The big strength of IaaS is the ease of scaling. X virtual machines can be started on Y physical machines, optimizing the resources dedicated for each single task. Better: virtual machines can be (sometimes automatically!) launched within a few seconds. IaaS solutions can be public, such as AWS EC2 or Microsoft Azure or private, such as OpenStack. They are aimed to be multi-tenant solutions, where multiple users can share the same platform to host different kind of services/products.
  • PaaS (Platform as a Service) is more “accessible”, and allows for a faster deployment than IaaS. PaaS platforms were made for people who want to easily deploy an application, without worrying about the infrastructure, and want to use something “that just works”. Examples of PaaS providers are Heroku or DotCloud (former Docker company).

So, PaaS or IaaS?

Let’s remember the original problem: we, developers and product builders, need a scalable and cost-efficient way to host our SaaS applications. PaaS platforms sare seductive at first glance, but actually present some drawbacks. First, we are technically limited to the technologies supported by the PaaS provider. Though a large scale of technologies were supported, it could be a serious issue to have to conform to such strict limitations. Then, we have to be comfortable with the fact that we have no idea how the infrastructure is running under the hoods. Indeed, PaaS was often qualified as a “black-box” solution, giving no details on how the infrastructure was running, and sharing the same with all users.

PaaS didn’t satisfy everyone, and it seems IaaS has ended up as being the way to go for many of us. But PaaS was an evolution of IaaS, bringing the ease of use and automated scaling we all wanted. The problem was not solved, but the path was drawn.

Parallel to this “Cloud revolution”, grew the “DevOps” concept. It is the idea (or, for a long time, the problem) of connecting development and operations; or in other words, automating deployment operations. Does it sound like “PaaS” to you? It is because PaaS platforms were generally DevOps concepts applied to IaaS platforms. Understanding our needs, companies like Amazon (with AWS OpsWorks), or VisualOps, had the idea to mixed IaaS platforms and Configuration Management tools in order to let people in need for both the flexibility of PaaS, and transparency of IaaS, to build their own PaaS. One big strength? Transparency. One drawback? Complexity.

It was the beginning of something, but one problem was not solved: we need an easy yet efficient, flexible and secure platform to host the products we are building.

The CaaS revolution

To provide a solution, a team of engineers bet it was possible to “pack” all an application needs to run within isolated and portable containers. Docker was born. Docker is a containerization solution, providing a standardized open platform to build, ship and run distributed applications. Its strength resides in its standardized distribution model (see Docker Registry, the Docker Image Specification, and the upcoming Open Containers Project), making it in the path to become the new package management system. Docker brings us the flexibility, efficiency and ease of use we were missing.

Aware application containers could be the ultimate solution to the DevOps problem, projects to build “CaaS” - Container as a Service - platforms appeared. Amazon released last year Amazon ECS, on which we can run application containers on top of Amazon EC2 virtual machines. Another approach than running containers on the public Amazon cloud can be to set up a “Mesos + Marathon” infrastructure, for example, either on bare-metal (best performances) or IaaS (more flexibility) platforms, which let us schedule container deployments, or in other word, “build a cloud of containers”. While this Mesos approach brings us the best performances, taking away hardware virtualization, the Amazon approach to run containers on top of virtual machines is necessary to ensure a great isolation in case of multi-tenant applications.

How to optimize containers bootstrap and execution, while ensuring a sufficient isolation for multi-tenant use? Well, a team of linux kernel experts built a containers manager platform called Hyper. It provides a very minimalist “init+kernel” to run containers securely, within isolated “micro-VMs”.

What’s the difference between Hyper and any other container oriented Operating Systems? This very last thing, the “Operating System”. Hyper is not an Operating System, strictly speaking. Hyper is a set of four components: A tweaked Linux Kernel, a minimalist Init service, a management daemon, and a CLI client to manage Pods and VMs. By its minimalist approach, Hyper offers very close performance to native containers, at the same level of isolation than VMs.

With Hyper, immutable VMs are deployed “on-demand” on bare-metal, anytime a new app is created, avoiding the VM cluster you would find on Amazon ECS for example. With this approach, no more configuration is needed on the middleware, and no more idle capacity is used by awaiting pre-launched VMs. With Hyper, Cloud service providers are able to offer the secure, public, multi-tenant CaaS platform, where developers don’t need to manage a prebuilt cluster (i.e. scheduling, scale-out, failover, …). They simply define the app specs and get it deployed and running in one submission. Machines recycle more frequently, avoiding long-term memory leaks or temporary files pollution; and scale in/out in sub-second.

Hyper is a new born technology, and strongly relies on your feedbacks. Hyper is opensource! Try and follow Hyper on GitHub and Twitter.

Thibault Bronchain
Developers Ambassador