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 micro service 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 micro service, which notes matches and allows or disallows chat between two users.

The final requirement of recommendations needs city wise partitioning on 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 refered 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!

Looking to ace your next interview? Try this System Design video course! 🔥
https://get.interviewready.io

Along with video lectures, this course has architecture diagrams, capacity planning, API contracts and evaluation tests. It’s a complete package.

Use the coupon code ‘earlybird’ for a 20% discount!

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

Tinder Design Blog: https://get.interviewready.io/blog/tinder-system-design
System Design Playlist –
https://www.youtube.com/playlist?list=PLMCXHnjXnTnvo6alSjVkgxV-VH6EPyvoX

CDN –
https://youtu.be/8zX0rue2Hic
https://www.akamai.com/us/en/resources/content-distribution-network.jsp
https://en.wikipedia.org/wiki/Content_delivery_network

Consistent Hashing –
https://youtu.be/zaRkONvyGr8

You can follow me on:
LinkedIn: https://www.linkedin.com/in/gaurav-sen-56b6a941/
Instagram: https://www.instagram.com/applepie404/
Quora: https://www.quora.com/profile/Gaurav-Sen-6
Twitter: https://twitter.com/gkcs_

#system-design #software #interview #tinder

source