The Path to Microservices: Do You Really Need Microservices Architecture?
Microservices are a good architectural style for designing backend applications. It provides your backend with flexibility, scalability, high availability, etc., but it also brings some problems like architecture complexity, skills complexity, consistency, and so on.
When choosing an architectural style between monolith and microservices, people are inclined to adopt microservices rather than a monolith. It is because they believe their backend needs to adopt microservices at the end or maybe microservices sound fancy.
I agree microservices are good but it does not mean monolith is bad. People always consider microservices first when considering architectural style, so it brings me to write this topic to discuss a little bit about choosing an architectural style.
Do you really need microservices architecture? The answer is yes or no. It depends on your scenario.
Every system is evolved from a monolith. We develop a monolith application at first and keep evolving the technologies and software architecture to serve our actual business needs.
Today, if you are creating a startup company, probably you don’t need microservices architecture. Because your main focus is fast development and rolling out the features to the market. Also, you don’t have large traffic and complex system requirement. In this stage, you are testing your ideas and gaining feedback from the market. If you adopt microservices architecture in this stage, probably you are over-engineering your architecture. It will not benefit your organization instead it brings a lot of complexity to your team and slow down software development. Therefore, monolith would be a good choice for you at this stage.
When your team and business scale are getting large, you can consider adopting microservices architecture to your system to solve the application or business scaling issues and offer a flexible development model to your team. Because now your main focuses are changed from fast development to system scalability, flexibility, reliability, etc., microservices would be a good option for you at this stage.
Before moving from monolith to microservices, probably you will get some application speed bottlenecks depending on your business scale. In this stage, you may consider scaling your monolith to multiple nodes and using a load balancer to route the traffic to different monoliths. Or you may need a cache mechanism to help you access your data faster. These solutions depend on your actual problems. The idea here is from 0 to 1, we can have 0.1, 0.2, 0.3, etc., you should choose the best way to solve the problem that you are facing and keep your architecture as simple as possible.
Adopting microservices wrong can let your team spend much effort on solving incorrect focuses during your business evolution. That’s not a good sign for your team and your business. So, choose architectural style wisely in different stages.
Thanks for reading Awesome Software Engineer! Subscribe for free to receive new posts and support my work.