I really like how she is driving the interview! However, the design seems to be very high-level and monolithic, not necessarily a system you can deploy at scale. I think the functional requirements need to be narrowed even further, because recommendation is a system design question on its own. We touched geosharding, but that discussion seemed out of place for something that was supposed to be high level. I think back of the envelope estimations were a bit out of place, there was really no reason given for why those calculations were done. We calculated the amount of metadata storage we might need, but not much discussion other than that. No mention of whether this is a read heavy vs. write heavy system and what implications that has on the rest of the design. Do we need to be consistent or highly available? This is a very read-heavy service where people are swiping left and right like crazy, refreshing feeds all the time. You're going to need to be highly available, so someone that is new on the app might not have their profile readily seen until replicas pick them up. I'm thinking for the feed generation / finding other users in your area, you'd have some sort of document store that you can scale as you go (like Mongo), with support for queries / searching based on strings. We'd have location in the user's metadata, so you'd probably let Google S2 handle the geometry and get all the users in a particular user's location. Honestly you might even consider a Graph DB since you're essentially building a recommended network of users based on a bunch of preferences and biographical information. There seemed to be no goal in getting a complete, scalable system on the whiteboard, and the interviewer also didn't really do much to steer the candidate in the right direction unfortunately.
I love how she first starts to describe the app in so much detail and at some point gets self conscious. "Oh, I'm actually not a user of Tinder and I have only heard about these super like things from a friend of a friend"
I think the calculations were way off. She did 200kb per picture (which in reality is 3-6mb per pic. and exponent sys design course it mentions to round up or down so rounded up is 10mb) She also gave herself a hard number of 6, i think calculation wise it would been smart to say 5 or 10. At 10mb per picture and a user can upload 5 -> 5 * 10mb = 50mb per person 50mb * 50,000,000users = 250,000,00 Gb -> 2.5 Terra Bytes worth of data just for the pictures As for text, an average line of text takes up about 70 bytes (rounded up is 100 bytes per person). 0.10 of a Kb. So for 10 people your looking at about 1kb. Fairly small but for the 50million = 1Kb -> 50,000,000 = ~50million Mb -> ~50Gb worth of data for profiles. So 50Gb x 2.5Tb is around 2.55Terra bytes. Takes a LTO of mental math but her estimate of 300-600Tb was just her throwing a number out there.
I think that doing an interview being only assertive, never asking for a feedback on assumptions, requirements, design proposals, or numbers might be leading to failing the interview because it can give the impression of being opinionated and self-centered. Also, I think there's a lot of concepts that are explained fast, they are not super clear, and there aren't considerations about tradeoffs of why choosing what. A candidate like this would make me think twice about giving a positive feedback, if I were the interviewer.
Which is this tool that draw design diagram? Can you send me the link? My next system design interview I have to draw whiteboard..I am looking best website that available?
Lol iof they actually introduced a balancing system to reduce matches for people who get too many, like she mentionned she would add, the app would actually be worthwhile
i didnt even know what geo sharding was. If you didn't know a certain technology existed in an interview that requires it, does that just mean I am inexperienced?
Wonderful session! I am wondering how recommending service is handling already recommended users. Are we going to store the action taken by user on each recommended profile? This can make database bulky. If we are to store action taken by user on each recommended profile, then what would be the query strategy, how data should be partitioned? Looking for someone to suggest here! Thankyou
minute6 estimate looks off.. profile pic storage estimate is 200kb x 6 x 50M = 200 x 10^3 x 6 x 50 x 10^6 = (200 x 6 x 50) x 10^3 x 10^6 = (6 x 10^4) x 10^3 x 10^6 = 60 x 10^12 = 60TB 600TB is 1000% of real estimate
Yipes! I've never installed a dating app or used one, I've only ever heard of things like "swipe right" in movies and television. I would be very disadvantaged if asked to design something like this. The interviewer would have to define all the business req's since I don't know what is in the app. Is "swiping right" a good thing? Like what is the positive vector for creating the directed graph relationship?
This is why you speak up at interviews. It's perfectly fine if you have never used Tinder, you could request for another system. Interviewers would have a few that they could ask you,.
User profiles are not unstructured data, quite the contrary. 50M records are not that many for a RDBMS to handle, so I think the interviewer missed an opportunity here to ask clarifying questions.
For recommendations, passing the userprofile id to the recommendation service and then lat, long and other profile data from the profile service might cause unnecessary load to the user profile service. One. of the options can be to pass the required data from the app itself. Another way could. be to setup a cache on the profile data.
This is helpful but I want to point out it does seem like she has notes she's referencing for the video so they probably thought all this out beforehand with resources available. Not an issue at all for learning purposes but just thinking about setting realistic standards. In a real interview setting, you may not get this detailed and that's okay. What they care about is high level stuff.
Make sure you're interview-ready with Exponent's system design interview prep course: bit.ly/46cS6ZF
1M active users a day generate 1B matches a day? That is 2000 matches a day per person
I really like how she is driving the interview! However, the design seems to be very high-level and monolithic, not necessarily a system you can deploy at scale. I think the functional requirements need to be narrowed even further, because recommendation is a system design question on its own. We touched geosharding, but that discussion seemed out of place for something that was supposed to be high level.
I think back of the envelope estimations were a bit out of place, there was really no reason given for why those calculations were done. We calculated the amount of metadata storage we might need, but not much discussion other than that. No mention of whether this is a read heavy vs. write heavy system and what implications that has on the rest of the design. Do we need to be consistent or highly available? This is a very read-heavy service where people are swiping left and right like crazy, refreshing feeds all the time. You're going to need to be highly available, so someone that is new on the app might not have their profile readily seen until replicas pick them up.
I'm thinking for the feed generation / finding other users in your area, you'd have some sort of document store that you can scale as you go (like Mongo), with support for queries / searching based on strings. We'd have location in the user's metadata, so you'd probably let Google S2 handle the geometry and get all the users in a particular user's location. Honestly you might even consider a Graph DB since you're essentially building a recommended network of users based on a bunch of preferences and biographical information.
There seemed to be no goal in getting a complete, scalable system on the whiteboard, and the interviewer also didn't really do much to steer the candidate in the right direction unfortunately.
I love how she first starts to describe the app in so much detail and at some point gets self conscious. "Oh, I'm actually not a user of Tinder and I have only heard about these super like things from a friend of a friend"
Is there an error in the calculations of the profile photos storage? It should be around 60TB, not 300-600TB. 200kb * 6 * 50M = 60TB, isn’t it ?
Some of the calculations and approaches are not good however I appreciate their times and efforts to explain how we develop systems. Thanks
I think the calculations were way off.
She did 200kb per picture (which in reality is 3-6mb per pic. and exponent sys design course it mentions to round up or down so rounded up is 10mb)
She also gave herself a hard number of 6, i think calculation wise it would been smart to say 5 or 10.
At 10mb per picture and a user can upload 5 -> 5 * 10mb = 50mb per person
50mb * 50,000,000users = 250,000,00 Gb -> 2.5 Terra Bytes worth of data just for the pictures
As for text, an average line of text takes up about 70 bytes (rounded up is 100 bytes per person). 0.10 of a Kb.
So for 10 people your looking at about 1kb. Fairly small but for the 50million = 1Kb -> 50,000,000 = ~50million Mb -> ~50Gb worth of data for profiles.
So 50Gb x 2.5Tb is around 2.55Terra bytes. Takes a LTO of mental math but her estimate of 300-600Tb was just her throwing a number out there.
This was use case driven design and will iterate slowly in to a high level system design
I think that doing an interview being only assertive, never asking for a feedback on assumptions, requirements, design proposals, or numbers might be leading to failing the interview because it can give the impression of being opinionated and self-centered.
Also, I think there's a lot of concepts that are explained fast, they are not super clear, and there aren't considerations about tradeoffs of why choosing what.
A candidate like this would make me think twice about giving a positive feedback, if I were the interviewer.
I am hooked. I love the videos on this channel.
Which is this tool that draw design diagram? Can you send me the link? My next system design interview I have to draw whiteboard..I am looking best website that available?
Hey SwikarP! The tool used here is called "Whimsical"!
Lol iof they actually introduced a balancing system to reduce matches for people who get too many, like she mentionned she would add, the app would actually be worthwhile
How to get 1 billion matches per day while the active user per day is 1 million?
every user has 1000 matches per day
1-TO-MANY relationship
users' location are always changing, sharding by geo, probably wouldn't be the best idea. but great content here
Loved it!
i didnt even know what geo sharding was. If you didn't know a certain technology existed in an interview that requires it, does that just mean I am inexperienced?
It was a great session thanks for that, can we also add/cover the remaining part, specially the matching of profiles.
Thanks in advance
Why she is explaining ERD using JSON? is it not effective, isn't it?
wouldn't it be better to ask questions about the functional and system requirements at the start rather just riffing off like that?
Which software is this, I am shopping for something to do those diagrams with
Hey ComfortChauke! This whiteboard software is "Whimsical". They've got a free version if you want to try it out!
Wonderful session!
I am wondering how recommending service is handling already recommended users.
Are we going to store the action taken by user on each recommended profile? This can make database bulky.
If we are to store action taken by user on each recommended profile, then what would be the query strategy, how data should be partitioned?
Looking for someone to suggest here! Thankyou
minute6 estimate looks off..
profile pic storage estimate is 200kb x 6 x 50M
= 200 x 10^3 x 6 x 50 x 10^6
= (200 x 6 x 50) x 10^3 x 10^6
= (6 x 10^4) x 10^3 x 10^6
= 60 x 10^12
= 60TB
600TB is 1000% of real estimate
The best in Exponent channel.
Curious on why NOSQL DB is chosen for profile. IMO SQL in this case would have been better. Any thoughts/perspectives?
which tool / website people are using in this video to display the diagrams and text. Its very neat and clean and looking for something like this
same question!!!!! let me know if u find it.
Hey! The tool used here is called "Whimsical"!
Thx. Anyone know which tool she is using for the diagram?
Whimsical docs
Yipes! I've never installed a dating app or used one, I've only ever heard of things like "swipe right" in movies and television. I would be very disadvantaged if asked to design something like this. The interviewer would have to define all the business req's since I don't know what is in the app. Is "swiping right" a good thing? Like what is the positive vector for creating the directed graph relationship?
This is why you speak up at interviews. It's perfectly fine if you have never used Tinder, you could request for another system. Interviewers would have a few that they could ask you,.
Not sure if the System Design interviews are done like this.
this is gold. thanks for sharing!
User profiles are not unstructured data, quite the contrary. 50M records are not that many for a RDBMS to handle, so I think the interviewer missed an opportunity here to ask clarifying questions.
Does anyone know which web app is being used for her to whiteboard on?
Whimsical :) whimsical.com/ - it's free!
She good. Hired!
that was impressive
thank you
Helpful!
For recommendations, passing the userprofile id to the recommendation service and then lat, long and other profile data from the profile service might cause unnecessary load to the user profile service. One. of the options can be to pass the required data from the app itself. Another way could. be to setup a cache on the profile data.
why cant we cache the recommendation input for the user similar to fb or twitter feed
This is helpful but I want to point out it does seem like she has notes she's referencing for the video so they probably thought all this out beforehand with resources available. Not an issue at all for learning purposes but just thinking about setting realistic standards. In a real interview setting, you may not get this detailed and that's okay. What they care about is high level stuff.
Thanks for sharing❤
Why didn't she talk about how matching will work, how she will store likes in DB etc.
whats the site/tool she is using for jotting down requirements?
Hey abhineetsingh6720, the tool is called "Whimsical"!
A lot of errors and a lot of important system components design.
It's must like simple request workflow
What text/diagram editor do you use?
Hey ncherrytree! The diagram editor is a free whiteboard tool called "Whimsical"
name of the app she is using
The whiteboard app used here is called "Whimsical"!
What tool is that?
Hey LucianTugui, if you are talking about the whiteboard tool, it's called "Whimsical"!
Well done but a little humorous to me a tik-tok employee didnt touch upon security.
Can someone tell me what is the software she is using to write text and draw the design of the flow diagram.
Hey SatyaPrakash-il2ed! The whiteboard used is called "Whimsical"