zhrgci
zhrgci

Reputation: 676

Is it bad to implement a microservice architecture just for the sake of maintainability because of the modularity?

Let's say you have a project that doesn't need scaling, statelessness or multiple databases. Does it make sense to implement a microservice architecture with one database, just so the project is more modular and easier to maintain compared to a monolith n-tier application?

Upvotes: 0

Views: 297

Answers (1)

dotnetstep
dotnetstep

Reputation: 17485

This is bit depends on situation.

Between Monolithic (Layered Architecture) and MicroService (Fine-Grained Services), there is world of Modular Monolithic.

If you try to ask following question if answer is "Yes" then choose Modular Monolithic.

Scalability and Stateless should not be main factor to go for MicroServices. In fact Layered monolithic or modular monolithic both gives you this but with higher cost in terms of resource it required.

  1. Is it always case that you don't need scale?
  2. Is it always ok to have Single Database and your database is not bottle neck in future due to data.

If you ask following question, you get answer yes then it is more towards MicroServices.

  1. In future, Is there any requirement for scale? Specially one component scale factor is different from other.
  2. Do you need any kind of separate of data per service in future? Specially.
  3. Do you have all process to make automation. ( Like if you have too many services then it is problem)
  4. Are you installing your application standalone way or do you need regular update ? (Is this control by you).

Update:

Language as well as technology stack that you choose also make difference.

  • If you want that your all services or module can be written in one language and you are happy with it then Modular Monolithic is good choice.

  • if you want to choose different module/service in different tech stack due to each tech stack provide different benefit then Microservices is good choice.

  • Another factor I consider is team.

  • If you have different team working on different part of product then Microservice is good choice as it gives proper separation and autonomous behavior.

Upvotes: 2

Related Questions