Design Tinder

What are all possible Features

  • User creates a profile

  • login and authentication

  • feed or recommendations of other user profiles

  • User can swipe left, swipe right, or super like

  • It's a match only if both swipe right

    • After match, conversation needs to be started within 24 hours to remain connected

    • Only female can initiate the conversation

  • option to message

    • text messages

    • share images / videos over messsages

    • Monitoring of type of messages / vulgarity

  • Option to unmatch user

  • Push notification (in case of a match and inactive)

  • buy premium subscription, and get additional features

  • payment system

  • user settings: filters basis geography, age and others

Narrowing down the problem statement

Functional Requirements

  • User profile creation, and setting for recommendations

  • Get other user profile recommendations

  • Options to swipe right and left, and get a match

  • non-premium account get limited number of swipes

Non Function Requirements

  • Scalability

  • low latency

  • read-heavy app

  • security - DDOS attack handling / rate limiter

Understanding the Scale

Traffic

  • Total number of users = 50 Million

  • Number of daily active users (DAU) = 1 Million DAU

  • Number of new profiles created every day = 500 Thousand

  • Total number of swipe every day = 100 * 1 Million = 1 Billion per day

  • Total number of matches per day = 10 Million per day

Storage Requirements

  • For images = 200 kb * 6 images per user * 50 Million users = 600 TB

Data Model

Swipe transaction
Swipe Data

user_id

user_id

user_id

basic details

recomm_profile_user_id

date

image folder url

date time

total swipe count

enum(right swipe)

right/left/super

right swipe count

enum(left swipe)

super swipe count

enum (matches)

user type (basic / prem)

preferences {location, age range, gender (m,f,both)}

System Design

Design Considerations

Building Microservices

  • Recommendation Engine

    • Based on current preference filters

    • Only those which have not been swiped right or left in past

    • Only active users (example: who have been active in last 5 days)

    • Show less profiles to those getting a lot of matches

    • Collaborative grouping

    • Do you reply or not

    • full text similarity between profiles

Design Diagram

Resources

Last updated

Was this helpful?