Тёмный

System Design Mock Interview: Design WhatsApp 

Exponent
Подписаться 347 тыс.
Просмотров 81 тыс.
50% 1

Don't leave your system design career to chance. Sign up for Exponent's system design interview course today: bit.ly/4acJ5BN
Watch our mock system design interview. Kevin asks Roshan Halwai (Software Engineer, Amazon) to design WhatsApp and explain the messaging architecture. This is commonly asked in software engineering and technical program management (TPM) interviews.
Chapters -
00:00:00 - Introduction
00:00:51 - Requirements
00:03:24 - Clarifying questions
00:04:20 - Design
00:17:19 - Scale
00:18:17 - Follow-up questions
00:19:41 - Interview analysis
Watch more videos here:
- Amazon SDE answers binary tree question: • Amazon Software Engine...
- Google SWE answers algorithms interview question: • Google Software Engine...
- Google TPM answers Tiktok system design interview question: • System Design Mock Int...
- Microsoft SWE answers algorithms interview question: • Microsoft Software Eng...
👉 Subscribe to our channel: bit.ly/exponentyt
🕊️ Follow us on Twitter: bit.ly/exptweet
💙 Like us on Facebook for special discounts: bit.ly/exponentfb
📷 Check us out on Instagram: bit.ly/exponentig
📹 Watch us on TikTok: bit.ly/exponenttikttok
ABOUT US:
Did you enjoy this video? Want to land your dream career? Exponent is an online community, course, and coaching platform to help you ace your upcoming interview. Exponent has helped people land their dream careers at companies like Google, Microsoft, Amazon, and high-growth startups. Exponent is currently licensed by Stanford, Yale, UW, and others.
Our courses include interview lessons, questions, and complete answers with video walkthroughs. Access hours of real interview videos, where we analyze what went right or wrong, and our 1000+ community of expert coaches and industry professionals, to help you get your dream job and more!
#productmanagement #pminterview #tech #productmanager #entrepreneurship #product #prodmgmt #exponent #execution

Опубликовано:

 

30 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 96   
@tryexponent
@tryexponent 2 года назад
Don't leave your system design career to chance. Sign up for Exponent's system design interview course today: bit.ly/4acJ5BN
@ChandraShekhar-by3cd
@ChandraShekhar-by3cd 2 года назад
I guess there were many missing point in the video : 1 . Whether you should choose CA or CP system 2 . DB schema , He was not clear with why to choose No-sql db. Whatsapp still uses SQL DB for the storage of messate. 3. Cache and CDN 4. Load balancer role 5. How to get the online presence, he just keep putting all the responsibility in the Session Management Service only! 6. What if users are from different time zone. 7. How to handle the concurrency and idempotency of the system. 8. Tradeoffs Please do consider these points for the next upcoming System design or LLD videos!! Thanks!
@saurabhtanwar7299
@saurabhtanwar7299 2 года назад
Yes, Other interviews were good of exponent covering all points but This one misses out all these points, This one looks more of bookish to me. CodeKarle -(ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-RjQjbJ2UJDg.html) is close to correctness covering all aspects.
@IdoKleinman
@IdoKleinman 2 года назад
On point. Exponent's mock behavioral interviews are good however all of their system design mock interviews are really superficial, don't cover the hard issues or tradeoffs and just won't fly as a full correct answer in a real world interview.
@ChandraShekhar-by3cd
@ChandraShekhar-by3cd 2 года назад
@@IdoKleinman Yes, Agree with your point, they should provide in-depth knowledge on the topics and also the interviewee should come prepare before in hand so that he can convey the message quite precisely and clearly.
@ChandraShekhar-by3cd
@ChandraShekhar-by3cd 2 года назад
@@saurabhtanwar7299 Yes , I agree with the point. They should give quality content at least in their initial phase, they can charge later on, but they are trying to increase the userbase compromising the in-depth content.
@tryexponent
@tryexponent 2 года назад
Hey Chandra! Thank you for sharing those points with us. Just sent them over to the team Slack channel to take a look at as we develop more System Design content. Thanks for taking the time to share your honest feedback. Promise it's helpful!
@praveen3123
@praveen3123 2 года назад
I hope his manager will not PIP him after watching this :p
@nammi895
@nammi895 4 месяца назад
😂😂😂😂😂😂😂
@krugerbrent4270
@krugerbrent4270 2 года назад
It was a decent effort, but I felt some things could be improved. I am not sure why he jumped to the API gateway and microservice part that quick. Also, it felt like he was defining the requirements rather than letting the interviewer suggest or nudge him. - The group messaging logic wasn't satisfactory at all. I got confused when he started with all the maps & lists, that are more oriented towards coding the backend logic rather than how the different pieces in the system interact. - Why can't we scale SQL databases? Of course, we can, just that it is going to be more of vertical scaling. There are significant other differences between SQL & NoSQL that weren't mentioned. - the database table schema could've been explained with more details like the various attributes, data type, the linking between a user table & content table, or contacts table - Also, as someone else commented, there are no location/timezone issues handled here - And what about using an object data store to store images to serve later or download later? - A cache for sending messages when the user is offline, cache store policy - API gateway distribution can be done with a load balancer and could use logic similar to the database sharding mechanism such as based on geography or based on a list of UUIDs
@raghavddps2
@raghavddps2 2 года назад
Isn't consistent hashing a better approach than to assign randomly keeping limit and all?
@piyushjaiswal8993
@piyushjaiswal8993 Год назад
Please someone tell me why we can't use Relational DB here, the schema looks pretty clear for whatsapp and don't see much changes to go for NoSql DB
@MosonMo
@MosonMo 2 года назад
sorry bro, like a lot of other people already commented, you do miss a lot of points here. In particular, for message delivering and group chat, it should use something similar to Azure Service Bus (queue for peer to peer communication) (topic and subscribers for group chat). If privacy is a concern, one could encrypt the message with a key belong to the receiver. This will handle wether receiver is online or not... Socket connection requires both parties to be online.
@gowris442
@gowris442 Год назад
S we can try to use something like consumer group கான்செப்ட் for group messages
@serhiiDev
@serhiiDev 10 месяцев назад
agree. there are a lot of white spaces.
@varunvats32
@varunvats32 2 года назад
WebSockets are not P2P.
@SaurabhKumar-uo6ms
@SaurabhKumar-uo6ms 2 года назад
I am new to system design. please provide link (any article) that shows webSockets can not be used for P2P. please also suggest some common Peer to Peer protocols that will be useful to read for interview.
@NM-jq3sv
@NM-jq3sv 2 года назад
@@SaurabhKumar-uo6ms Websockets are more like longlive connections but peer 2 peer is different protocol. it is used for large file delivery over multiple clients from a file server where each of the worker in peer copies a packet and transfer to another and so on reducing latency. Please watch clement code deployment system sys design interview it uses this protocol.
@vetiarvind
@vetiarvind 2 года назад
He means duplex, but it's obvious what his intention is.
@anveshicharuvaka2823
@anveshicharuvaka2823 2 года назад
This is just a bad example of an interview. I wouldn’t be harsh if it was a random attempt. But this is not just an attempt by a random interviewer. This is here to teach others how to interview. Websockets are not for P2P. The interviewer asked justification for NoSQL and they said scalability and it was just accepted. There are trade offs in every decision and it has to be properly justified in this particular situation. Not just give random textbook benefits of a technology. What does schema evolution mean? If NoSQL was applicable in every scenario why not use it everywhere.
@adityasrivastava5795
@adityasrivastava5795 2 года назад
I think you need to store data at server end. How will it work otherwise if the second user or receiver is offline?
@arvindnarayan8410
@arvindnarayan8410 2 года назад
WhatsApp doesn’t store messages by design
@blasttrash
@blasttrash 2 года назад
​@@arvindnarayan8410 So until my message is sent, is that message stored on my phone and when my friend comes online, only then message is sent? What happens if my android app storage grows large? Does whatsapp clear old messages on the phone which I have already received?
@GiorGoS07031992
@GiorGoS07031992 Год назад
I believe Whatsapp stores temporary the messages on their servers and deletes them after the message is delivered
@deathbombs
@deathbombs 2 года назад
12:15 how is this P2P communication? The clients go to api gateway then the session managing service before reaching other clients
@jasper5016
@jasper5016 2 года назад
After watching all these Amazon candidate's interviews, Amazon hires below avg people.
@xardiannon5038
@xardiannon5038 5 месяцев назад
No kidding. This was pretty bad.
@cranos666
@cranos666 2 года назад
Doing this on an actual system design interview will get you rejected. How does the client know to connect to which api server ? Storing the messages is essential when answering this question How does the session microservice know to send message to user B through gateway 2 etc etc
@channuangadi7504
@channuangadi7504 9 месяцев назад
we are using the same methodology for "message delivered" and "message read" how can we distinguish between them
@mickeyp1291
@mickeyp1291 2 года назад
wheres the kafka? what kinda monolithic scalable monstrosity was that thing? its not scalable to the next version of whatsapp. its not even scalable to millions of users connected at realtime. sorry, thats my opinion
@keyurdgp
@keyurdgp 2 года назад
What drawing tool are you guys using it? It seems it is very simple to use.
@tryexponent
@tryexponent 2 года назад
Yes, it is. It's Whimsical.
@JardaniJovonovich192
@JardaniJovonovich192 2 года назад
What do we mean by"connecting to API Gateway" ? Does it have an IP address ? I don't think so, right?
@prash11leo
@prash11leo 2 года назад
Yes, IP and port It’s over TCP
@JardaniJovonovich192
@JardaniJovonovich192 2 года назад
@@prash11leo How come ? Isn't load balancer the one supposed to have an IP ?
@prash11leo
@prash11leo 2 года назад
@@JardaniJovonovich192 I believe the client will be connected to the gateway directly and not to a load balancer. If it is connected to load balancer, we need another mapping on the user to load balancer IP-port. I believe load balancing happens with consistent hashing, and client would directly connect to a gateway based on some ID. What do you think?
@JardaniJovonovich192
@JardaniJovonovich192 2 года назад
@@prash11leo Can you just give some examples of API Gateways which have an IP address ? Atleast as far as I remember I did not see an IP address for AWS API Gateway, correct me if I am wrong
@mrabbas9
@mrabbas9 Год назад
If this is acceptable to Amazon now I wonder why they failed me :)
@harshitkhandelwal8515
@harshitkhandelwal8515 7 месяцев назад
In India, It is easy to get into Amazon. Interviewers are like here, you can yap anything and get away with it because even Interviewer lacks knowledge. Dont know the scenario about your place tho.
@vroomerlifts
@vroomerlifts 2 месяца назад
@@harshitkhandelwal8515 That is not true.
@reydavid7300
@reydavid7300 2 года назад
What happens if one of the devices goes offline? Particularly, what if the receiver device is offline?
@farhazulislam6101
@farhazulislam6101 2 года назад
Oh Really? Try putting your mobile offline for a day or two, you will your ans.
@probhakarsarkar2430
@probhakarsarkar2430 2 года назад
Is api gateway bidirectional?
@ozurumbaobinna623
@ozurumbaobinna623 2 года назад
Please what software did he use for the design he was doing?
@yamininandakumar7110
@yamininandakumar7110 2 года назад
Whimsical
@kizhanz
@kizhanz 2 года назад
What happens if the recipient is offline?
@saathvikam
@saathvikam Год назад
message will be sent and will be received once recipient is online, message till then will be in Queue
@ritikjain697
@ritikjain697 2 года назад
which application they guys are using for design ?
@Wooby1Dooby1
@Wooby1Dooby1 3 месяца назад
Whimsical
@sammed.sankonatti
@sammed.sankonatti 2 месяца назад
​@@Wooby1Dooby1 Thanks
@vikrantchaudhary7245
@vikrantchaudhary7245 2 года назад
which text editor he is using 🤔
@saathvikam
@saathvikam Год назад
Whimsical
@gunaborah4659
@gunaborah4659 2 года назад
Bro spotify?
@tacowilco7515
@tacowilco7515 2 года назад
He had to explain each step. Like why API gateway, why micro service architecture, why specifically noSQL (why can't we use SQL) and etc. This is very oversimplified example which will not work in real world 100%.
@vetiarvind
@vetiarvind 2 года назад
Personally i'd give him a 2/5 or a 3/5 at max. I think he listed all the requirements, but he didn't mention the DB records - how to store media, i don't really like him using NoSql here tbh, structured data makes a lot more sense. In a way i guess it makes sense to store chat messages in a group for example in nosql but in this case since we're doing per message read acks, it makes more sense to be able to join users with messages.. also i think he should describe a write fan-out service - so if i write to a group, it should be published to the members of the group. So i'd have maybe a session service like he says to connect websocket handlers with users, then i'd use different microservices to manage publishing of messages internally and to notify those "chats" with the handlers. I'd also need a separate service to handle media and CDN's to deliver the media.
@gowris442
@gowris442 Год назад
100% true u mentioned all are correct fanout in kafka for sending message in whoever in groups I.e consumer group and media files he can use cdn with amazon s3.
@hazemabdelalim5432
@hazemabdelalim5432 Год назад
websocket are not P2P , i think you meant webrtc ?
@DevinMonyThomas
@DevinMonyThomas Год назад
which tool is used for scribing?
@tryexponent
@tryexponent Год назад
Hi Devin! The whiteboard tool being used here is “Whimsical”. They have a free and paid version so do check them out if you are interested!
@fartzy
@fartzy 2 года назад
Did he just say WebSocket is designed to be a Peer 2 Peer? How are you just gonna come out of the gate incorrect bruh
@ovidiusbr
@ovidiusbr Год назад
Good poker face 😁
@rockeyram857
@rockeyram857 Месяц назад
what is the software he is using for drawing the components?
@tryexponent
@tryexponent Месяц назад
Hey rockeyram857, the whiteboard tool is called "Whimsical"!
@rockeyram857
@rockeyram857 Месяц назад
@@tryexponent thanks
@mickeygarg
@mickeygarg 2 года назад
Whats the tool you use for this diagramming and designing. Can you help
@life_ofcoder
@life_ofcoder 2 года назад
miro
@AmanGarg95
@AmanGarg95 2 года назад
Nope, not miro. It is Whimsical.
@blasttrash
@blasttrash 2 года назад
yeah its whimsical not miro
@topg3067
@topg3067 Год назад
Dont waste your time. This man has no idea what he is saying or doing. Move on to some other video.
@jpc501
@jpc501 2 года назад
Not good
@ziggyzhang4156
@ziggyzhang4156 Год назад
lol these exponent mock interview videos are hilariously low quality, folks who think these are representative of good system design interviews are gonna be hugely mislead 😂
@tryexponent
@tryexponent Год назад
System design interviews have changed a lot in the last 12 months, with interviewers now asking more direct questions about the system rather than high-level theory. We're currently filming updates to large amounts of system design content to reflect that. Are there other things you'd want to see in system design content?
@rpiitkgpian
@rpiitkgpian Год назад
Seriously ??????????????????????????
@jeankhechfe1594
@jeankhechfe1594 Год назад
This interview is a total failure, rejection is garanteed if it was real.
@someguyO2W
@someguyO2W Год назад
This is all wrong
@armenarz4062
@armenarz4062 2 года назад
Dislike
@farhazulislam6101
@farhazulislam6101 2 года назад
Exponent, in your videos background music should be added. Like a dilogue in a movie scene becomes me engaging because of proper bg music. Listening to a man's harsh voice for almost an hr is quite a difficult job.
@fozailahmad5208
@fozailahmad5208 Год назад
What is the software they are using
@tryexponent
@tryexponent Год назад
Hey Fozail! The whiteboard being used here is “Whimsical” (if that's your question)!
@super-ulitka
@super-ulitka 2 года назад
Don't waste your time, such "WhatsApp" won't fly 🐘
Далее
Whatsapp System design or software architecture
27:40
Просмотров 251 тыс.
System Design Mock Interview: Design Instagram
31:12
Просмотров 486 тыс.
Facebook System Design Interview: Design Twitter
24:22
System Design Interview: Design Amazon Prime Video
26:53