System Design: TINDER as a microservice architecture

preview_player
Показать описание
Looking to ace your next interview? Try this System Design video course! 🔥

We design the system architecture of Tinder. Designing these apps starts with clarifying the system requirements. In an interview, Tinder has multiple requirements.

When designing the system, we will be drawing logical components and defining their interactions with other services based on the microservice architecture. We assume that any internal details can be handled with our prior knowledge of system design concepts. This includes load balancing, message queues, databases, etc...

The Tinder system has four requirements: storing profiles, recommendations, noting matches and chatting with matches. Storing profiles is trivial except for the image storage, where we argue on BLOB vs File storage. The distributed file architecture seems best when storing images.

Direct Messaging or chatting with matches can be done using the XMPP protocol, which uses web sockets to have peer-to-peer communications between client and server. Each connection is built over TCP, ensuring that the connection is maintained. The session microservice can send messages to the receiver based on connection to user mappings.

Our system is decoupled as much as possible. We try to maintain accept and reject information on the client. On swiping left or right, the client can note the action and avoid showing the same user again, perhaps using bloom filters.

The server has a validation engine called the matcher microservice, which notes matches and allows or disallows chat between two users.

The final requirement of recommendations needs city-wise partitioning of the user data. This is achieved using NoSQL databases like Cassandra or Amazon Dynamo. The other option is to use relational databases with horizontal partitioning. The concept is now referred to as sharding.

If you have any doubts, suggestions, or feedback, I love to hear them below. This system is by no means complete, but it is enough for an hour-long interview.

Disclaimer: The video does not contain or suggest the internal implementation of Tinder. The system we design is purely imaginary and has no links with the real app. I am sure the engineers at Tinder have done better than this!

00:00 Prerequisites
00:40 Picking features
05:50 Storing images
12:30 System Design
18:22 Direct messaging for chat
23:45 Matching algorithm
27:16 Recommendation Engine
34:40 Final pointers

CDN -

Consistent Hashing -

System Design Playlist -

You can follow me on:

#SystemDesign #SoftwareInterview #Tinder
Рекомендации по теме
Комментарии
Автор

dude!!!! This is how colleges are supposed to teach. Why am I learning more on youtube than my $40k degree has ever presented to me 😭😭 You are awesome

abdoulbarry
Автор

Its inevitable that this channel will be successful. You got the goods man. Intelligence, eloquence, and the positive energy. Thankful for your work, will definitely pass the channel along

victortrevino
Автор

I can watch your series on System Design with more interest than most of the web series coming these days. Please keep up the good work!

arjungupta
Автор

Engineering universities need this kind of real world problem solving exercises like your videos, I'm even surprised that I'm learning from this for free.

davidsandovalrios
Автор

"if your interviewer gets too deep into cryptography [grin] best of luck" haha that was awesome lol! keep up the great videos!

lc.uclakers
Автор

The ear to ear grin when he talks about getting matches, makes this video more interesting

AkshaySharma
Автор

Hey guys!
This video is my attempt at designing Tinder. Points to keep in mind are: clarify requirements, design the basic system, modify per feature, use concepts learnt earlier to meet requirements.

Cheers!

gkcs
Автор

One thing to remember about databases are they aren't storage wise different from files. What a database provides you is multi user concurrent access without corrupting your data and acid aspects. In theory there's hardly a case where you'd put a big blob in your database. Most often just use paths to big files and keep those paths in the database table. The paths could be on an NFS or whatever distributed file system there is. Your NFS can then deal with geolocation etc. You could create read only mount points across multiple geographical locations for the same file. I'm just leaving this here for anyone to discuss these points further with me. Great video btw!

anamigator
Автор

I appreciate the content from all the Youtubers out there helping us with System Design and DS&A but I have to say, I feel like a lot of the younger ones are just doing it for monetization or popularity. Your enthusiasm really sets you apart man. Good job finding something you enjoy doing. You seem like a good dude.

adamberry
Автор

17:48 - A good use case for an image service would be when you need to send different resolutions or sizes depending on the client (e.g. mobile, desktop, print etc.)

praveensg
Автор

Not only the content is of high quality, ur passion and energy make this even better. Really like ur videos!

Jacob-cgfd
Автор

This playlist should be a series on Netflix :P

mrrobot
Автор

Absolutely love the video! I don't know when will I use these concepts but just getting to learn about it is itself an experience. Hands down the best tutor!!!

pallavisingh
Автор

if a developer can't get matches on tinder, he creates own tinder. ;) - I just want to say thank you for your hard work. Very useful content. Keep up the good work.

MilMike
Автор

you really deserve the appreciation !
i never ever saw a person discussing these complex concepts on youtube in a simple and fast way.

talharafique
Автор

I am SO happy I found this channel! I'm watching this content like a Netflix binge watch!

melikagolkaram
Автор

Thank you very much for this video.Its really amazing. I know you approached this video more from an interview perspective so you can only touch on high level points, but please think of making a series about each service so that we know how the real world implementation works and how we need to approach it at a more detailed level. I liked the BLOB vs FILE talk. Keep up the good work.

callnishanth
Автор

Gaurav, your channel is a gold mine. What an amazing engineer you are, thank you for your content!.

nahuelalberti
Автор

As usual, great video! I started watching your videos to get ready for interviews, but I keep watching your channel just because I love how much a learn in such short videos. Thanks for sharing your awesome work :)

vivianbezerradesathiebaut
Автор

Love your video! feeling a bit dedddd at 5am, but your enthusiasm at 18:20 immediately lights me up lol .Good job man! And thank you for such good content and detailed explanation.

michelledai