In this blog, I am going to talk about what is a microservices model and why most of the application owner aspire to move to this architecture. Before that, let’s understand a monolith application architecture,
Monolith Application Architecture:
It is a single tiered application, where web interfaces and data interfaces are assembled in one application.
Some of the drawbacks with this architecture are,
- Every small change in the code requires build, test and deploy of the entire application.
- It is difficult to have shorter release cycles or feature releases, because, every other team is working on the same application.
- There will be no ownership of a functional domain, everyone is working towards a single application, this approach leads to knowledge drain of core functionalities in commerce which ultimately results in delivery failures or delays.
- Application is very large, and it is complex to understand and debug, also, maintenance of the application is going to be a nightmare.
- A defect like a memory leak in one function will bring down the complete application.
Microservices Architecture:
‘Microservices’, is an application architecture where smaller services/domains are developed, tested and deployed independently
Advantages:
- It provides a clear ownership of each domain, which allows you to develop and release new functionalities within a given domain without depending on other development teams.
- If one service fails, it is still possible for the rest of the application to operate until that failed service recovered. Recovering a service is also not complex because it is an independent service and has its own build and deployment pipeline.
- No need to bound to a single product or technology and you can save a lot from licensing, moreover you have the freedom to upgrade to new technologies and apply innovations.
- Based on the demand and performance these services can be deployed on a larger scale, in a monolith application you have to deploy same full one ear in every server which consumes more underlying resources.
- It is a key for long-term success, most of the companies are struggling to sustain because technology is evolving extremely fast and to be successful, it is required to innovate and beat the competition.
- Business users get an opportunity to market and build their product strategies much quicker than compared monolith applications, where everything is interdependent.
Challenges:
Microservices architecture helps business to act quickly by delivering features with measured ROI’s and time to market, however, there are some challenges with it,
- It is highly depending on the DevOps, so, organisations need to adopt DevOps culture.
- It is going to increase the operational complexity.
- Interprocess communication is going to be challenging.
Monolithic to Microservices:
So far I have talked about what is a Microservices architecture, what are the benefits and challenges with it. Now, let’s talk about how to adopt Microservices platform strategically. The first thing to understand is when and where it is required to apply microservices design pattern?
‘When the domain is customer facing and it is required to scale with the speed of innovation and time to market’, then, start with,
- Decouple UI application from monolith EAR.
- Adopt DevOps practices
- Implement API Gateway, and API Management to understand measurable metrics for APIs like, latency, SLA success rate, uptime and calls per day.
- Start looking at non-transactional domains which can be easily converted into a microservices model, for example: catalog browse and search functions.
- Transactional domains: Before converting your bag, order and checkout domains into microservices, start with promotions, pricing, and inventory services, these are the backbones for order and checkout domains.
- It is very important to build supporting components like caching, security, logging, monitoring, and reporting.
- Leverage, non-relational distributed databases like Cassandra which provides high scalability and availability with great performance. It helps you to process and access large-scale data across retail systems, especially when you integrate physical stores with a digital store.
Leave a Reply