[Web] When Not to Use Microservices
Monoliths Are Not Bad!
Microservices designs are another architectural pattern and are not intended to replace monolith applications. We should not blindly build applications as microservices without understanding the tradeoffs. Doing so could actually decrease productivity!
One way to think about this is to revisit our analogy with the Sports Superstore. Does it make sense for every aspiring small business owner to open and manage multiple stores at once?
Considerations for Not Using Microservices
System Complexity
Rather than deploying a single application, we would be deploying multiple modules separately. There is more overhead in setting up projects.
Network Latency
By introducing a network between modules, we have increased latency in application performance and will find it harder to debug our application.
Difficulty with Debugging
We can no longer rely on a stack trace or tools that can help us pinpoint where a bug is. We may end up relying on logging to find causes of issues.