Hosting vs. Deploying: System Containers vs. Application Containers

Should you use system containers or application containers? In this article, I break down the differences between hosting and deploying and provide insights to help you choose the right option. Read on to optimize your container strategy and streamline your deployment process.

Hosting vs. Deploying: System Containers vs. Application Containers
Photo by Timelab Pro / Unsplash

Hey there DevOps enthusiasts! Are you curious about the differences between system containers and application containers? A few years ago, I was working as Platform Engineer at Shelly Cloud, and I had the opportunity to work with both, and let me tell you, they each have their own unique advantages.

Shelly Cloud (shut down on March 31st, 2016) was a Ruby application hosting service. Back in the day, it provided high-speed servers, really simple deployment, and full control over the cloud layout. All on top of OpenStack, with a mixture of dedicated servers, virtual machines, and containers.

What are those containers all about?

To give you a better understanding, I've created a comparison table between system containers (using LXD as an example) and well-known application containers (using Docker as an example).

FeatureSystem Containers (LXD)Application Containers (Docker)
PurposeHost multiple servicesDeploy individual applications
SizeLarger and heavierSmaller and lighter
ToolsInclude all necessary tools and librariesInclude only the necessary dependencies for the application
ConfigurationConfigurations are made for each serviceConfigurations are made for each individual application

System Containers vs Application Containers

System containers are better than application containers in scenarios where you need to host multiple services within a single environment.

System containers come equipped with all the necessary tools and libraries required to run these services, making them a better fit for hosting multiple services. For example, if you're running a server with multiple web applications, database services, and background workers, system containers are an ideal solution as they provide a uniform environment for all services, ensuring that each service runs the same way across different environments.

These containers are typically used to host and run an entire operating system, including system libraries, and other system-level components. System containers are often used to deploy and run legacy applications that require specific system dependencies and configurations. Popular system container tools include Docker and LXC/LXD.

Additionally, system containers offer greater flexibility in terms of configuration and customization, making it easier to fine-tune the environment to meet your specific needs. Whether you're looking to host a large number of services or require a high level of control over the environment, system containers are definitely worth considering.

Application containers, on the other hand, are designed specifically to deploy individual applications in a lightweight and efficient manner.

Unlike system containers, application containers only include the necessary dependencies for the application, making them smaller and lighter than system containers. This makes application containers ideal for deploying applications quickly and efficiently, especially in fast-paced and dynamic environments where time-to-market is critical. Additionally, application containers are highly portable and can be easily moved between different environments, making it easier to deploy and scale applications as needed. Whether you're a startup looking to bring your product to market quickly or an established company looking to streamline your application deployment process, application containers are an excellent choice.

How did we use them at Shelly Cloud?

In my experience at Shelly Cloud, we used system containers to make sure all our backend services ran the same way across different environments and application containers to quickly deploy our client's applications to our platform.

A good example of a system container we used was the containerization of a Chef Server -  it is a complex solution for automation, with a whole stack of subsystems (e.g. RabbitMQ, PostgreSQL) that required multiple processes and dependencies to work. It would be difficult for us to separate each component of such a system into a dedicated applications container. Still, we wanted to leverage the lightweight of containers. Instead of using VMs, or dedicated servers, we decided to go with LXD

Further Reading

If you're interested in learning more about wanders of containers, here are a few books that you might find helpful:

The beauty of containers is that they make software development and deployment so much easier and more efficient! So, whether you're hosting multiple services or deploying a single application, it's important to understand the differences between system and application containers and choose the right one for your needs. And, with the power of managers like LXD and Docker, the possibilities are endless.

Happy containerizing!