Monoliths vs Microservices [System Design Sundays]
Which kind of architecture setup suits you best.
To learn more about the newsletter, check our detailed About Page + FAQs
To help me understand you better, please fill out this anonymous, 2-min survey. If you liked this post, make sure you hit the heart icon in this email.
Recommend this publication to Substack over here
Take the next step by subscribing here
What is the difference between monoliths and microservices,
And when it comes to designing your Systems, when do you go with a particular kind?
Let’s get right into it.
Key Highlights
What is a Monolith- Every software solution will have multiple components that are needed to make it work. In the monolith architecture, all the components will be built and maintained together. This means when you change one element, you’ll have to rebuild the whole code.
What are Microservices- In microservices, the different parts of your system are deployed and maintained independently. Generally speaking, different microservices are assigned to different teams, and the microservices themselves interact through API calls/network relays.
Advantages of Monoliths- In a word- simplicity. Despite the bad rep they get sometimes, monoliths are a clean and efficient way to handle smaller-scope projects. In very coupled applications, testing before deploying also becomes much easier since you will be able to see if your new changes break your application as you run the tests. Unintended changes to microservices by contrast are often only visible after deploying (especially if not designed properly), leading to your application breaking at run time.
Advantages of Microservices- Simply put, this kind of system allows for a lot of scalability and flexibility. Since every service will be decoupled, you can really fine-tune your resource allocation based on needs. It will also be much quicker to change and deploy (assuming this is done right). This video by IBM is a pretty good overview of the overall advantages of Microservices.
The verdict- Microservices are cool and will come with a boost to scalability. However, they can be much harder to set up and will require more careful planning. Monoliths are considered boring by a lot of people, but they are generally a safe pick. They are easier to design and will have lower overhead (different independent services sounds cool till you have to dig through a code-base written in multiple languages, frameworks, and style). But if you are working large teams, independent services, and a huge emphasis on scale, then microservices might be your jam.
For my visual learners, check out the following video. It covers the debate in a super engaging way. I also liked how Dave links his analysis to talking about how choosing a particular setup would change your interactions with version control. Adds another layer to think about. He also demonstrates one of the most common failures wrt setting up Microservices, which destroys the benefits of such an architecture in the first place.
If you want to read about the thoughts of Tech Leaders on this topic, check out the following post by Refactoring. It’s filled with comments and insights from various experts on the topic. I also really liked his ending analysis, where Luca showed how different team structures would benefit from different architecture choices.
Lastly, if you have any experiences with these, I’d love to hear them. You can reply to this email, leave a comment on Substack, or use my social media links to reach out.
I created Technology Made Simple using new techniques discovered through tutoring multiple people into top tech firms. The newsletter is designed to help you succeed, saving you from hours wasted on the Leetcode grind. I have a 100% satisfaction policy, so you can try it out at no risk to you. You can read the FAQs and find out more here. Scroll down till the end to get 20% off for up to a whole year.
If you have enjoyed this post so far, please make sure you like it (the little heart button in the email/post). I also have a special request for you.
***Special Request***
This newsletter has received a lot of love. If you haven’t already, I would really appreciate it if you could take 5 seconds to let Substack know that they should feature this publication on their pages. This will allow more people to see the newsletter.
There is a simple form in Substack that you can fill up for it. Here it is. Thank you.
https://docs.google.com/forms/d/e/1FAIpQLScs-yyToUvWUXIUuIfxz17dmZfzpNp5g7Gw7JUgzbFEhSxsvw/viewform
To get your Substack URL, follow the following steps-
Open - https://substack.com/
If you haven’t already, log in with your email.
In the top right corner, you will see your icon. Click on it. You will see the drop-down. Click on your name/profile. That will show you the link.
You will be redirected to your URL. Please put that in to the survey. Appreciate your help.
In the comments below, share what topic you want to focus on next. I’d be interested in learning and will cover them. To learn more about the newsletter, check our detailed About Page + FAQs
If you liked this post, make sure you fill out this survey. It’s anonymous and will take 2 minutes of your time. It will help me understand you better, allowing for better content.
https://forms.gle/XfTXSjnC8W2wR9qT9
I’ll see you living the dream.
Go kill all and Stay Woke,
Devansh <3
To make sure you get the most out of System Design Sundays, make sure you’re checking in the rest of the days as well. Leverage all the techniques I have discovered through my successful tutoring to easily succeed in your interviews and save your time and energy by joining the premium subscribers down below. Get a discount (for a whole year) using the button below
Reach out to me on:
Instagram: https://www.instagram.com/iseethings404/
Message me on Twitter: https://twitter.com/Machine01776819
My LinkedIn: https://www.linkedin.com/in/devansh-devansh-516004168/
My content:
Read my articles: https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Get a free stock on Robinhood. No risk to you, so not using the link is losing free money: https://join.robinhood.com/fnud75