Design Tinder - System Design Interview (with TikTok Senior Engineer)

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 มิ.ย. 2024
  • Make sure you're interview-ready with Exponent's system design interview prep course: bit.ly/46cS6ZF
    A Senior Software engineer at TikTok, delves into the intricacies of designing Tinder. Central to the discussion is the choice of NoSQL, geo-sharding, and more. Yen also emphasizes the importance of balancing low latency with real-time recommendations, highlighting the need to prioritize user engagement and quick response times. The recommendation service is intricately designed with multiple filters, ensuring users receive matches that align with their preferences, are active, and are diverse in nature. This interview provides a comprehensive look into the thought processes and considerations behind designing a user-centric and efficient dating app.
    Chapters (Powered by ChapterMe) -
    00:00 - Intro
    07:02 - Profile Creation and Storage Flow Overview
    13:54 - Feed Recommendation Requirements for Active Users
    17:14 - Recommend Local Users Based on Geographical Location
    21:54 - Google S2 and Geosharding for User Recommendations
    25:35 - Recommending Users Based on Preferences
    30:40 - Low-Latency vs Real-Time Recommendation
    35:32 - Core Functionality for Dating App
    Watch more system design videos here:
    - Meta engineering manager answers a rate limiter interview question: • System Design Mock Int...
    - Google SWE answers an algorithms interview question: • Google Software Engine...
    - Google TPM answers Tiktok system design interview question: • System Design Mock Int...
    - Flipkart EM “Design Amazon Prime Video” system design interview question: • System Design Intervie...
    - System Design Mock Interview: Design Instagram • System Design Mock Int...
    👉 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!
    #SystemDesignInterview #DesignTinder #TikTokSeniorEngineer #TechInterviewPrep #systemdesigninterviewprep #systemdesigninterview #systemdesign #systemdesignquestions #datadesigninterview #tinderdesign #usercentricdesign #tryexponent #mockinterview

ความคิดเห็น • 54

  • @tryexponent
    @tryexponent  5 หลายเดือนก่อน +1

    Make sure you're interview-ready with Exponent's system design interview prep course: bit.ly/46cS6ZF

  • @DominikPlaylists
    @DominikPlaylists หลายเดือนก่อน +4

    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"

  • @herooo.2928
    @herooo.2928 8 หลายเดือนก่อน +172

    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.

  • @kakhapilauri7251
    @kakhapilauri7251 5 หลายเดือนก่อน +61

    1M active users a day generate 1B matches a day? That is 2000 matches a day per person

  • @user-yn1ul2gh9u
    @user-yn1ul2gh9u 7 หลายเดือนก่อน +47

    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 ?

  • @vernielariosa8996
    @vernielariosa8996 7 หลายเดือนก่อน +2

    I am hooked. I love the videos on this channel.

  • @user-to8cz9eq1e
    @user-to8cz9eq1e 7 หลายเดือนก่อน +34

    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.

  • @startup_engineer
    @startup_engineer 7 หลายเดือนก่อน +1

    It was a great session thanks for that, can we also add/cover the remaining part, specially the matching of profiles.
    Thanks in advance

  • @sauravjha2933
    @sauravjha2933 8 หลายเดือนก่อน

    Thanks for sharing❤

  • @speeddykuang-ty9cq
    @speeddykuang-ty9cq 8 หลายเดือนก่อน +1

    The best in Exponent channel.

  • @ClashRoyaleAtman1
    @ClashRoyaleAtman1 หลายเดือนก่อน

    This was use case driven design and will iterate slowly in to a high level system design

  • @yoniziv
    @yoniziv 8 หลายเดือนก่อน +1

    this is gold. thanks for sharing!

  • @ayush_singh6203
    @ayush_singh6203 8 หลายเดือนก่อน +5

    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

  • @quirkyquester
    @quirkyquester 13 วันที่ผ่านมา

    users' location are always changing, sharding by geo, probably wouldn't be the best idea. but great content here

  • @SKDev11
    @SKDev11 8 หลายเดือนก่อน +1

    that was impressive

  • @austinhoag5130
    @austinhoag5130 6 หลายเดือนก่อน +1

    Helpful!

  • @suri4Musiq
    @suri4Musiq 2 หลายเดือนก่อน

    Loved it!

  • @NamTeGiac
    @NamTeGiac 7 วันที่ผ่านมา

    thank you

  • @SwikarP
    @SwikarP 6 หลายเดือนก่อน +6

    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?

    • @tryexponent
      @tryexponent  5 หลายเดือนก่อน +1

      Hey SwikarP! The tool used here is called "Whimsical"!

  • @SeriM-qc1qr
    @SeriM-qc1qr 5 หลายเดือนก่อน +2

    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

    • @sahugaurav0
      @sahugaurav0 5 หลายเดือนก่อน

      same question!!!!! let me know if u find it.

    • @tryexponent
      @tryexponent  5 หลายเดือนก่อน +1

      Hey! The tool used here is called "Whimsical"!

  • @ComfortChauke
    @ComfortChauke 7 หลายเดือนก่อน +6

    Which software is this, I am shopping for something to do those diagrams with

    • @tryexponent
      @tryexponent  7 หลายเดือนก่อน +5

      Hey ComfortChauke! This whiteboard software is "Whimsical". They've got a free version if you want to try it out!

  • @hungchau
    @hungchau 8 หลายเดือนก่อน +4

    She good. Hired!

  • @peterhorton9063
    @peterhorton9063 8 หลายเดือนก่อน +3

    Thx. Anyone know which tool she is using for the diagram?

  • @rja62b
    @rja62b 3 หลายเดือนก่อน +1

    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?

  • @prashantsalgaocar
    @prashantsalgaocar หลายเดือนก่อน

    The point to compromise on recommendations for lower latency in the recommendation service is this a TRADE OFF ? I believe we would be compromising quality of recommendations of the app to provide higher latency in the service. May be we should include that intelligence into the service to provide recommendations or stop polling and give a message to the end user once we reach the end or do not have a suitable match.

  • @DanielSummr
    @DanielSummr 19 วันที่ผ่านมา

    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.

  • @HighSky-lt5kn
    @HighSky-lt5kn 18 วันที่ผ่านมา

    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

  • @SacWebDeveloper
    @SacWebDeveloper 4 หลายเดือนก่อน

    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?

    • @martinomburajr.5905
      @martinomburajr.5905 3 หลายเดือนก่อน

      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,.

  • @dineshmohanty9229
    @dineshmohanty9229 หลายเดือนก่อน

    why cant we cache the recommendation input for the user similar to fb or twitter feed

  • @onlypersona
    @onlypersona 7 หลายเดือนก่อน +5

    Why she is explaining ERD using JSON? is it not effective, isn't it?

  • @mikeymop
    @mikeymop 8 หลายเดือนก่อน +7

    Does anyone know which web app is being used for her to whiteboard on?

    • @tryexponent
      @tryexponent  8 หลายเดือนก่อน +13

      Whimsical :) whimsical.com/ - it's free!

  • @SatyaPrakash-il2ed
    @SatyaPrakash-il2ed 6 หลายเดือนก่อน

    Can someone tell me what is the software she is using to write text and draw the design of the flow diagram.

    • @tryexponent
      @tryexponent  5 หลายเดือนก่อน

      Hey SatyaPrakash-il2ed! The whiteboard used is called "Whimsical"

  • @SkyLee91
    @SkyLee91 8 หลายเดือนก่อน +28

    How to get 1 billion matches per day while the active user per day is 1 million?

    • @stepanpelmegov5752
      @stepanpelmegov5752 8 หลายเดือนก่อน +11

      every user has 1000 matches per day

    • @shishir-kon
      @shishir-kon 8 หลายเดือนก่อน +20

      1-TO-MANY relationship

  • @ravingsofalunatic
    @ravingsofalunatic 4 หลายเดือนก่อน +2

    wouldn't it be better to ask questions about the functional and system requirements at the start rather just riffing off like that?

  • @ncherrytree
    @ncherrytree หลายเดือนก่อน

    What text/diagram editor do you use?

    • @tryexponent
      @tryexponent  หลายเดือนก่อน

      Hey ncherrytree! The diagram editor is a free whiteboard tool called "Whimsical"

  • @swapnilgt
    @swapnilgt 3 หลายเดือนก่อน

    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.

  • @nalinmathur6954
    @nalinmathur6954 3 หลายเดือนก่อน

    Why didn't she talk about how matching will work, how she will store likes in DB etc.

  • @LucianTugui
    @LucianTugui 12 วันที่ผ่านมา

    What tool is that?

    • @tryexponent
      @tryexponent  8 วันที่ผ่านมา +1

      Hey LucianTugui, if you are talking about the whiteboard tool, it's called "Whimsical"!

  • @greglambert6199
    @greglambert6199 6 หลายเดือนก่อน +1

    Well done but a little humorous to me a tik-tok employee didnt touch upon security.

  • @qutaibabs1
    @qutaibabs1 3 หลายเดือนก่อน

    name of the app she is using

    • @tryexponent
      @tryexponent  3 หลายเดือนก่อน

      The whiteboard app used here is called "Whimsical"!

  • @eduardoromao
    @eduardoromao 4 หลายเดือนก่อน

    A lot of errors and a lot of important system components design.
    It's must like simple request workflow