01 Oct Moving to a Microservices Architecture
After reviewing the pros and cons of monolithic and microservices architectures in part one of this series, it’s time to talk about whether or not you should switch to a microservices architecture.
The first step is to ask yourself: “How does my monolith look now?” In other words:
- How much effort is required for adding new features?
- Is scaling your application a nightmare?
- Is it relatively easy for your developers to understand how the application works?
- How frequently are your delivers happening? Are you delivering at all?
- How much time does it take to deploy your application? Is it a matter of minutes or hours?
If you are comfortable with the answers to these questions, you probably don’t need to switch to microservices. If your monolithic is working well, stick to it, and avoid falling into “tech consumerism.”
But, if any of the previous questions are causing you to have second thoughts, perhaps you should consider microservices. Take your time, do the math, and discuss it with your team—don’t rush into making this decision!
Porting a Monolithic Application to Microservices
If you’ve made the decision to switch, you will face one of the hardest stages in adopting a microservices architecture. You’ll need to answer the following questions: How can I split my monolithic into several services, and how many services do I need? Conway’s Law says that you should consider your business’s communication capabilities and make the split based on that, so that your design reflects the communication structure of your company.
While this may be true, if you have a monolithic application in place, it would be better to do the split incrementally. For instance, start by splitting your application into two services. Split your team as well, and update your CI/CD pipelines. Once it works, and you see the benefits of microservices on a small scale, split again, and keep doing so until you feel you are not overcomplicating your architecture.
Implementing an Application from Scratch with Microservices
If you are starting a new project and have already decided to go with a microservices architecture (although sometimes it’s better to start with monolithic), then the same advice applies. Look for your company’s communication structure and try to design your services based on that. Again, start small, and add more services once you notice the benefits.
There are several successful implementations of microservices that have been documented. Here are a few:
You can find many more examples here.
Part 3 of this blog series is coming soon, so stay tuned!
Click here to go back to Part 1 of this series.