Google Systems Design Interview With An Ex-Googler

  Рет қаралды 759,357

Clément Mihailescu

Clément Mihailescu

Күн бұрын

This is what a systems design interview at Google, Facebook, Amazon, or any other big tech company looks like. Systems design interview questions are vague and challenging, but this video should give you a clear idea of what to expect. If you want to ace the systems design interview, check out SystemsExpert at www.systemsexpert.io
SystemsExpert: www.systemsexpert.io
AlgoExpert: www.algoexpert.io/clem
My LinkedIn: / clementmihailescu
My Twitter: / clemmihai
Prepping for coding interviews? Practice with 85 video explanations of popular interview questions and a full-fledged coding workspace on AlgoExpert: www.algoexpert.io (use "clem" promo code for a discount!)

Пікірлер: 867
@clem
@clem 4 жыл бұрын
I hope you all find this mock systems design interview insightful! And if you're in the business of acing your systems design interviews (who isn't? 😎), be sure to check out www.systemsexpert.io where we have more questions like this one as well as a full course on all of the fundamental systems design topics that you need to understand to tackle these types of interviews.
@ajourney179
@ajourney179 4 жыл бұрын
who is the guy taking interview? where he works ?
@Andrew-ez9ft
@Andrew-ez9ft 4 жыл бұрын
Clement, I have some questions. What is the fastest way to become a junior developer in 2020??? What is the best way to learn programming to build advanced projects???
@KeyrptNetwork
@KeyrptNetwork 4 жыл бұрын
it will be very useful to make another Systems Design Interview?
@VishalSingh-kc1jn
@VishalSingh-kc1jn 4 жыл бұрын
Dude grow some beard. Would look good🔥
@techwithwhiteboard3483
@techwithwhiteboard3483 4 жыл бұрын
make sure you buy other domains with the same name 🤔✌
@zss123456789
@zss123456789 4 жыл бұрын
This is VERY helpful. This is literally better than any video that just tells you general tips that are hard to follow in an interview setting.
@jlove1296
@jlove1296 2 жыл бұрын
I used to have zero understanding of the importance of clarifying requirements and used to ask typical dimension clarifying question without knowing how that could actually help me solving the problem at hand. You really showed how you could incorporate the information you gained by asking clarifying questions through this mock interview - appreciate it
@khoavo5758
@khoavo5758 3 жыл бұрын
"Ex-Googler" means that you now use Bing or what? /s
@444haluk
@444haluk 3 жыл бұрын
hahahahh underrated joke
@DarkH4X0
@DarkH4X0 3 жыл бұрын
Yep, now he uses Bing to see StackOverflow answers
@atharvparlikar8765
@atharvparlikar8765 3 жыл бұрын
maybe duckduckgo
@amazingvipul8392
@amazingvipul8392 3 жыл бұрын
He still uses KZbin though 🙂
@carlhsieh2615
@carlhsieh2615 3 жыл бұрын
It means he's not evil anymore lol
@charliel.5794
@charliel.5794 4 жыл бұрын
I'd like to hear the feedback from the interviewer, I think that's the important part on distinguishing what went well and what didn't
@bluespeckcf5949
@bluespeckcf5949 4 жыл бұрын
The feedback is probably that he's missed a lot of corner cases (interviewer mentions at least 2 of them in the video), and I don't know why he's not using a messaging queue instead. In short, this is probably a weak interview.
@vishnuv4813
@vishnuv4813 4 жыл бұрын
Normally, the interviewers not sure about the solution themselves or they would have a template solutions which they feel that would fit every problem. So, they would not be able to comment on our design.
@gavindmello
@gavindmello 4 жыл бұрын
@@bluespeckcf5949 I thought he could have used a message queue too, but, it wouldn't allow monitoring workers which have gone awol.
@cloud5887
@cloud5887 4 жыл бұрын
@@bluespeckcf5949 can you elaborate a bit more? What exact corner cases did he miss?
@SpencerYork1534
@SpencerYork1534 4 жыл бұрын
@@cloud5887 For Example, one that I caught, was the worker heartbeat, what if the job is successfully completed but didn't send a heartbeat due to a network error, you wouldn't want to run the build again. Another is he never mentioned storage for the build artifacts, and how to resume a build from the artifacts, or use them, if you are building a build system, you definitely need to cover some sort of distributed storage for build artifacts, if you are building 100k times a day you don't want to have to download JS, or .NET, 100k times, even if you are pulling from your own repository you want to eliminate as much bandwidth usage as possible. BUT overall this is a good interview, maybe not perfect, but that is typical for most interviews, I think it was more important to show how he interacted with the interviewer, asking questions, clarifying requirements. Most companies want to see how well you handle overall project communication so as to best deliver according to the stated requirements.
@lasophistique3513
@lasophistique3513 3 жыл бұрын
What I loved most is, it actually went on like a real interview, where candidate doesn't know all the answers, and kept building on the assumptions, kept extending the designs. Thank you for making it look realistic!
@nishantt6419
@nishantt6419 4 жыл бұрын
wow...simply amazing.....this is like a real world experience for the system design interviews most of the videos on youtube are just about explaining the system design about some popular applications like messenger, tinyurl, dropbox etc... all of them have one thing in common....all of them explain the design very well in only one aspect....they are all well structured, there are no hiccups, there is not much thinking to do.....they design the system without any flaws...why? because they know the design and there is no interviewer who is asking for in depth details or looking for more clarifying answers...they just explain the system in only one direction This is totally different and the one which we actually need. This is by far the best for multiple reasons 1. It shows how a real world interview looks like with all the white boarding sessions 2. the question given by the interviewer is very abstract....the interviewee may know the design in one particular aspect, but the interviewer is looking for some different aspect and asking more in depth details at every stage 3. the interviewee actually asks a series of questions at the start and also keep asking different questions time to time 4. at times the interviewer stops the interviewee because he missed explaining few details and missed details about fault tolerance and keeps asking for more in depth details about how the interviewee is approaching his design 5. its more of a collaborative brainstorming which actually happens in real world 6. it also showed how the interviewee picked some technologies like SQL, GCS, KVS etc and validated it with his explanation, getting approval of the interviewer and proceeding to the next stage at every point in the interview. Totally worth watching the whole video.....thank you Clement and kudos for creating such a valuable content hope to see more such videos
@elliemay1748
@elliemay1748 4 жыл бұрын
Yeah this is exactly how this goes in real interviews. When I interviewed at Amazon for engineering manager, I was asked to write an analytics system with 1 million writes per second. It was a bit more challenging than this example in terms of scale, but still similar in concept.
@samehghanmi4487
@samehghanmi4487 4 жыл бұрын
Thank you Clément for the great video. I learned so much about System Design in less than an hour. Keep it up!
@charan775
@charan775 4 жыл бұрын
Every time clement was the interviewer but now for a change clement is the interviewee.
@clem
@clem 4 жыл бұрын
Gotta flex my owns skills _sometimes_ ! 😎
@kevinsheng8775
@kevinsheng8775 4 жыл бұрын
Lol clement does sound like a interviewee
@kevinsheng8775
@kevinsheng8775 4 жыл бұрын
It seems like the interviewer is getting educated from clement lol
@yunjiehong4649
@yunjiehong4649 4 жыл бұрын
Chinglin Sheng An interviewer has no motivation to speak a lot, while an interviewee needs to think loud
@ramkrishnakulkarni8289
@ramkrishnakulkarni8289 4 жыл бұрын
Clement you nailed it man. Fabulously awesome content. I’ve learned a lot from this. Please make more videos like this. 👏👏👏
@ashrafkotbofficial
@ashrafkotbofficial 3 жыл бұрын
This is really beneficial, thank you for taking the time to go through a full mock interview.
@jeffhsipepi
@jeffhsipepi 3 жыл бұрын
Thanks Clément! What I really enjoyed about this video is that someone non-technical like myself, can still gain valuable insight/understanding into how to tackle these tricky system design questions. Great video!
@AshutoshAnandashu
@AshutoshAnandashu 4 жыл бұрын
This was so good. Thank you @Clement for giving us an insight on what goes on in a real system design interview. Kudos to the interviewer as well. He asked brilliant questions and put up some interesting extra questions to make it difficult yet understandable. Subscribed ✅
@ankitGrover-LTD
@ankitGrover-LTD 4 жыл бұрын
Kudos to you Clement and team. This is one of the best interviews I have seen in a long time. Thanks for sharing!
@kkkarki6880
@kkkarki6880 4 жыл бұрын
Clement, I really like the way how questioned to dissect every aspect of the question, to collect as much as information which is a super motivating tool for all developers.
@aritraroy4220
@aritraroy4220 4 жыл бұрын
Your help and free content is appreciated, and I am rooting for the success your entire business. There is nothing brighter than an honest and smart effort. Keep shining.
@ShubhamSingh-ku2ow
@ShubhamSingh-ku2ow 3 жыл бұрын
Such an AMAZING video Clement. Before this video, I went through few others but this one literally beated them all. The quality of the questions asked and the way you responded gave a Google feel. Thanks ALOT for bringing such high quality content. Absolutely terrific.
@animalrocket4809
@animalrocket4809 2 жыл бұрын
This was really good. I often paused the video to offer my 2 cents and thought out loud. Really liked the collaboration between Clement and the interviewer. Also, one subtle thing is Clement’s frightlessness in asking even the most simple questions and repeating things in his own words. This is what allowed him to really build and understanding of the problem, as the interviewer’s words may not click the first time and they are meant to be ambiguous so it fosters clarifying questions. His interviewing skills really showed off here. So much to learn!
@eduardolucas9896
@eduardolucas9896 4 жыл бұрын
Very good content as usual. I'm doing all mock interviews available in SystemsExpert and I'm very impressed by how much effort you put on this.
@Nyquiiist
@Nyquiiist 4 жыл бұрын
I am so inspired and motivated by your videos Clement. Gonna dive into AlgoExpert starting tomorrow, super excited!
@waynegreen7970
@waynegreen7970 4 жыл бұрын
Thanks for the great content. Even if someone doesn't get a job at a FAANG company, it will help them become a better programmer. Your courses are definitely a step up from the vague books, tutorials, and blogs that were available sparingly just a few short years ago. While some of those resources were adequate for people who learn well from books, the videos help those who are visual learners by actually seeing the diagrams, and hearing what to say, how to say it, and what questions to ask. Thanks for providing this service.
@akkshayganesh1136
@akkshayganesh1136 4 жыл бұрын
Brilliant setup. Great cross questioning and really makes the viewer think. Good going Clement!
@Adam-ro2zv
@Adam-ro2zv 3 жыл бұрын
Hi Clement you're really doing great works for people, I like the way you shares these insightful contents.
@thefunkyhermit
@thefunkyhermit 2 жыл бұрын
Great video Clement. Thank you for sharing an insight into how these interviews are conducted. 2 things I would have prodded more for as the interviewer are: 1) How do you deal with downtime while switching between the versions? 2) How do you manage DB changes as well as the code changes discussed here.
@kalmurza
@kalmurza 4 жыл бұрын
Great video. I totally recommend pausing the video after each feedback from interviewer and try to continue the design based on his comments. And great job, Clement. You basically recaptured Gitlab CI’s structure :)
@crankerson
@crankerson 3 жыл бұрын
The SQL transaction would ensure that all of the SQL statements would run together or not at all (rollback), but it doesn't ensure atomicity. In this design, to prevent multiple workers from running the same job concurrently, wouldn't you need to specify the isolation level on the transaction in order to prevent a non-repeatable read? Example: worker 1 selects the oldest "queued" job. worker 2 selects the oldest "queued" job. worker 1 updates the job status to "running".
@chimpu92
@chimpu92 4 жыл бұрын
Thank you so much for this mock interview. This is one of the best video about system-design interview for starters to learn on what to expect in a design interview and how to respond to make the interview a success....
@l_karuhanga
@l_karuhanga 4 жыл бұрын
No one: Clément: Thinking back to my experience with code deployment systems.
@ascientistanengineer8038
@ascientistanengineer8038 3 жыл бұрын
I will leverage that :D
@zeno_aratus
@zeno_aratus 3 жыл бұрын
I've always found estimating workload to be a challenging part of design, especially when you do not have as much information as you'd like to go on. So in one instance I have gone for determining the nightmare scenario and developing system specs based on that.
@saadakhtar2000
@saadakhtar2000 4 жыл бұрын
You're great. Keep creating quality contents for us !
@clem
@clem 4 жыл бұрын
I'll do my best!
@guiyuxu4084
@guiyuxu4084 2 жыл бұрын
Going for multiple onsite interview all with system design interview, this is the most helpful material I have seen so far
@pushpendrahirwani9105
@pushpendrahirwani9105 3 жыл бұрын
I really like this simulated version of the system design interview. I do have more clarity now on what I should be emphasizing on more in terms of approaching the problem statement. Thanks Clement.
@josephwong2832
@josephwong2832 4 жыл бұрын
Thanks a lot Clem, we need more mock SD interviews just like this for different size companies and different apps
@konstantinrebrov675
@konstantinrebrov675 4 жыл бұрын
Thank you Clement. You are producing many high quality videos with useful information for software engineers. I always learn something interesting. Hats off to you.
@gelosagustin5872
@gelosagustin5872 4 жыл бұрын
It's a great interview, looking foward more videos like this!!
@dudukiwi
@dudukiwi 3 жыл бұрын
This is really awesome. This video is an eye-opener. Now I consider the system design question is not just a question, but it is a real task in the company. And the interviewers already know what they want, but they don't speak for themself. So an interviewee should find out what they want using additional questions like real life!
@shellysclan1901
@shellysclan1901 4 жыл бұрын
Hi Clement! Thank you for your effort.
@clem
@clem 4 жыл бұрын
Hi Shelly's Clan! You're very welcome.
@hugovargas8737
@hugovargas8737 4 жыл бұрын
I really like this approach in your videos! Thank you for your effort
@iorekby
@iorekby 4 жыл бұрын
Great to see this sort of thing. So many people trying to get in to tech are obsessed just with software engineering. There's a whole gamut of careers and skill sets in tech, and hopefully this will open people's eyes to the opportunities aside from software engineering (nothing wrong with software engineering, btw).
@danielrocks234
@danielrocks234 2 жыл бұрын
This is the kind of interview *is* for software engineering. This is what senior SWEs at major tech companies go through in the interview process.
@BiancaAguglia
@BiancaAguglia 4 жыл бұрын
This was very useful. Not only did it help me get a better understanding of systems design from a software development perspective, it also gave me some ideas for better designing data science specific projects. Thanks to both of you. Keep up the great work. 😊
@stepanseliuk8042
@stepanseliuk8042 4 жыл бұрын
I can recommend “grokking the system design interview” on educative.io and github.com/donnemartin/system-design-primer#index-of-system-design-topics
@PoulJulle-wb9iu
@PoulJulle-wb9iu 4 жыл бұрын
@@stepanseliuk8042 bra
@edreesosman3415
@edreesosman3415 4 жыл бұрын
I've seen some of your videos before, but this one got me to subscribe. This truly felt like a real interview and I can't wait to see more. Keep up the great work! Maybe you and Antoine (I hope I'm spelling his name correctly) can switch roles for the next one?
@suboii2978
@suboii2978 3 жыл бұрын
First of all, thanks for making these available Clem. I seen a lot of videos about the systems design interview in preparation for my interviews and I'm a SystemsExpert customer, but I'm wondering if you could explain the difference between a novice , intermediate, and expert level performance. What criteria can be used to determine what level someone is and how able they are at designing good systems. Thanks!
@rbianchidev
@rbianchidev 3 жыл бұрын
A very complete and useful analysis of a complex problem like this one. Thanks a lot!
@nasserrcorcuera93
@nasserrcorcuera93 4 жыл бұрын
Awesome. Just like the interviewer said, this architecture is very close to the one's being used in the real industry - just like in my company. I was so amazed you just thought of the design on the spot. Again, great content!
@JM_utube
@JM_utube 4 жыл бұрын
lol i mean this is definitely based on experience.
@hazzhaston4777
@hazzhaston4777 4 жыл бұрын
Love it. Looking forward to more of these. I like the open endedness of system design. System's expert has a great glossery section. I can't wait for all the designs to be unlocked. Just a few more days! I would love a discussion type section to ask question and discuss my own choices. Still, love the work done so far. But don't stop. 😁👍
@clem
@clem 4 жыл бұрын
Really glad to hear that you like it! And thanks for the feedback; the discussion section you're mentioning is something we're currently considering adding 👀
@hazzhaston4777
@hazzhaston4777 4 жыл бұрын
@@clem no worries if you don't. Loving the work so far. 😊
@Kitsuki42
@Kitsuki42 4 жыл бұрын
Bravo pour ta vidéo Clément, tu fais un excellent travail ! C'est précieux d'avoir accès à de telles connaissances, merci de rendre cela plus accessible. Let's go!
@fygascod
@fygascod 4 жыл бұрын
Or for the queue, use SQS and be done with. Heartbeat by extending visibility of the message, all good.
@AmrMostafaY
@AmrMostafaY 3 жыл бұрын
I loved this. Thanks so much for taking the time to put this high quality video! I've a small comment that I can't get out of my head: The SQL transaction that workers use to grab jobs seem to have a race condition that might make 2 or more workers grab the same job. I don't think ACID here protects from that. Locking needs to be done somehow to prevent that, and the first option I'd explore, as it's the simplest, is to change the SELECT to SELECT FOR UPDATE, assuming the underlying SQL engine supports it which is guaranteed to lock the resulting row for a single worker until it had a chance to perform the update on the status. If SELECT FOR UPDATE is not supported, we can explore other options such as manual row-level or table-level locking. Great stuff, thanks again!
@ihorhula
@ihorhula 3 жыл бұрын
Was thinking the same :)
@jiaruitian677
@jiaruitian677 3 жыл бұрын
Same thought. The transaction's atomicity does not mean only one of the concurrent update requests will be success.
@nameunknown007
@nameunknown007 2 жыл бұрын
Exactly my thought. Plus I was thinking why he wouldn’t use a tool built for queues instead of making sql fit into this use case. Especially when the interviewer asked him do you think this will serve the purpose and he doubled down on it lol. Note to myself: listen carefully when such a question comes up haha
@JohnTowell
@JohnTowell 2 жыл бұрын
Came here to say this
@swoogan
@swoogan 2 жыл бұрын
You can actually build a queue in SQL without SELECT FOR UPDATE, or any implicit locks. You do an update on the row, setting its state to RUNNING, where the id matches and the row is in the QUEUED state. If the affected rows is 0, the task has already been picked up. If it is 1, you have picked up the task. Note that autocommits need to be enabled on the UPDATE, or there is no difference from SELECT FOR UPDATE.
@alexandrudascal5585
@alexandrudascal5585 4 жыл бұрын
A great example of a System Design interview, really looking forward to more this kind of videos
@hbgl8889
@hbgl8889 3 жыл бұрын
This is more like an interview about implementing a scalable queue.
@Victor-gj5hy
@Victor-gj5hy 2 жыл бұрын
great presentation. looks like a totally real interview. guy on left is even little bit annoyed. very real
@mattrex002
@mattrex002 4 жыл бұрын
Nicely Done. Very impressed how you think and build up slowly and systematically
@thinklessdomore4549
@thinklessdomore4549 3 жыл бұрын
this was superb !! thanks Clement!
@valeriyblyus3958
@valeriyblyus3958 3 жыл бұрын
It was brilliant, thank you Clément Mihailescu!
@SamyakMehta1508
@SamyakMehta1508 Жыл бұрын
Fantastic video. Full of knowledge and very engaging. Thanks for this Clement! One different approach for managing the workers could be to have just one service poll the SQL table (queue) and spawn new instances on demand (Spot instances, may be) to run the jobs. Rest of the architecture remains the same i.e the spawned instances still send heartbeat signals. This could prevent over provisioning of workers especially during times when no builds are run (code freeze) or very few builds are run. But it comes with an additional waiting time equivalent to that taken by a new instance to boot up when none of the available instances are available to take up a new job.
@ritvikindupuri2388
@ritvikindupuri2388 22 күн бұрын
riigtht and mathemtiacally it may not be suitable
@codeninja8813
@codeninja8813 4 жыл бұрын
Very helpful video, Clement. Keep going!
@chainer22
@chainer22 4 жыл бұрын
Amazing content! Thank you for making this. I have a question regarding the peer-to-peer deployment solution proposed. How does that work? Is there any existing tools or services that provides this capability?
@RamB0T
@RamB0T 4 жыл бұрын
I love systems design, especially coming from the Hadoop + ETL world 😎
@superbmood
@superbmood Жыл бұрын
Learning some of the ideas in here helped me land a FAANG job. As a junior engineer I didn't think to use a SQL database to implement a queue for real systems at scale.
@resilientprogrammer8466
@resilientprogrammer8466 2 жыл бұрын
This is a great initiative, having open programming interview. It's my first interview I witnessed live. Imagine how long I have to go. But that doesn't intimidate me either.
3 жыл бұрын
I didn't understand why you took so long to start designing the actual system (40 minutes to design the queue). Also, a couple of times the "Binger" (ex-Googler) asked you a couple of times to explain what would back your queue. And when you said it would be a SQL database, he asked you how the dequeue operation would be, you spent more time than I expected to explain it. I would use some already existent queue system and use another database to store the building/deploying data. Despite that, thank you for the amazing content, Clement! keep it up!
@TashingaPemhiwa
@TashingaPemhiwa 2 жыл бұрын
Great mock interview session 👍🏽. Question: what do you think about some kind of status on the main KVS to ensure that a binary has been completely downloaded everywhere before allowing the KVS to be updated?
@hungscarchannel3276
@hungscarchannel3276 4 жыл бұрын
I wish I saw this before I went to an interview recently. I touched the high level design but I was lack of explaining more details in each service. Now I know why I failed. Thanks for the video.
@nik15oc
@nik15oc 4 жыл бұрын
Can you share more about the problem statement?
@achilles165
@achilles165 3 жыл бұрын
Most time spent on build system, not too many details covered about the deployment systems like safety of deployment, health checks, configurable deployment speeds, rollbacks, global service health \ availability checks to pause, incident management. These things are highest order bit for any large scale company as no one wants a global or regional outage.
@bryanurizar
@bryanurizar 3 жыл бұрын
This was extremely interesting! I have no background in system design, but really thought this was cool!
@JamesStiling1985
@JamesStiling1985 Жыл бұрын
This was great. I am a little rusty on System Design and this got my brain revved up again.
@billb.8980
@billb.8980 4 жыл бұрын
Thank you for sharing insight into the process of system design. I think an important question relating to the regional swarms sharing new builds may have went unanswered. Using this design, how do you determine which node(s) download the builds initially from GCS in order for it to be shared via the p2p network while avoiding hundreds or even thousands of them simultaneously attempting that initial download?
@Tourach74
@Tourach74 3 жыл бұрын
I had the same thoughts. I think you could implement an election process to select 1 or more leaders who would be allowed to download from GCS. If the leader dies, the P2P network would then elect a new one.
@abcd-dcba
@abcd-dcba 2 жыл бұрын
The way you delivered intro deserves a like :)
@TheDsasadsad
@TheDsasadsad 4 жыл бұрын
Very insightful. Watched the whole thing. Thank you Clement
@kp8607
@kp8607 3 жыл бұрын
Thanks for the great content! May I ask what tool you used for the drawing? It'll help system design interview a lot!
@olalekansogunle
@olalekansogunle 4 жыл бұрын
More practical videos like this are required
@Shogoeu
@Shogoeu 2 жыл бұрын
He looked so excited about this mock inteview!
@jackie8658
@jackie8658 3 жыл бұрын
Informative interview! Enlightening to hear Clement's and the interviewer's thought processes. One question: are there any other options to implement the queue other than a SQL database table?
@alexfeguson1
@alexfeguson1 3 жыл бұрын
Great job. I would like to see a feedback at the end of the interview, but it is just my humble opinion. Thanks
@illuminek
@illuminek 4 жыл бұрын
@clement which tool do you use for white boarding and drawing for system design?
@nobytes2
@nobytes2 3 жыл бұрын
There's literally thousands of drawings apps.
@danielboteroc
@danielboteroc 4 жыл бұрын
Clement, Nice interview, I liked it. Only one thing, I am not sure about the fact that two servers won't pick up the same job using the code you've done. You might do a more complicated logic to pick up that job. If two jobs do the select at the same time, both will get the same job unless you are blocking the table.
@FlaviusAspra
@FlaviusAspra 2 жыл бұрын
The interviewee was quite weak I have to say. He could have done at least a SELECT FOR UPDATE SKIP LOCKED or equivalent.
@stillmattwest
@stillmattwest Жыл бұрын
Pretty impressive stuff, that's a sophisticated system design challenge.
@venkateshTD
@venkateshTD 4 жыл бұрын
When we got to the part where we were trying to figure out a way to find out if a worker died, I was shouting "heartbeat mechanism" sitting in front of the screen, coz that was the first concept we learnt in our software architecture class. It was so satisfying when I heard you said the same haha. Great video and it does feel like a very real interview
@reedipbanerjee
@reedipbanerjee 2 жыл бұрын
I appreciate this a lot, it helps cleaar some ideas and helps reinforce our thoughts as well. One thing though, the number of writes for last_h seems high, a liveness/heartbeat check may work as well with the monitoring/auxillary service just subscribing to a MQ with an event set ( start/stop ). And just add the Worker information in the DB table. That ways, any build logs on the worker can also be easily verifiable and writes for Last_h would reduce a lot. However, this is just a small thought, and this system design itself is splendid enough
@accessory2008
@accessory2008 4 жыл бұрын
Thanks for the video. The p2p network part for downloading build is interesting. :)
@niklaslehnfeld4308
@niklaslehnfeld4308 3 жыл бұрын
Was very interesting, thank you for sharing. Cant imagine why someone should dislike this video..
@fredschneider7475
@fredschneider7475 4 жыл бұрын
This is great, Clem. It's good to see you asking so many clarifying questions. I sometimes have the wrong-headed mindset where I don't want to ask a question that could reflect negatively on me. One thing: What does "2-3 nines" mean?
@joelmartinez625
@joelmartinez625 3 жыл бұрын
99.99-99.999% availability
@gauravagarwal8592
@gauravagarwal8592 3 жыл бұрын
Man top class session I really enjoy it damn good u covered all the basics concept..
@mathewrajan8514
@mathewrajan8514 3 жыл бұрын
This really helped me in my interview . Thank you 😊
@seanwar
@seanwar 3 жыл бұрын
Great video! It gave me confidence since I was thinking on a similar approach but I tend to hesitate while explaining it. Question: what tools did you use to draw by hand and share at the same time? What device did you use? Which software? And is this setup near to what I should expect in a real systems design interview considering that with the pandemic the onsite interviews are almost not existent?
@somil47
@somil47 4 жыл бұрын
This is really great. Thanks for making such videos. Really informative and helpful.
@samanrajaei8129
@samanrajaei8129 3 жыл бұрын
Lots of great stuff covered here. I would've personally covered: - the actual scm deployment platform integration (e.g. webhooks off the back of git commits) - and build/dependency caching as well.
@iamworstgamer
@iamworstgamer 3 жыл бұрын
man they are so calm and composed. Indian interviewers get irritated when I ask them questions to understand their questions
@CesarOzuna
@CesarOzuna 3 жыл бұрын
Thank you for showing your prejudice for all to see. Btw this is a mock interview, not a real one. The Indians you speak so “highly” of are under pressure of a real interview.
@manishshukla5890
@manishshukla5890 4 жыл бұрын
Thanks for the Google system design sneak peek.
@jewjonny5621
@jewjonny5621 2 жыл бұрын
The last part of the build trigger P2p network can be handles by a consensus protocol like RAFT, most disributed consensus systems today (Consul, Kubernete, nosql DBs etc) are handling state in that way and sending commands to the rest of the workers to set the desired state.
@saranyaks6436
@saranyaks6436 4 жыл бұрын
So many questions :) 1. How do you handle jobs which require building in multiple architectures (x64, arm, etc) 1.5 How would you handle scenarios involving multiple branches? 2. Why use SQL while there are so many distributed queue alternatives (SQS, for example) which let you handle scenarios like a builder failed elegantly? 3. Why store heartbeats in the same table? Why not have the builders register with a configuration service like Zookeeper which can take care of heartbeating? 4. How are build logs stored? How often are they garbage collected? 5. With this approach the SQL table will continue to grow infinitely which will make queries more and more expensive over time. What would be the table cleanup strategy. 6. How do you ensure that all machines have received a certain build? 7. How do you ensure that a malicious system doesn't pose to be a 'seed' and try to deploy malicious binaries?
@darciogmail
@darciogmail 2 жыл бұрын
Great video! What are you using for sketching? It helped a lot to make the interview to flow nicely…
@ericgeppert4252
@ericgeppert4252 2 жыл бұрын
Appreciate the Good-luck at the end homie!
@mikedqin
@mikedqin 2 жыл бұрын
Great interview video: I liked the most is the interaction between the interviewer and interviewee. Some thoughts on the design: 1) the SQL database can be a Queue system such as Kafka or Pub/Sub from GCP, which handles the scale very well with partitions. Given the large scale, the frequent query and updates to the SQL database will harm the performance, especially update the worker's heartbeats every second in the table. So a message broker will be the best solution. Worker status / heartbeat should be monitored and reported to a monitoring system such as Prometheus. Worker can push its health check status to Prometheus. 2) The interviewer tried to ask system design in Non-Abstract way, meaning how many servers are needed, do an analysis on bandwidth, timing, storage in a datacenter, and non-uniformed load (x1.25), then 3 datacenter deployment in a region, to derive the footprint per datacenter and global footprint. I hope the interviewee can elaborate on the Non-Abstract design more. Overall, a great system design interview. Thank you very much.
@artemtraer7615
@artemtraer7615 2 жыл бұрын
I guess problem with Kafka is that it stores the msges in topic only for some period of time, and also how would you update the record inside the topic . But there could be a sql - Kafka replica tho
@mputcha
@mputcha 2 жыл бұрын
I had imagined a distributed queue and a separate process to store the jobs for retaining history if needed. DB for queue will be expensive. Maybe even a DB+ Redis Cache where the server pulled off from a queue structure if access to cloud services is a constraint
@dorcohen3522
@dorcohen3522 Жыл бұрын
100% right. I can add two more things on top of this. 1. Why building SQL queries is important for system design interview? We should deal with more abstract design, and maybe, later, it's possible to talk about SQL in depth, but they wasted so much time on it. 2. The presented SQL query will now work properly under load, this is why a queue system is by far superior, I couldn't understand why he wouldn't just use that, we can retain the data for as long as we want and slap extra metadata on top.
@Core433
@Core433 Жыл бұрын
I think SQL is indeed a better choice than message queue (i.e., Kafka) here. MQ for stream processing might be appropriate for super high QPS workflows, but assuming a giant tech company with 40k devs each with 2 commits per day, that's only 0.9 QPS builds coming into this build system, which is well within the abilities of a SQL DB and complete overkill for MQ. Additional reasons why MQ is not an ideal option: 1) MQ tends to have low retention, you'll need to end up storing your jobs in some persistent store like SQL or NoSQL DB anyway to preserve full history 2) It's difficult to parallelize MQ unless you have multiple partitions / topics which match the number of workers -- this is because coordinating multiple workers consuming the same MQ partition is difficult. Yet the low QPS of input to this system does not warrant partitioning to me. 3) As the presenter explained, SQL DB has built-in consistency where build workers need to acquire a read/write lock to obtain the rights to build a job. MQ does not provide this out of the box, so it's up to client to coordinate worker pool. See point 2 above on why this is difficult. 4) MQ does not preserve order of jobs between partitions, and it was a requirement that jobs be roughly started in the same order they come in. I think jumping to the conclusion that we need MQ for *any* kind of queue can be a detrimental mindset in system design, and could hurt a candidate in a system design interview. It's worth understanding the tradeoffs and explaining this to the interviewer.
@xtzyshuadog
@xtzyshuadog Жыл бұрын
@@Core433 How does one enter the career path of system design? What prerequisite knowledge, certifications, skills would you think they would need? Are there particular programming languages or tools for home situations one can practice in by designing their own simple small systems using free tools?
@mohanish35
@mohanish35 2 жыл бұрын
Another solution to the healthcheck problem of the workers could be: We can have a column called 'worker_id' in the jobs table. This will contain the id of worker a running job is assigned to. Healthcheck service will contain the information of worker_id as well. Once it finds that one of the worker is dead, it will update in the jobs table based on the worker_id.
@Ziemecki
@Ziemecki 3 жыл бұрын
Hi Clement! How're you? I hope well. I was wondering how different is one System Design Interview and the System Design and Scalability interview that does Google for a Software Engineer Position when you reach the on-stage part of the process where there are more or less 4 interviews (3 technical and one non-technical). Thank you! Love your videos!
@umiakalevinem
@umiakalevinem 2 жыл бұрын
Probably the only realistic System Design interview on whole of youtube
@ralphwbms
@ralphwbms Жыл бұрын
Great video man. Thanks! About the TRANSACTIONAL part, here is how I'd have done: Instead of SELECT the next JOB in the QUEUE, I'd have the WORKER UPDATING the table with its WORKER ID, and than SELECTING the only row that got affected. If you SELECT first and then UPDATE, there is a chance of to WORKERs getting the same JOB ID at the SELECT step. Another point: I thing there is no need to begin a TRANSACTION just for one INSERT. A transaction is made by multiple steps (the SELECT does not count as a step).
@uskro
@uskro 3 жыл бұрын
I don't get why you'd set a heartbeat to write to the db that frequently. You could just set a timestamp of assignment and your health check could just check the timestamp delta. You could have a read query executed every 5 minutes, to find the running operations updated over 15 minutes ago to find the problem operations. But you could also benefit from a worker identifier in the table, and your health check could also be a queue solution to check both with your table and the workers, maybe the operation is just taking longer than expected so you also wouldn't want to reassign the operation to another worker and have the code deployed by two different workers.
@maganaluis92
@maganaluis92 2 жыл бұрын
All good, but honestly I would be tempted to just recommend solutions which already have been built, e.g. Argo CD, Docker, Kubernetes, and GCS already has cross-region replication for blobs. Tough overall, I liked how you broke the problem down, asked clarifying questions, and kept it very conversational. SD interviews are very open ended.
Google Coding Interview With A Facebook Software Engineer
49:59
Clément Mihailescu
Рет қаралды 924 М.
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 4,3 МЛН
🌊Насколько Глубокий Океан ? #shorts
00:42
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 169 МЛН
Design Twitter - System Design Interview
26:16
NeetCode
Рет қаралды 461 М.
System Design Interviews: 10 Key Principles (with ex-Google EM)
41:14
IGotAnOffer: Engineering
Рет қаралды 16 М.
All You Need To Know About Behavioral Interviews (for software engineers)
15:15
Google system design interview: Design Spotify (with ex-Google EM)
42:13
IGotAnOffer: Engineering
Рет қаралды 1 МЛН
Why Does Scrum Make Programmers HATE Coding?
16:14
Thriving Technologist
Рет қаралды 495 М.
Google Coding Interview With A High School Student
57:24
Clément Mihailescu
Рет қаралды 4 МЛН
Medium Google Coding Interview With Ben Awad
51:27
Clément Mihailescu
Рет қаралды 1,2 МЛН
How I Failed the Google Coding Interview (and lessons I learned)
14:24
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 1,3 МЛН
Main filter..
0:15
CikoYt
Рет қаралды 11 МЛН
💅🏻Айфон vs Андроид🤮
0:20
Бутылочка
Рет қаралды 716 М.
Нашел еще 70+ нововведений в iOS 18!
11:04
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 240 М.