Container as a Service: What Devs Need to Understand

It seems that everything today ends up being provided as a service. From infrastructure as a service (IaaS) to platform as a service (PaaS), it’s easy to get lost in what each of these do. And one of the newest entrants to this arena is container as a service (CaaS). Even as developers, we tend to get lost in the hype when trying to decipher all these terms. So, what does CaaS offer that’s different? And what do we need to know about its offerings?

In this post, we’ll take a look at what CaaS is and what it provides. We’ll also look at some of the pieces that make up a CaaS.

So What Do I Need To Know?

Container as a service provides a way to upload, run, scale, and manage containers that run your applications. They all have an API or CLI for executing these features. Some also provide a GUI or web portal. Containers can be of different types, with Docker, LXD, and OpenVZ being just a few examples.

This may seem similar to a PaaS, but there are some differences. Let’s review these concepts and see how they differ to get a better understanding.

PaaS

Platform as a service is built on IaaS. Additionally, some PaaS providers are now building on top of a CaaS.

Traditionally, PaaS provides hosting, packaging, and distribution of your application; zero-downtime deployment; and auto-scaling and load balancing. Additionally, it can integrate developer tools and some health and metric statistics. One of the main benefits of PaaS is that the developers can build the apps and not worry about the environment the apps run in.

Cloud Foundry, Heroku, and Google App Engine make up part of the list of PaaS providers.

CaaS

CaaS provides an easy and fast way to deploy containers. It also promises true portability, as containers can be configured to run almost anywhere. Finally, CaaS provides the ability to manage those containers as well as configure and manage clusters of containers.

On the surface, a CaaS doesn’t seem that different from a PaaS. They both manage deployment and hosting of your application. And they seem to have the same base functionality. Many of the benefits of PaaS are covered using container images and container registry. Additionally, Kubernetes takes care of the rolling deployments as well as load balancing and autoscaling.

Examples of CaaS providers include Google Kubernetes Engine (GKE) and Azure Container Service.

On the surface, a CaaS doesn't seem that different from a PaaS

CaaS Versus PaaS

Now, based on those differences, you may wonder why you would choose a CaaS over a PaaS. Which solution you choose depends on your use cases.

Both help developers deploy and run applications. However, PaaS will hide some of the containerization tasks from developers. In other words, with CaaS, you must manage the containerization of your application. With PaaS, they handle it for you.

Also, usually, a PaaS is more opinionated on languages and technologies used. Even though they support many different languages, there typically exists a limited number. That’s because they often rely on build packs to run applications instead of running generic containers like Docker.

Furthermore, CaaS makes it easier to take advantage of multicloud hosting. This is in part because CaaS isn’t as opinionated as PaaS. As long as your cloud provider can support containers, you’re able to roll out and run your services.

If you have a strong infrastructure team or are used to dealing with networking and operations issues, then you may want to use a CaaS to have greater control. However, if you’re new to deploying services to the cloud or your operations teams don’t have as much experience, a PaaS can give you the support you need to get started.

Another consideration when choosing between PaaS and CaaS involves speed and control. If you want to push out your application quickly and not worry about much else, a PaaS can help get you there. However, if you want more control over how your service is containerized and managed, then a CaaS solution would be best.

What Are the Drawbacks?

So far, everything probably sounds pretty good. But are there any drawbacks to CaaS that you should be aware of?

First, depending on your cloud provider, you may find that not all container types are supported. The majority of providers still support Docker, but we’ve seen an increase in limiting CaaS to certain container types. Cloud providers are increasingly coupling their offerings together to keep customers coming back to one place for all their cloud needs. If you’re trying to decide between container types, make sure they’re OCI compliant, as many CaaS providers require.

Additionally, because CaaS holds few opinions on what types of services should run in a container, it can be difficult to find proper tooling and monitoring. Make sure you add proper monitoring yourself using tools like Scaylr. CaaS providers typically expect you to handle your own setup for that.

 If you want to push out your application quickly and not worry about much else, a PaaS can help get you there

CaaS Components

Now let’s take a look at what makes up a CaaS.

Container Registry

The container registry is a repository for your container images. Think of it as a Maven repository for your containers. Once you put an image in the repository, your container management system will be able to pull the image and start running it.

A common registry that most developers are familiar with is Docker Hub. You can use a public registry like that, or you can have a private, on-premises version.

Container Management

The container management and orchestration portion of CaaS manages the containers and clusters of containers. Examples of container management include Kubernetes and Docker Swarm.

So what does that mean?

First, container management automates rollouts of your containers. It will create new instances, monitor them to ensure they’ve started correctly, and roll them back if there was an issue. Once your application is up and running, container management will also monitor the health of your services. If one instance of your service goes down or becomes unresponsive, container management will spin up a new instance to take over the load.

Container management also helps with load balancing and controlling container-to-container communications. For example, it allows client apps and containers to call instances of your services only once they’re fully up and running.

Developer Tools

Along with container management and registry, a CaaS solution provides a set of developer tools. The most commonly used tools have a CLI or API. These tools will let you monitor and manage your container instances. Though you want most management responsibility to be automated or scripted, developer tools will help you quickly scale instances up or down or modify configurations and deployments on the fly.

Conclusion

Although containers have been fairly mainstream for years, CaaS providers are still working on gaining ground. They’re poised to take over a share of PaaS usage with their flexibility to meet the needs of most development teams.

However, they’re still not right for everyone. They’re just another tool in our increasingly large developer belts. And there will be a need to learn more about what these technologies provide before everyone is comfortable.

This post was written by Sylvia Fronczak. Sylvia is a software developer that has worked in various industries with various software methodologies. She’s currently focused on design practices that the whole team can own, understand, and evolve over time.