An introduction to micro-services is incomplete without talking about monolith architecture, so before we start talking about micro-services let's first see what a monolith is, to get a good idea of what micro-services are and why they are needed.
🚀 Monolith Architecture
  In this type of architectural style, an application is developed as a single codebase and deployed as a single unit. Let's say you want to build a small role playing game(RPG) with following features:
    A. Build an avatar
    B. List available power-ups
    C. Upgrade player's power
    D. Daily bonuses
  In a monolith architecture each of these features will be bundled in a single unit and then deployed, and this single unit will refer to one single database. Earlier, this kind of architecture was very common.
🚀 Micro-service Architecture
  In this type of architectural style, an application is broken down based on its features, and each feature has its own codebase, known as a service, and each service refers to its own database (this model is also known as Database-per-service model).
  Taking the above example of the role playing game, Build an avatar, List available power-ups, Upgrade player's power, Daily bonuses, each of these features can be a service of its own, that is, each feature can be a self-contained unit and have its own database.
The why of micro-services
- Multiple teams can work independently on different features.
- No single point of failure.
- Even if one service fails the other one is not affected.
Microservices also provide a great way for independent feature development.
  This concludes the micro introduction to the micro-services. I hope you have learnt something new today.
Keep Learning and Keep Growing. 🎉
Top comments (0)