- eCommerce is increasingly shifting from single code-base (Monolith) to Microservices architecture
- Microservices model has significant advantages over conventional Monoliths, especially faster time to market
- eRetailers in emerging markets can gain a major competitive edge by shifting to this model
Over the years all the businesses have inherited a huge legacy of domain logic bundled into a common codebase, hence making it monolithic.
Monolithic Architecture: Any simple codebase with defined tech stack that becomes non-maintainable, complex over a period of time, can be called as a "monolith".
Some attributes associated with it are, as below:
- Defined tech stack
- Results in too many issues for any small change
- High learning curve (complex codebase)
- Maintained by large teams
- Too many/Complex dependencies etc (Tightly coupled)
SOA came to some rescue but it had the below set of challenges:
- Resulted in tightly coupled services based monolith
- One dimension scalability
- Carried forward all the problems from traditional monolithic design, development & deployment
After the evolution of cloud applications, development & deployment has changed drastically. However, one core thing remained same about the applications is the time to market (TTM).
Any new feature, however small it may be, requires the entire application to be regressed and deployed, that increases the project duration. This limits businesses from capitalising on new opportunities and maximizing the revenue of each opportunity available in the market faster.
Since 2014, there have been a tectonic shift from monolithic architecture to distributed architecture (Microservices), led by industry leaders like Amazon, Netflix, Uber, Google etc.
Microservices is an architecture paradigm which breaks large software monolith architectures into loosely coupled services, which communicate with each other through simple APIs and can be independently created, deployed without impacting the ecosystem. Adheres to some common principles…
- Single Responsibility Principle (Self-contained & autonomous)
- Owned by small team
- Small code base
- Supports Polyglot tech stack with technology agnostic interfaces
- Deployed in independent containers
- Domain Driven Design
A quick comparison between Monolith and Microservices:
- High Code complexity
- Low code reusability
- High application downtime
- Limited Scalability
- Limited operational agility
- Reduced code complexity
- High Reusability
- Less application downtime
- Graceful degradation of the service
- High scalability
- More agility