In which scenario, we should not use micro services architecture? So far I can see the design for micro services, looks good for many use cases.
One of the basic use case I will not recommend for POC (Proof of concepts) projects.
Too Small to Break Down Not all applications are large enough to break down into microservices. Even high-end, high-ticket desktop applications, for example, tend to be at least an order of magnitude too small for microservice architecture.
Microservices Don't Ensure Good Modularization Although microservices enforce modularization, there is no guarantee it is good modularization. Microservices can easily become a tightly coupled “distributed monolith” if the design isn't fully considered.
Microservices are extremely useful when an organization needs to make a change to functionality — and deploy that functionality in a way that the rest of the system doesn't have to change. This allows a microservices architecture to deploy new functionality without any downtime.
This is a very broad, and possibly, very opinionated question. I would not advocate the use of micro services when you have a single application with many shared dependencies that is generally always deployed as a unit.
Micro services are great, and they have their place - but if your application is of a such a nature that it's always deployed as a unit, micro services can seriously expand complexity - now you're deploying a multitude of separate artifacts, all at once, instead of just a single application. The example that comes to mind for me is an ERP system.
Edit: And to expand on this, micro services shouldn't be your default architecture for an application. Keep it as simple as possible, and if you run into scalability issues, or something else that justifies going the micro services route, then do it. Keep it as simple as it can possibly be. So, IMHO, the answer to "when should I not use micro services?" is "when you don't need them".
See YAGNI.
In which scenario, we should not use micro services architecture?
You don't have to apply the microservices architectural style for scenarios that do not come with the problems that the style tries to solve. So which problems are those?
Before giving the answer - Microservices is a buzz word and describes an architectural style that tries to answer the age-old question of "how to break an application into logical components". While there is no exact definition, it usually comes down to independently develop-able and deploy-able components with a specific domain purpose. So with that in mind - Here are the problems that the microservices architectural style tries to solve:
The most important problem is scaling development in large organizations. Microservices allow independent teams to move fast with independent release cycles. Compare that with a large "monolith" that has to aggregate all dependencies and can spit out a release every couple months at best. So whenever a company is trying to organize hundreds of developers to develop a large server based application they should probably look into setting up teams being responsible for microservices. This is because "Architecture follows Organization" (Conway's law).
Scalability of the application itself. In conjunction with a stateless design the services can be deployed at scale in a clustered fashion. So whenever the user base is supposed to be growing over time you will most likely benefit from a microservices architectural style.
Enforce separation of concerns. In a "monolithic" development it is common to minimize persistent data schemas and have many components use the same database persistence. This increases complexity by adding indirect dependencies and thus adds to the communication and organizational overhead of releasing new software versions. Microservices are not allowed to share data persistency so this issue can be avoided.
Communication issues. If the communication between components is not well defined, the effort for reusing components increases drastically. Especially over the lifecycle of multiple versions of a component. Thus the microservices architectural style has a strong focus on well defined interfaces to the outside world. This includes the definition of interface versions (Major/Minor) for downstream consumers.
Then about your conclusion:
One of the basic use case I will not recommend for POC (Proof of concepts) projects.
Based on the above points your statement does not necessarily hold true. If it is a POC development with a large team and you anticipate any of the mentioned problems you will still benefit from the microservices architectural style.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With