Interview with a FAANG engineer.

Design a Dating Application

Watch someone solve the the problem: design a dating application (medium) problem in an interview with a FAANG engineer and see the feedback their interviewer left them. Explore this problem and others in our library of interview replays.

Design a Dating Application: Node.js Interview with a FAANG Engineer - YouTube

Interview Summary

Problem type
The Problem: Design a Dating Application (Medium)

Interview question
Design an architecture for a dating application where users can log in and see other nearby users. The system needs to handle user authentication, profile management, location-based queries, and scale to support 1 million daily active users. Key considerations include database schema design, API endpoint structure, and performance optimization strategies.

Interview Feedback

Feedback about Green Stingray (the interviewee)

Advance this person to the next round?
No
How were their technical skills?
3/4
How was their problem solving ability?
2/4
What about their communication ability?
4/4

Strengths:

Areas for improvement:

Advice:

Keep up the good work!

Feedback about General Centurion (the interviewer)

Would you want to work with this person?
Yes
How excited would you be to work with them?
4/4
How good were the questions?
3/4
How helpful was your interviewer in guiding you to the solution(s)?
4/4

The interview was a fantastic experience, I appreciated the feedback segment at the end.
I don't really have any constructive criticism, maybe I felt a lack of direction in some parts of the interview but I suppose the intention was to see which direction I naturally headed towards.

Interview Transcript

Green Stingray: Hello!
General Centurion: Oh, hello! Hi, how are you doing? Good, good.
Green Stingray: How about you?
General Centurion: I'm doing great, thanks for asking.
Green Stingray: Awesome, awesome. Well, okay, we've got about an hour. Let's see, just— I think we spend like about a minute each on intros, just give some background info, and then the vast majority of the time— that'll help me. I'm also understanding decide how to kind of give the interview. And let's have you start and kind of tell me a bit about what you're looking for from the interview.
General Centurion: Mm-hmm. Yeah. Awesome. So I'm applying for a front-end role. I'm looking for— I, I just got past the screening phase, so now I have my onsite. It's gonna be scheduled maybe in about 1 or 2 weeks. I've not done a system design interview before. So this is new territory for me. I just read a book, a system design interview book by Alex Xu. I'm just looking for pretty much anything at this point would be very helpful, I think, just an experience of what these interviews are supposed to be kind of like, what to expect from it, and then what to expect when I go into the real interview, you know.
Green Stingray: That makes sense. Okay. Interesting that they're having you do a system design with a frontend role. Okay.
General Centurion: Hey, yeah. Yeah.
Green Stingray: That, that's tricky. Okay. Um, so from my background, let's see, I've been at a bunch of different tech companies. I've been at [REDACTED], um, a crypto startup, uh, [REDACTED] and [REDACTED]. Um, so kind of been all over the place. Um, and mostly been backend focused, um, but done full stack work as well at various places.
General Centurion: Mm-hmm.
Green Stingray: Um, as needed. Um, okay. So let's see. So best thing, what areas are you most familiar with? Like as, as far as Backend systems?
General Centurion: What kind of— So I'm working on, I'm almost finished, I'm almost going in for the [REDACTED] exam, so everything covered there pretty much. So I guess like load balancers, having multiple instances, edge locations, content distribution network.
Green Stingray: Okay, okay, okay, cool. So the building blocks you're familiar with a bit. Okay, let's try this one since, um, mm, okay, I'll just try this and see and then we can iterate. So the basic idea here is, so, design an architecting dating application where users can log in and see other nearby users.
General Centurion: Awesome. Okay, so let me think about this for a second. So I can, I can just type here, right?
Green Stingray: Okay, so— and there's also a whiteboard in the bottom left we can toggle.
General Centurion: Oh, awesome. Okay, that's even better. Let me just read that again. Um, okay. So, yep, looks good. Okay, let me think about this for a second. The way I like to see this, the way I like to start off, is I like to look through all the keywords in here.
Green Stingray: That makes sense.
General Centurion: Yeah, so dating application, users can log in and see nearby users So there's going to be a couple of requirements here right off the bat. One is going to be for the dating application. Let me write this down. We're going to need some kind of matching algorithm, perhaps.
Green Stingray: Mm-hmm.
General Centurion: For the login system, we're going to need authentication, maybe authentication Yeah, obviously some authorization as well.
Green Stingray: Are you typing this where I can see it? Might as well type it in the main.txt.
General Centurion: In this main— Oh, instead of doing it on the whiteboard?
Green Stingray: Oh, oh, sorry.
General Centurion: Oh, I just—
Green Stingray: Oh, this is great. Oh, yeah, love it. OK, yes.
General Centurion: OK, thanks. OK.
Green Stingray: Awesome.
General Centurion: And then the nearby users, so we're going to have to have some kind of geo proximity. Location microservice of some sort.
Green Stingray: Yeah, oh, got that. Yep, yep, yep.
General Centurion: Okay, um, now that we've got the starting point, let's think a little harder. Let's think on the matching.
Green Stingray: Um, I'd say go simple. And instead of matching, we could also imagine— like, that sounds— that could be quite complicated. So initially, let's imagine just having some sort of like user profiles.
General Centurion: Okay, cool, cool. So matching algorithm, just not really. We don't really have to get into the algorithm.
Green Stingray: That's— we could, we could, but that— let's, let's save that for one of the last things if we have the time.
General Centurion: Cool. Um, some other things to think about. Let me just, let me just almost like brainstorm, just write things down. Um, maybe traffic handling. What are the limitations of this, or what are the minimum requirements? How many users are we going to be getting?
Green Stingray: Um, what would you think?
General Centurion: Probably, um, say for a very popular one, you could have like millions of users on a per-week basis for something like Tinder or something.
Green Stingray: Yeah, let's say we're not that big, but let's say we want to handle at least like, um, like, uh, let's say 1 million active, 1 million daily active users.
General Centurion: Okay, that's quite a lot. Um, Okay, so traffic. So traffic is going to be something we definitely have to consider. Probably going to have to split up the backend a bit. Maybe some load balancers and whatnot. We got to think about database. How to database sharding. Stuff like this. What else? And then on the more of the frontend side, we're going to have to have some kind of content distribution network to provide all these static stuff like, you know, images and whatnot.
Green Stingray: That's a good point. Yeah, you want to put those in the CDN.


Topic Specific Technical Content
From this point, the dialogue continues in-depth, covering aspects of system design, where components like load balancing, databases, and caching mechanisms are discussed extensively, including API calls and user interactions.


Key Considerations for System Design

  1. User Authentication: Ensure secure sign-up and log-in processes with data validation and storage.
  2. Database Schema: Choose between relational and document databases based on requirements.
  3. Caching Layer: Implement caching mechanisms for frequently accessed data.
  4. Load Balancing: Design for scalability with multiple server instances.
  5. Rate Limiting: Protect against excessive requests from users.
  6. Data Consistency: Manage how and when data updates propagate through the system.
  7. Latency: Minimize response times for user actions, such as swiping or messaging.

Technical Notes


Conclusion
Designing a dating application involves understanding user needs, system requirements, and ensuring a scalable architecture that can handle growth and high demand.