Monolithic vs Microservice Architecture: Which To Use and When?

  Переглядів 53,617

Alex Hyett

Alex Hyett

День тому

When it comes to software architecture, there are generally 2 main types, monoliths, and microservices. In this video, I cover the differences between each of them and discuss which ones you should be using for your next project.
With microservices, you need to have a good understanding of cloud-based platforms. AWS is used by a lot of companies, and you can earn more if you have a certification such as AWS Certified Solutions Architect. Zero To Mastery covers everything you need to learn in one of their courses (use FRIENDS10 for 10% off) academy.zerotomastery.io/a/af...
☕️ I don’t accept paid sponsorships and I have turned off mid-video ads. You’re welcome! If you would like to support my channel see: ko-fi.com/alexhyett
📨 Join my free weekly newsletter for advice, technology and more: newsletter.alexhyett.com
🗺️ Backend Developer Roadmap: www.alexhyett.com/backend-dev...
📝 Related blog post: www.alexhyett.com/monolithic-...
🎓 RECOMMENDED COURSES (Use code FRIENDS10 for 10% off)
The Complete Web Developer Course - academy.zerotomastery.io/a/af...
The Complete Junior to Senior Web Developer Roadmap - academy.zerotomastery.io/a/af...
Complete SQL + Databases Bootcamp - academy.zerotomastery.io/a/af...
📚 RECOMMENDED BOOKS
Clean Code - geni.us/5AEwj2
Domain Driven Design - geni.us/WiR0Q0x
Design Patterns - geni.us/5ncUt
Developer Hegemony - geni.us/lAXy
Pragmatic Programmer - geni.us/GfNj9
Data Structures and Algorithms Made Easy - geni.us/sqg6kJ
Refactoring - geni.us/ufAP0mE
Pragmatic Thinking and Learning - geni.us/x81A
Microservices - geni.us/8vMA
🚀 MY FAVOURITE TOOLS
PIA VPN - piavpn.com/AlexHyett (83% off)
Visual Studio Code - code.visualstudio.com/
Obsidian - obsidian.md/
Notion - affiliate.notion.so/alexhyett
⏳ TIMESTAMPS
00:00 - Introduction
00:16 - What is a Monolith?
00:53 - Advantages of Monoliths
02:09 - Disadvantages of Monoliths
03:36 - Microservices
04:13 - Microservice Communication
05:29 - Advantages of Microservices
07:46 - Disadvantages of Microservices
09:17 - Which should you use?
You can check out more of my favourite tools on my website:
www.alexhyett.com/tech/
🔗 MY KEY LINKS
🌍 Blog - www.alexhyett.com/
🐘 Mastodon - social.alexhyett.com/@alex
🧑‍💻WHO AM I
I'm Alex, a Software Developer and UKposts working in the UK. I make videos about software development to help developers with the skills they need to be senior developers. As well as this UKposts Channel, I also write articles on my website (alexhyett.com) as well as write a regular newsletter that contains some thoughts to help aspiring developers.
‼️ DISCLAIMERS
Some of the links in this description are affiliate links, for which I get a small commission, at no extra cost to you 🙂. I appreciate you supporting my channel so I can continue providing you with free software development content!
#coding #programming #developer

КОМЕНТАРІ: 72
@olter1000
@olter1000 28 днів тому
Thank you very much. You stopped me from overengineering and solving problems which doesn't exist for now in my startup.
@thabangmotaung9637
@thabangmotaung9637 8 місяців тому
The structure of your content delivery makes it easy for me to understand these concepts in a snap.
@alexhyettdev
@alexhyettdev 8 місяців тому
That's awesome, I am glad to hear it!
@yourownazog8069
@yourownazog8069 7 днів тому
amazing content and the level of my production. Thanks for what your doing
@Nicetrycutiepie
@Nicetrycutiepie 14 днів тому
great in detail explanation. thank you so much Alex.
@puliranjit
@puliranjit 10 місяців тому
Love your learning videos ..well-structured , short and to the point
@alexhyettdev
@alexhyettdev 10 місяців тому
Thank you! I am glad you like them!
@geybriyel2416
@geybriyel2416 16 днів тому
this is very clear. thank you
@Ramin_Esfandiari
@Ramin_Esfandiari 8 місяців тому
Very well done and concise video. Thank you.
@alexhyettdev
@alexhyettdev 8 місяців тому
Thank you 🙏
@vijayas8007
@vijayas8007 4 місяці тому
Wow Alex very well explained .. I went through many videos finally i got the difference as I come back from a break in my IT career. Thanks looking forward for more of such. Do you have anything on API manager
@halooshka1904
@halooshka1904 7 місяців тому
love the explanation! Very easy to understand :) Thank you
@alexhyettdev
@alexhyettdev 7 місяців тому
I am glad you liked it! Thanks for commenting.
@rmanjit
@rmanjit 10 місяців тому
Great work !! This is high quality content !!
@alexhyettdev
@alexhyettdev 10 місяців тому
Thank you!
@yankluf
@yankluf 7 місяців тому
Sooo clear!! Thanks a lot! 😁
@alexhyettdev
@alexhyettdev 7 місяців тому
You're welcome 😊
@abelmillion4341
@abelmillion4341 8 місяців тому
Good Job man, am grateful for your videos
@alexhyettdev
@alexhyettdev 8 місяців тому
Thank you! I am glad they are useful for you.
@user-se8hw9kn3m
@user-se8hw9kn3m 7 місяців тому
this is such a gold content. Thank you so much Alex
@alexhyettdev
@alexhyettdev 7 місяців тому
You're welcome, thank you for commenting!
@muhammadwaqasiqbal8243
@muhammadwaqasiqbal8243 4 місяці тому
Hi there Alex, Lovely video and It has cleared a lot of misconceptions regarding both architectures, I have a question however, Is there any metric value or any parameters defined based on which we could choose one or the other? I would really appreciate your take on this. Thanks
@fahadaslamtanoli
@fahadaslamtanoli 5 місяців тому
very good explanation can you explain when to use service endpoint or service bus
@edvwe
@edvwe Рік тому
Very informational, thanks
@alexhyettdev
@alexhyettdev Рік тому
Thanks Marcin, I am glad you liked it!
@xiiEJRAM
@xiiEJRAM 11 місяців тому
Your videos quality and the content you made are epic , I really love your channel 👌🏻
@alexhyettdev
@alexhyettdev 11 місяців тому
Thank you very much!
@franciscodevia7446
@franciscodevia7446 11 місяців тому
Ñ😊ñññ😊ññññ😊ññññññ😊😊😊😊
@franciscodevia7446
@franciscodevia7446 11 місяців тому
00pp0p00pppp0pp0ppppp0ppppp0pp0ppppppppppppppp0ppppppp
@MaximePoulain
@MaximePoulain 9 місяців тому
A topic that could be interesting to delve further into is the Modular Monolith. In contrast to microservices where the boundary is just physical, modules in a monolith are logically isolated from each other. This brings benefits like faster deployment and helps avoid issues of creating 'spaghetti code' that could cause problems for others. However, designing a modular monolith can be challenging, as it requires expertise in the design of your domain and the identification of its sub-domains (bounded context in DDD terminology) but also with the communication when an operation span accross multiple modules. Overall, I believe this approach combines the pros and cons of both monolith and microservices architectures effectively for many use cases.
@hyper_channel
@hyper_channel 8 місяців тому
This right here is my go to. A monolith where the different services / features can be extracted as a microservice if needed, (usually those hurting for resources / performance). Microservices just have too much overhead and moving parts to make sense as the starting point without a very good reason.
@cflowlastname548
@cflowlastname548 5 місяців тому
Before the Microservice hype, these system were just called modular systems. I actually wrote one myself based on my own intuition and experience. It was not until a couple of years later when I saw the word "Modular monoliths" in my youtube feeds I realized there was an exact word for what I had done.
@resistance_tn
@resistance_tn 10 місяців тому
This is high quality work thank you ! Would love to see more advanced topics on networks or protocols or anything related to backed ! Keep up the great work :)
@alexhyettdev
@alexhyettdev 10 місяців тому
Thank you! Yes I will be definitely be covering more backend topics.
@imanshirkhodaee1704
@imanshirkhodaee1704 6 місяців тому
This is a very helpful content. thanks a lot.
@alexhyettdev
@alexhyettdev 6 місяців тому
You're very welcome!
@sosyalant
@sosyalant 10 місяців тому
you deserve more subs. Fantastic job
@alexhyettdev
@alexhyettdev 10 місяців тому
Thank you! Hopefully one day!
@korniszon68
@korniszon68 8 місяців тому
Wow, can't belive you have that little views. It's very nice told, all the pros and cons. You really know this stuff well. I always ask this question on the interviews and it appears that it's not that clear to most of devs :(
@alexhyettdev
@alexhyettdev 8 місяців тому
Thank you! Yes unfortunately useful videos on software development don't always get as many views as other topics. Maybe I should do a series on topics to learn before going for an interview!
@joeddo
@joeddo 2 місяці тому
great video. ty
@ITSolutions-bl3dp
@ITSolutions-bl3dp 29 днів тому
Thanks ❤sir
@amitev
@amitev 11 місяців тому
Great content and great video quality! What microphone are you using?
@alexhyettdev
@alexhyettdev 11 місяців тому
Thank you, I am using a Blue Yeti X. I have had the same microphone for all of my videos but the sound quality wasn't as good to start with. The key is to have the microphone as close as possible and to make sure you have lots of soft furnishings in your room to absorb any echos. I now have curtains, cushions, a rug and a fluffy blanket to absorb the sound. Video wise I am just using my iPhone XR with the OBS Camera app. My earlier videos used a Logitech Brio 4K but the colours were always a bit off.
@amitev
@amitev 11 місяців тому
@@alexhyettdev thank you very much for the comprehensive answer! Ideas for next videos - how to manage complexity; how to manage work/technical debt in a huge legacy code base, hope to cope with toxic cowerks/arrogant seniors.
@alexhyettdev
@alexhyettdev 11 місяців тому
Thanks for the ideas, I will add them to my backlog!
@Venkatesh-vm4ll
@Venkatesh-vm4ll 6 місяців тому
Really thank you for the word , start business with monolithic, i am confused in that
@alexhyettdev
@alexhyettdev 6 місяців тому
Microservices are usually a bit overkill if you are starting out with a new application with no traffic. In these cases one big application (monolith) is usually better until you have scaling problems and need to split it up.
@vktop2
@vktop2 Рік тому
Nice video, I have a question, for example in a system I have a microservice customer and this service will have in its database a table with the types of customer document, in this system could also exist a microservice user and could also have in its database a table type of user document, in this case how to work these data that concern several microservices since the types of documents are common between both entities; should I create 2 tables document type 1 in each microservice? Thank you
@alexhyettdev
@alexhyettdev Рік тому
Microservices should always have their own database. If you have data that is common between them, then you can have copies of the same data in each database. Not ideal, but it is quite common practice. Each domain only stores the data they are interested in. One option for you would be to have a document microservice that all the other microservices use for file storage. This is particular useful when you have strict requirements such as encryption or access restrictions that you need to adhere to. It can all be done in one place without needing the same logic in every microservice that needs to store documents.
@joan.paucar
@joan.paucar Місяць тому
What do you think about tools like TurboRepo ? I mean, we can use that tool for our apps minimizing the disadvantages of monoliths ?
@faizanahmed9304
@faizanahmed9304 Рік тому
amazing video
@alexhyettdev
@alexhyettdev Рік тому
Thanks I am glad you though so!
@elifantshoos708
@elifantshoos708 Місяць тому
Dying. The stock footage of code magically getting manifested on the scenes as the person is waving around their finger. LOL
@aminzuar5767
@aminzuar5767 Рік тому
Thank uuuuu 🙏🙏🙏
@alexhyettdev
@alexhyettdev Рік тому
You’re welcome, I am glad it was helpful.
@anjanigente4538
@anjanigente4538 3 місяці тому
can one microservice depend on the other? and also is it necessary to have separate database for each microservice?
@david2am
@david2am 5 місяців тому
thanks!
@alexhyettdev
@alexhyettdev 5 місяців тому
You’re welcome!
@vishalkarthik.v7209
@vishalkarthik.v7209 5 місяців тому
Hello Mr.Alex if there are multiple application and we use monolith then should we use one single piece of code or respective codes for respective application Thank you !
@alexhyettdev
@alexhyettdev 5 місяців тому
Generally with monoliths we are talking about one single application but in some cases you can have smaller supporting applications that go with it. I prefer to do one git repository per application but in the case of microservices that are closely related it can be easier to just have a mono repo.
@mumasmusic
@mumasmusic 7 місяців тому
Great work! One small suggestion tho. The constant bg music is quite distracting.
@alexhyettdev
@alexhyettdev 7 місяців тому
Sorry about that. I have turned it down a lot in my newer videos. I would get rid of it completely, but it seems to improve retention.
@marcocoratella1556
@marcocoratella1556 Місяць тому
In fact the handsome developers, that want absolutely to show how handsome they are, they say that microservices is amazing. But indeed you need to be pragmatic and really understand what means working as a software developer sometimes first of all
@kasparsr
@kasparsr 3 місяці тому
modular modulyth
@BenRangel
@BenRangel Місяць тому
The distinction is too blunt for my taste: i view microservices as one team separating their work into more than one service despite not really having to. And monoliths being a big service used by multiple teams. But most use something in between: pretty much one service per team
@xConundrumx
@xConundrumx 7 місяців тому
I almost could not disagree more on these advantages you claim Monoliths have. Mostly because in reality nothing ever remains even remotely small enough for those advantages still hold up. Every single 'monolith' I have worked on in my 30 years turned out to be a massive app before it got to production. And that was with all the trimmings of those times. And you always, ALWAYS en up with a mess when multiple people have to work on it. Just my 2 cents.
@alexhyettdev
@alexhyettdev 7 місяців тому
It really does depend on the scope of the application. If you have a team of 8 working on big enterprise application that you know is going to end up quite large then just start with microservices or at least mini monoliths. If you are building your own startup with just 1 or 2 developers, and you are not building into an existing architecture then a monolith will always be quicker. It is a case of not solving for problems you are not even sure you will have.
@kimberlyjacobsen4148
@kimberlyjacobsen4148 5 місяців тому
No changes to Email service ? ? After changes to Azure and Outlook we now need To use 2-factor Auth.. thus Breaking the SMTP login. Add new Endpoints for MS and a Gui so we can authorize the Token. blah blah Point .. NO microservice is Imune to changes
@alexhyettdev
@alexhyettdev 5 місяців тому
Very true. You would hope something as simple as email would be immune but very much depends on the provider. I have a few very simple Lambda functions that haven't touched in 2 years, however I am now forced to update them as the version of node they are running on will not be support soon.
@jonny.rubber
@jonny.rubber 2 місяці тому
I feel the ping is unaccairy
@giorgikhachidze64
@giorgikhachidze64 10 днів тому
Service mesh wasn't explained clearly at all. Too vague.
Microservices explained - the What, Why and How?
18:30
TechWorld with Nana
Переглядів 774 тис.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Переглядів 138 тис.
Кровосток - разговор с легендами / вДудь
2:12:57
Гражданская оборона 2024 - 16 полный выпуск
1:04:15
Телеканал ICTV
Переглядів 1,1 млн
Frontend vs Backend Software Development - Which should you learn?
14:03
Domain Driven Design: What You Need To Know
8:42
Alex Hyett
Переглядів 82 тис.
Stack vs Heap Memory - Simple Explanation
5:28
Alex Hyett
Переглядів 170 тис.
Monolith vs Microservices vs Serverless
23:05
Code With Ryan
Переглядів 73 тис.
Event-Driven Architecture: Explained in 7 Minutes!
7:18
Alex Hyett
Переглядів 69 тис.
Hexagonal Architecture: What You Need To Know - Simple Explanation
8:16
The Problem With Microservices
17:47
Continuous Delivery
Переглядів 426 тис.
Photo Changing Replace And Edit Backgrounds 65mn With These 10 Tips
0:53
Irfan AN Tech
Переглядів 260 тис.
Как должен стоять ПК?
1:00
CompShop Shorts
Переглядів 614 тис.
Phone sees the future ! 📲🫣👽
0:38
BOGDANCHIKI
Переглядів 11 млн
Changing Replace And Edit Backgrounds New Tech || Photo Eedit NEW3X
0:50
Почему сканер ставят так не удобно?
0:47
Не шарю!
Переглядів 674 тис.