what are micro services structure in simple way !

Microservices are a way of structuring a software application. A software application could be written as a monolith. One big piece of sofware that contains all the functionality. Of course, the structure inside the monolith can be quite modular, but you can only deploy the entire thing into production.

Microservices are the opposite of a monolith. You have small services that can be deployed individually. Each service has a focus on one aspect of the business functionality. The services are loosely coupled. That means, that the services work relatively independent of each other and only communicate with the other services, if necessary. Technically, each service has its own data storage, networking, logging, authentication, etc. They don’t depend on other services. Idealy, the services keep working, even if other services are down (crashed or for maintenance).

The benefit of of having many smaller services instead of one monolith are supposed to be:

  • Each unit only covers a small but self-contained piece of functionality and is therefore easer to understand and maintain

  • Each unit can be developed and tested on it’s own. That makes it easier to have multiple teams working on different aspects of the software independently

  • Units can be deployed into production without taking the entire aplication down for maintenance

  • Each individual unit can be build with the technology that best fits the task

Compared to the monolith, there are some downsides too:

  • Units still have to communicate with each other to some degree.

  • This communication now happens over network instead of in-memory data exchage

  • So you have to deal with network related problems like outages

  • Another unit that you need to talk to, might just have crashed and you need to have a strategy to deal with that

  • Because each unit needs their own data storage, networking, authentication, etc. poilerplate overhead can become an issue


Leave a Comment