Containers: The 'What' and 'Why'
More than half (53%) of developers recently surveyed by DZone report that they are using containers and microservices either in development of new applications, or production, or both. 81% of them agree that using microservices architecture in containers has made their job easier.
As you look forward to the future of your career as a developer, microservices and containers will play a big part.
In a recent post here, we discussed how classic monolithic programs have been superseded by finer-grained services that each perform a specific function required by the application. These services are loosely coupled to each other so they can each run independently of the others, meaning that if one fails the rest of the software is not impacted. The problematic service is simply discarded and re-instantiated. This lends great resilience to the performance of the application.
Built for the Cloud
We also suggested that this fine-grained, loosely-coupled architecture was perfect for use in cloud computing environments.
This is because monolithic applications were one block of code running on one server using one operating system (OS). At the beginning of their development, microservices were used in much the same, inefficient way. Running more than one on a single server risked conflicts and the possibility that the failure of one would impact others.
Microservices can and should each run on different servers located anywhere in a cloud network. At first each ran on different servers completely. Then each microservice was run on a virtual machine (VM) so that many could co-exist on one server machine with access to all its resources. However, the storage and processing overhead of having a VM and a complete operating system running on each VM was tremendous and costly.
When you travel you pack everything you’ll need into your suitcase. Similarly, microservices are “packed” into containers along with everything they’ll need to operate, including code, dependencies, libraries, binaries, and more. As opposed to the large overhead of a VM, multiple containers share the OS instead of each requiring their own. Not only do these take up less space, they also boot up far faster and are significantly easier to manage.
Using containers, each microservice no longer needs to be running in the same environment as all of its resources. The container knows where all the resources are and connects the microservice to them wherever it is running. This has the potential to take far better advantage of the distributed resources in a cloud environment, creating far greater efficiency and scalability than would be possible otherwise.
Tools to Learn
Docker is probably the most well-known tool for creating containers, managing them, and securing them. They claim to have created the industry standard for containers.
Kubernetes (k8s) was originally created by Google engineers. According to its website, it is an open-source system for orchestrating containers, automating deployment, scaling, and management of containerized applications. The Docker platform includes a complete Kubernetes environment that it says is designed “for developers and operators of all skill levels.”
The DevOps and microservices ecosystem is filled with other tools including Rancher, Swarm, Helm, Spring Cloud, Portainer, Marathon, Codefresh, Kitematic, Skaffold, and many, many more.
Getting Started with Containers
Your United Training Account Manager can review the many courses available to prepare you for development using microservices running in containers, including the use of Docker, Kubernetes, and many other tools. This will well prepare you to participate in the future of software development.