Cloud Microservices, Containers, Docker and Kubernetes

Firstly let define what each of these terms mean.  Microservices are a software development technique—a variant of the service-oriented architecture (SOA) architectural style that structures an application as a collection of loosely coupled services for example routing network traffic, or making an online payment. A Microservices architecture helps build an application as a suite of small services, and can be run inside Containers, each running in its own process that are independently deployable, the general rule is one Microservice, one Container.

The concept of SOA has been around for some time where services are provided to the other components by application components, through a communication protocol over a network. The ESB (Enterprise Service Bus) was one of the methods used to co-ordinate these services. An enterprise service bus (ESB) is a middleware tool used to distribute work among connected components of an application, I remember being part of the team in the early noughties on BT’s 21st century network of services  project built around ESB technology.

Containers consists of an entire runtime environment the application, plus all its dependencies, libraries and other binaries, and configuration files needed to run it, all bundled into one package. The Docker definition of a container is : “A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. A Docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings”, and they should know.

Docker  is used to run  Containers, its a program that performs operating system level virtulisation. It is a platform for developers and system administrators to develop, deploy, and run containers. Docker is a technology that allows you to incorporate and store your code and its dependencies into an image. This image can then be used to spawn an instance of your application – a Container. Docker Swarm provides native clustering functionality for Docker containers. There are other container technologies besides Docker, such as LXD, Rkt, Windows Server containers, Open VZ, Mesos, Linux Vserver, Hyper-V Containers, Unikernels, Java containers. Each has its pros and cons which we wont look at in this post but possibly later, although the market by a mile is Docker.

Kubernetes is a cluster  and Container management tool, its a platform for automating deployment, scaling, and operations of  containers across clusters of hosts. Kubernetes is a container orchestration system for Docker Containers that is more extensive than Docker Swarm. Orchestration is the automated configuration, co-ordination, and management of computer systems and software.