Managing Microservices with Service Mesh: A Control Plane for your Application
@haridasHaridas N Architect at imaginea.com specialised in ML, Data Engineering and MLOps. Applications built on monolithic/ 3-tier/ n-tier architecture often fail to meet the market demands in terms of scaling and performance. This is generally attributed towards the inflexible nature of these architectures, where code base becomes unmanageable due to various reasons – like addition of new features, identifying dependencies, and side effects that could crop up due to scaling, etc. In these environments, adopting new technologies and making changes take a long time. The bottom line is that they are less agile and ancient. Microservice architecture is believed to be the rescuer, where business logic is handled by separate services. It helps overcome the issues faced by the likes of monoliths (where business and system logic are bundled together) by splitting the application into multiple small components where each handles specific tasks and exposes standard APIs. This helps to focus on the hotspots in your application and easily enable horizontal scaling too, if required. Having said that, it is not as simple as it looks to manage a microservice architecture. A glimpse of monoliths, microservices and anything in between Before delving deeper into managing microservices, let us take a look at what monoliths and microservices are capable of, and take stock of their pros and cons. Monolithic architecture 1. Monolithic applications keep its entire business logic in one single code base. It is deployed as a single entity or service. Pros: Low operational complexity. Holds good during the initial phase of application development, where few components are sufficient. Cons: Scaling the capacity (horizontal scaling) of the application is a challenge, as it involves handling multiple instances of a large code base. Increasing the development team size is another challenge, because it is hard for new members to understand the complexities of existing code. An enhanced version of the monolith can be called as the n-tier application, where vertical and horizontal scaling is possible. However, there are bottlenecks at the database (DB) and load balancer (LB) levels. Microservices Microservices are a natural evolution from n-tier applications. The components are segmented in such a way that there is no need to touch all of them while making changes to a specific application. The modern operational techniques brings down complexities involved in managing multiple microservices and progressive updates, zero downtime updates, etc. Pros: Each microservice can scale individually based on its demand. The development team can parallely work on their competent areas and rollout services. This is highly favorable for horizontal scalability and better resource utilization. Cons: Complex operational requirements to manage the system. It requires strong visibility to manage the entire system. Managing microservices in a modern application Currently, most of the modern applications are microservice based and they might be dependent on other SaaS, PaaS systems too. Key components of this architecture include: Technology agnostic frontend components (web, mobile or other clients) Authentication APIs Different services level APIs Operational complexities Microservice based application is the way to build modern applications due to its flexibility in scaling up and other resource utilization benefits. But, when it comes to operational requirements, it gets complex as it has multiple moving parts in it. It involves taking care of all the moving components, » Read More
Like to keep reading?
This article first appeared on hackernoon.com. If you'd like to keep reading, follow the white rabbit.