Building an Internal Cloud with Docker and CoreOS

This is the first in a series of posts about adding containers to our server farm to make it easier to scale, manage, and keep pace with our business. The key ingredients are: Docker: container technology for making applications portable and predictable CoreOS: provides a minimal operating system, systemd for orchestration, and Docker to run containers Shopify is a large Ruby on Rails application that has undergone massive scaling in recent years. Our production servers are able to scale to over 8,000 requests per second by spreading the load across 1700 cores and 6 TB RAM.

Graeme Johnson
4 min readintermediate
--
View Original

Overview

The article discusses the implementation of an internal cloud using Docker and CoreOS at Shopify, focusing on the advantages of containerization for scaling and managing applications. It highlights the benefits of Docker containers, including fast startup times, resource efficiency, and improved workflows for both developers and operations teams.

What You'll Learn

1

How to efficiently scale applications using Docker containers

2

Why using CoreOS can enhance container orchestration

3

How to manage application dependencies within containers

Key Questions Answered

What are the key benefits of using Docker for application deployment?
Docker provides several benefits for application deployment, including fast startup times, efficient resource utilization through shared kernels, and consistent environments for applications. This allows for rapid scaling and easier management of applications across different environments.
How does CoreOS contribute to container management?
CoreOS offers a minimal operating system designed for running containers, providing essential features like systemd for orchestration and Docker for container execution. This makes it easier to manage and scale applications in a cloud environment.
What is the significance of container isolation in Docker?
Container isolation in Docker is achieved through kernel namespaces, which keep applications separated, and cgroups, which enforce resource limits. This ensures that each container operates independently, enhancing security and stability in multi-tenant environments.

Key Statistics & Figures

Requests per second handled by Shopify's production servers
over 8,000
This performance is achieved by distributing the load across 1700 cores and 6 TB of RAM.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Container Technology
Docker
Used for bundling applications into portable containers.
Operating System
Coreos
Provides a minimal OS for running Docker containers.

Key Actionable Insights

1
Adopting Docker can significantly reduce deployment times for applications.
With containers starting in single-digit seconds, teams can deploy updates and new features more rapidly, which is crucial for maintaining competitive advantage in fast-paced environments.
2
Utilizing CoreOS can streamline the orchestration of your containerized applications.
CoreOS's design is optimized for running containers, making it a suitable choice for organizations looking to implement a robust internal cloud infrastructure.
3
Implementing a developer-friendly workflow with Dockerfiles can enhance collaboration between development and operations teams.
By allowing developers to manage their own containers, organizations can reduce bottlenecks and improve overall efficiency in the software development lifecycle.

Common Pitfalls

1
Failing to manage application dependencies properly within containers can lead to inconsistencies.
Without careful management, different environments may not replicate the same application behavior, leading to deployment issues and increased debugging time.