Micro-services: A micro introduction
Mayank Vats
Posted on June 19, 2021
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. š
Posted on June 19, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 12, 2024
October 30, 2024