CAP Theorem in System Design Interviews
Вставка
- Опубліковано 10 лют 2025
- Learn about CAP Theorem and how to use it in a System Design interview from the perspective of a Meta Staff Engineer and interviewer.
Excalidraw from video: link.excalidra...
System Design In a Hurry: www.hellointer...
Connect with me on LinkedIn:
/ evan-king-40072280
Preparing for your upcoming interviews and want to practice with top FAANG interviewers like Evan? Book a mock interview at:
www.hellointer...
Good luck with your upcoming interviews!
Hey everyone! Thanks for being part of our growing system design community 🙌
After countless requests for deeper content, we launched Hello Interview Premium hellointerview.com/premium/. We'll keep pumping out free videos and content on the site, but for those looking to go deeper, Premium comes with
✓ Deep dives into core technologies and concepts
✓ Guided Practice: Work through real interview problems with instant feedback
✓ Breakdowns of the most common system design questions
✓ Fresh insights from recent candidates' actual interviews including what questions they were asked.
We're constantly adding new content based on your feedback, so keep it coming!
hellointerview.com/premium/
This length is perfect to watch when grabbing lunch or dinner. The longer ones are better suited when you're at your study table so this new format fills the gap. Thanks for doing this.
100%
Appreciate the straight forward titles, thumbnails, and content.
no bs
You teach like a teacher who has been teaching for more than a decade, who understands what the student can understand and grasp. Great Job!!!
♥️
Shoot, I forgot to say the obligatory, "don't forget to like and subscribe!" Still a UA-cam n00b😉
Subscribe and don't forget to smash that bell icon 😅
@@sudosai😂😂
Are you kidding me, you are killing it out here more than seasoned professional in youtube, keep em coming it's worth watching your vidoes, be it short or long (most of the senior folks will prefer longer formats as you get into more nitty gritty) but please keep em coming.
A BIG YES TO PREMIUM CONTENT---- Awaiting :)
Not a youtube n00b at all, you're just better than the rest
we got you 😊
Thanks for getting this out! This is one of those topics where engineers think they know because they have memorized "pick two from CAP", but really don't understand.
Totally
Hello, I just love watching your videos. I am missing the learning from them since nothing new came up in your channel for so many days. Please dont keep us waiting. Your videos are diamonds for interview preparation and we would like to see HLD videos from you on many many more popular questions so that we can ace our interview by learning from you. Some HLD questions which I and my friends got asked in recent times but are still missing in your channel are:
1. WhatsApp
2. UA-cam
3. E-Commerce site with high contention for limited items
4. Instagram
WhatsApp is out now!
@@hello_interview already watched it! Please keep coming out with more and more videos esp the popular ones as I mentioned. You rock!
@@hello_interview already watched it! Please keep coming out with more and more videos esp the popular ones as I mentioned. You rock! We are already waiting for your next video to come out!! Please make it soon!
hands down the best system design interviews on UA-cam, keep up the good work guys
Thanks for covering this topic. The video wasnt too long. It balanced depth while also covering a wide range of practical scenarios which was great.
Glad you found it useful!
This is an awesome practical explanation of CAP Theorem..!
I am reviewing sys design interview materials, and this was an excellent refresher on how to apply CAP theorem to sys design interviews. I found examples on when to prefer consistency especially helpful.
Thank you!
I don't usually subscribe to channels. But this content made me break that rule
We won’t let you down 🫡
Thanks for making this video. Your delivery is calm and confident, making the content very easy to digest.
Love this kind of relatively short videos that clearly explain fundamental and important concepts with practical examples, especially those tailored for interviews.
Wanna say thank you for your videos and how helpful they've been. I had my L5 amazon system design interview the other day and I followed your guide. Interviewer was impressed with the level of detail and structured approach. Again, thanks a lot! Keep up the awesome work!
Love to hear that! Well done to you :)
Insane clarity with sufficient depth and detail. Love how you backed each one up with examples too
Glad you liked it!
this is not only useful for interview but for engineering knowledge as well. I'm consuming it even I'm not interviewing right away. we found the system design GOAT :)
This was great, what i liked the most is that these are concepts i kindof got from the other videos but having them packed in one video really made it click for me!
I just finished reading your blog on dynamo DB (like 10 mins ago) and just when I laid down and opened UA-cam to watch some videos before I sleep, there's a new video ahahah!.
I just finished watching it, and stopped it as soon as you said "don't watch it further if you're a junior/mid level engineer (mid level in my case"
Thank you for making such videos and topics. Tomorrow I'll read up Cassandra blog and the Food Delivery app System design(I forgott the same lol)
Thanks again and goodnight :))
Watcjiny your Videos is helping me understanding missing gaps to fill up for my interviewes and giving me a LOT of confidence.
Please don't stop🤞🏼🙏🏻
Perfect timing!
As always, your videos are great and these short videos are good to catch during a break. Thanks a lot for such amazing content!
Hi
The deep dive sessions are really amazing and precise.
Please keep the playlist going.
Thanks in advance!
Happy to see one last video before my interview tomorrow :)
having my one tomo as well, wish you luck!!!!!!!
Good luck to you both! Go crush it 💪
these videos are amazing! I really like a summarised one like this as an alternative option to the deep dives or the system design examples. Both are great to choose depending on the time we have each day :)
Great overview on CAP theorem. Straight forward and will definitely be helpful.
Very useful! Please continue making such informational content. Cheers!
Best explanation of CAP theorem 👍
Very nice. One of the best explanations I've met so far.
Right on!
Amazing format and content!!! Thank you! 🌟
Love your content! I find super helpful with my interview prep. Plz plz keep it going ❤❤❤
♥️
I really appreciate the clear and concise explanation. It's easy to understand..
🫶🏻
Firstly, I love every bit of your content! It is hands down the best free resource available on internet for System Design! And hence I am worried about your "Premium Content", my concern being, like everywhere else, eventually the good stuff will land on the Premium tab. [Not saying it isn't worth it though!]
Hoping you would stick to your thought:
"Moreover, it's 100% free forever. While we could charge for this material we think it's far more important to level the playing field of system design interviews."
Good luck anyway! Learnt a lot from you guys and hoping to continue doing so! Thanks!
Please did more into staff level topics too. It’s great learning. Thank you again.
Thank you! Your content is the best in class!
Glad you like it!
Thank you so much for uploading your content. It helps a lot! God Bless!
Great video. Could you release a short video like this discussing when to use SQL vs NoSQL database? I know most of your videos mention it doesn't really matter these days but some interviewers still ask me to discuss DB tradeoffs for SQL vs NoSQL. Thanks in advance!
Brother its very informational quality content that you put out there.
Format is good - nice to get small deep dives
Great video! As a newbie, I learned a lot from this
This is great thank you for putting it simply!
Very clear and crisp. Thank you 🙏
Great video!
Can you do a video on sharding and how to generally handle hot partitions?
perfect video! Thank you so much for CAP Theorem in System Design Interviews
Love your videos, very informative and insightful!
Can you please also share/link the Excali draw link in the video description for reference, thanks!
Oh yes of course! Thanks for the reminder, adding now. Also direct linking: link.excalidraw.com/l/56zGeHiLyKZ/8ntWRaa0Q6K
just having my system design interview tomorrow, thank you I think you are on time xD
You got this!!
Amazing as usual! I prefer long videos to go deeper in details if the use case needs it.
Those won't stop, don't worry :)
Thanks for design interview focused explanation. Like to see more such videos that explains concepts.
You got it!
Really loving all the content from hello interview. Would really love to donate to your patreon or something to support you guys 😊
Thanks so much!
If you'd like to support us, feel free to Purchase our Guided Practice. You'll get access to practice questions with personalized feedback as well as some additional questions and guides: www.hellointerview.com/practice
Great video, explains the concept with examples which helps in setting the context.
💙
thanks for going into this!
Hi Trisha 👋 pleasure :)
Great content , perfect format
Thank you, it was instructive, at least to me
Your videos are awesome as always!
🫡
Great format for quick revisions. Although, maybe you could include more depth on the CAP models to be used during the HLD videos. Eg. Like when in a HLD question we want the causal consitency model as the user expects ...
Great going.
Great summary!
Loved this!
Loving these meta no pun intended videos
i loled
Firstly, thanks a lot for the free ones. Would appreciate it if you could do one for a shopping system with limited time offers. That seems to be a very common interview question.
What is the complexity with the limited time offers? We have gopuff as a write up on our site which may be what you’re looking for
@@hello_interview The problem statement goes something like this - The limited time offers are available to only a limited (say first 1000) customers. Its broadcasted to all but after 1000 customers accept the offer, the offer is pulled.So, the challenge I see in this, is when the service is scaled to 2 or more pods, how would they maintain a shared count to correctly track the number of customers who accepted the offer.
Great format, thank you!
You bet!
Super useful!! Thanks!
This is great- thank you for simple but clear explanation.
Curiosity question: which whiteboard tool are you using to present in the videos? I found this format to make things really clear.
Top tier content
Amazing content !!
Thanks about great content, Would be grateful if you do a detailed comparison SQL vs NO SQL ?
Amazing video!
great video. makes perfect sense
Great video!
How did you get EXP in sys design? Like i would have never thought of having 'chunking' in an upload/storage system like drop box in a sys design.
A future video on your journey from jr -> staff & resources you used along the way would be golden.
As of now, i am still pondering what resources you used to gain vast experience. I myself use Alex Xu's sys design book and have read parts of designing data intensive application for system design. I feel like i am still lacking depth.
Appreciate it.
For this you should start reading engineering blogs/videos from all these companies, like you mentioned dropbox. here is a talk from 2012 ua-cam.com/video/PE4gwstWhmc/v-deo.html
No book can give you real world experience unless they have actually implemented it hence these engineering blogs are gold-mine, keep reading exploring and actually implementing all these concepts, consistent hashing, chunked uploads(don't use library at first go break it on your own and assemble in the server)
@@jain007neeraj gotchu, that's a great resource which I have never seen it get pointed out as much as sys design books. I will start there. I appreciate the help and shall start there. Thank you kind stranger
Amazing, quite informative.
🫶
great format!
Thank you so much for the awesome content! ❤❤❤Those deep dive concepts and real world examples are super helpful. #1 channel to recommend.💯💯💯
May I ask for Staff+ interviews, is the level of details & depth in your video above the hiring bar? or people should go even deeper?
Similarly for other topics that you have shared before like geographical search, leader election, file loading to blob... does Staff + interview require deeper details than your video?
Thanks
Staff+ is typically still evaluated at most companies as Staff. Many will have two system design interviews though. One general and one domain specific. In the domain specific more depth is certainly required, but it’s narrowly focused on that domain, whatever it is.
Nice explanation.
Hey love your content, wanted to know if the auction system design blog/ video is coming out
Hey, at the end of this video I teased a premium offering that will have more content (the free content will stay free and continue to grow!). Online auction is done and part of that premium offering launching end of this month along with other popular problems like google docs, job scheduler, strava, yelp, etc.
@@hello_interviewThis sounds super interesting. For content as good as yours we will be more than happy to pay. Thank you for making system design so interesting.
like your style, clean and concise! looking forward to the premium content.
hey evan plse make next system design video for google docs, quite tough design question, really interested on your way to design that system
We have Google docs written breakdown on the site, fyi! Worth checking out
it is awesome content
gold mine
Awesome!
Just learned that UA-cam comments have causal consistency only 😂
But not read your own write consistency.
Since it took me a good 30 seconds before I could see my own comment. However, when it appeared, it appeared in the correct chronological order 😂😂
🤣
Amazing
Thanks for the great content. I have a separate question. In case we want to create a system that wants 10,000 nodes to work together to do webcrawling with minimum network calls and no centralized manager like zookeeper. Do you think p2p connection with DHT managed by Kademlia or Chord algorithm will work. Also can you give couple of pointers on whether to choose kademlia or chord ?
Hey @hello_interview, thanks for the video, had a quick question around the Tinder matching being strongly consistent. Is that necessary ? If I get a match, it should be ok to see that information after a while, rather than seeing that information at the very next moment. Let me know if my understanding is wrong here.
when can we see the video for DynamoDB write up?
God! I wish you taught CS.
😛
AWS just announced DSQL with "multi-Region availability, [and] strong consistency". Is it giving up partition tolerance to achieve that?
So Partition Tolerance refers only to the network connection between servers? It has nothing to do with data partitioning like sharding in mongoDB, right ?
Can you make a system design video on the concepts o building a "recommendation engine "
Example : Lets say how UA-cam will display the videos depends on so any so metrics of the user's behavior, something like this .
There are plenty of usecases, so this is a prime usecase.
Can you plan it do something like this of if you already something, pls point that here.
what about payment service for an ecommerce service where a payment service interacts with Payment Service Provider and further to payment gateways. Can we say it employ different consistency levels for different parts of the system.For example, within internal payment service it should be strong read consistent or high value/critical transactional data might require strong consistency, while less critical data could have eventual consistency.?
@hello_interview can you pls respond to the above question
what do you think about PACELC theorem that extends the CAP theorem?
because if we read from slave that there is a chance it won't have strong consistency in the first place if it is async replication
My system consists of a single server which handles all of the application logic and runs an instance of chaos monkey
what software is used for canvas in the video?🙏
Excalidraw. Linked in description
Can't we achieve a strong consistency with Cassandra within a single partition? Speaking of Ticketmaster, if we partition by event, all reads/writes that demanding a strong consistency will end up on a single partition, it's it?
Kind of. It depends on your design. Cassandra does not support multi-table or multi-row atomic transactions. So, for example, if you wanted to update an "available tickets" column on the event table and add a ticket row, you need some workarounds, which would be easier served by just using an RDBMS.
This video was good but again it fails to cover what other videos/material fail at. What is the proof of CAP's theorem? Lets say if I sacrifice partition tolerance then I should be able to have consistency and availability as per this. But if there is partition tolerance then I ll loose on both consistency and availability. Now consider a single node database. There wont be any partition so it is partition tolerant. This means I should be able to be consistent and available. But if the node is down then I loose both consistency and availability. Its more like if I am not available then I cannot be consistent as I have one node. This goes against the theorem. I might be wrong here but I was expecting to clear my misunderstandings here.
CAP theorem is about distributed data stores and doesn’t make sense in the context of single node systems. If you sacrifice partition tolerance you’re guaranteeing a reliable network - should be straightforward to see why you can guarantee consistency and availability in this setting.
Great video. Perfect length. Wish I had known about these for my last two interviews 🥲. Very helpful though
You'll crush the next one!