By Anthony Amanse | Published November 1, 2018
CloudContainersContinuous DeliveryContinuous IntegrationDevOpsMicroservices
First of all, what are microservices? Microservices is a type of architecture that splits your application into multiple services that does a fine-grained function that’s a part of your application as a whole. Each of your microservices will have a different logical function for your application. Microservices is a more modern approach in an application’s architecture compared to a monolithic architecture where all your application’s components and functions are in a single instance. You can refer to a comparison of a monolithic to a microservices architecture on the diagram below.
Where do we put our microservices? In containers. Containers are packages of your software that includes everything that it needs to run, like code, dependencies, libraries, binaries, and more. Docker is one of the popular choices for building and running containers, but Kubernetes is quickly becoming the defacto standard that is used to orchestrate multiple containers in enterprise environments. Compared to Virtual Machines, containers share the OS kernel instead of having a full copy of it – like making multiple VMs in a single host. Although it is possible to put your microservices in multiple VMs, containers are commonly used in this case since it takes up less space and is faster to boot up.
The microservices architecture was born to address the problems that people saw in a monolithic application. Microservices are already widely used and some large scale websites already transformed their monolithic app to microservices. Some benefits of using a microservices architecture are:
While using microservices solves some of the problems of a monolithic architecture, using them has its own set of problems. If you’re trying to split your monolithic application into microservices, the first challenge is on how to split them. You can choose to split them into business functions, such as one microservice to handle shipments and another microservice to handle payment services. In the end, your components should only have a small set of functions or responsibilities.
Some problems in a microservice architecture that I can see are:
Kubernetes is a container orchestration platform that lets you deploy, scale, and manage all of your containers. It allows you to automate the deployment of your containerized microservices. This makes it easier to manage all of the components and microservices of your application. You’d want to learn Docker for containerizing your microservices. IBM has a public offering with the IBM Cloud Kubernetes Service that manages the cluster for you.
Istio addresses some of the drawbacks in microservices. Istio is a service mesh that further helps you in managing your microservices. Istio can be installed on top of Kubernetes, where it can help you in tracing and monitoring your microservices. This can also help you quickly trace the errors and bugs in your app if there are any. Istio can also manage the traffic of your microservices like managing and controlling the flow. Your routes can easily be configured. Istio also provides security within your microservices like having mutual TLS or limiting its access to external services. You can also install Istio onto the IBM Cloud Kubernetes Service.
In my experience, using a container orchestration platform is a must in building your application with microservices. Kubernetes is one of the popular choices by developers as it quickly brings their application from development to production. And, even better, it’s open source!
For developers who are starting to build their applications, they should decide whether it would be beneficial to them to use a microservices architecture rather than a monolithic one. They should consider the long-term usability and scalability of their application. It’s okay to start with a monolithic architecture, but once the application grows in size, it would only get harder to decompose them into microservices. In that case, it would be more beneficial to start off with microservices in the early development phase. For existing monolithic applications, developers should consider how and which components they would decouple in their application.
In spite of the drawbacks, microservices continue to be popular with developers and enterprises as it greatly benefits applications and users’ demands. With its flexibility, developers and enterprises can achieve rapid development or updates in their application once they have the right level of microservices.
Back to top