Usual web services are called monolith, meaning everything is being run on a single process or codebase. Software developed this way is easier to maintain and easier to develop. However, over time, the cost maintaining the whole monolith increases with the number of developers working on the same monolith. Moreover, to handle additional workload for a small part of the monolith, a whole instance of the monolith must be initialized.
Microservices on the other hand are, as the name implies, small web services that work together to serve a client. It is born out of the separation of concerns in the code level into an architectural level. Microservices let different teams handle different parts of the system, and scaling a part of the system means scaling only the affected microservice.
Usually, there is a monolith and it is splitted into microservices. The monolith is splitted from the seams, where the resulting microservice has loose coupling with other microservices but high cohesion on the parts of the microservice itself. In an ideal world, each microservice would have a counterpart in the real world that is independent like a warehouse service or a catalogue service. This in turn, should have the microservice function independently while being able to work with other microservices.
If one is creating a service with an eye for microservice, it is recommended to create a web service from monolith then afterwards splitting it. This ensures that no assumptions are made on how the code would look like avoiding redoing the architecture when an assumption doesn’t hold.
If one is creating a service with an eye for microservice, it is recommended to create a web service from monolith then afterwards splitting it. This ensures that no assumptions are made on how the code would look like avoiding redoing the architecture when an assumption doesn’t hold.
Using a hypervisor was the common way to deploy web services and to ensure the same development environment across teams. It provides a whole operating system (OS) to be used by the application and it is supported by many organizations and cloud providers. However, some companies does not use hypervisors but use containers instead. Containers let applications share the same OS by running the containers on the OS, the containers can be restarted without restarting the OS.
The additional abstractions of the hypervisor results in a decrease in performance compared to containers. However, hypervisors are still considered to be more secured than containers because of their isolation .
Docker is platform to aid in containerization developed by Docker, Inc. . The Docker platform provides multiple tools to aid in container creation and maintenance. It uses several features of the Linux kernel to achieve its purpose.
Creating a container using docker involves writing a Dockerfile which lists the commands to run in order to get to the desired state. Afterwards, an image would be created from the Dockerfile which would represent the container .
Kubernetes is an open source system for orchestrating containers . Kubernetes is the third of the system that Google has created for managing running containers. Each of the system improved upon the what was learned from the previous .
Kubernetes split the managing of containers into different types of resources (pods, services, jobs, etc.) all of which can be managed through the command line program kubectl or through http calls to the Kubernetes server .