The term “Microservice” always has been a buzzword in tech. Everyone loves to use this term but very few understand it. Before jumping on microservice bandwagon, You should ask, if you really need the tech stack to have multiple services running around?
I am not going to explain what are microservices here, Google is your best friend for it. This post is more about whether you really need microservices or not.
When we started version 1 of MyGlamm, we had a single service serving whole platform. We had 3-4 smaller services for discount, vouchers etc.. It worked very well for about 2-2.5 years. Then the team grew, we could not afford to keep everything in one core and it was actually becoming a mess as well.
At that time, my thought process was very simple, when the orginazation is small, a single person can wear many hats; CEO, CMO, CTO, HR Head etc.. but as organization grows, you need people to fill those roles so you can focus on your core tasks and they can focus on their tasks. This is a must to build any well oiled machine.
Exactly same thought process was behind moving to smaller services. Ease of work, division of responsibilities and focus.
So, my personal suggestion would be, not to move to Microservice architecture from Version 1. Let the code and business get matured, you will have better understanding from both the sides and then you can start making decisions on organizing the tech stack. Initial couple of years will have many changes or hacks made in the code to accommodate business requirements as at that point, business goes through lot of rapid changes.
Here are few things which you must consider while planning your architecture:
- Orchestration plays major role. You must plan how will your services talk to each other and what happens when one of the services stops responding. You will get basic idea about this here
- Overengineering is dangerous. So be very careful whole planning, you should not have too many or too few services. At MyGlamm we have about 50 services, this is after taking out few unnecessary services but I still feel, it needs a haircut. Let’s see.
- Tracing & Monitoring. These 2 are most important parts when you plan services based architecture. It’s going to be a huge huge mess if you do not have any way to trace the errors and build relation between multiple services.
That’s it for now. I will cover monitoring and tracing part mostly in next post.
Suggestions, always welcome.
Photo by Christopher Gower on Unsplash