Docker Stack - By Clicksco

Docker Stack - By Clicksco

What is Docker?

You’ve probably heard of Docker, as since its initial release in 2013, it has gained a lot of traction in the tech community. Not familiar with this yet? Well that’s okay, we’ll be explaining some of its primary functionality and applications in this blog.

To begin with, Docker allows applications to run in isolation inside light-weight containers, separate from the host operating system. This is achieved through configuring an ‘image’ with the files and settings required to run your application. Once an image is configured, it can be pushed to a Docker image registry allowing it to be pulled down to any machine. Images are the environment run within a container. Therefore once an image exists in a remote repository, a container can be launched anywhere, on any machine with Docker installed, and your application will run in the same way. This completely removes situations where your app runs on your machine - but not in deployment.

Sound good? Keep reading.

How does Docker Stack help?

Docker Stack sits at a higher level than Docker containers and helps to manage the orchestration of multiple containers across several machines. Docker Stack is run across a Docker Swarm, which is essentially a group of machines running the Docker daemon, which are grouped together, essentially pooling resources.

Stacks allow for multiple services, which are containers distributed across a swarm, to be deployed and grouped logically. The services run in a Stack can be configured to run several replicas, which are clones of the underlying container. This number will be maintained as long as the service is running. Adding or removing replicas of a service is simple. This makes Docker Services ideal for running stateless processing applications.

Docker Stack in production

Docker Services are easily scalable and ideal for stateless applications. We have implemented them for event streaming and message based process intensive applications, handling millions of messages daily. And since Docker Services can communicate easily and live on the same ‘network’, they lend themselves particularly well to a micro-service architecture.

The deployment of many inter-communicating microservices is where Docker Stack comes in. The stack is configured using a docker-compose file. This is a YAML file written in a domain-specific language to specify Docker services, containers and networks. Given a compose file, it is as simple as one command to deploy the stack across an entire swarm of Docker nodes.

Our case for using Docker stack is the processing of millions of user page visit events containing information on the page a user has visited. This information is processed by a series of microservices, each feeding data to the next to attempt to find a good categorisation within our taxonomy for the page visit. Eventually a categorisation within our taxonomy is decided upon and this is written to the profile of the user who landed on the page. From then on whenever this user is seen within our network we can be sure that this person has an interest in the taxonomy node assigned by this process.


There's quite a few screenshots so a little tricky to put the whole thing on this article. If you'd like to read the rest here's the link - ronaldjamesgroup.com/article/docker-stack

Thanks to the guys at Clicksco for putting this one together :-)

要查看或添加评论,请登录

Dan Blackwell的更多文章

社区洞察

其他会员也浏览了