📝 Problem Description
Design a dating app like Tinder. Users swipe on profiles, get matched when mutual likes occur, and can message matches. Focus on location-based discovery, matching algorithm, and real-time notifications.
👤 Use Cases
1.
User wants to swipes right on profile so that like recorded, check for match
2.
User wants to swipes left so that profile skipped
3.
System wants to detects mutual like so that creates match, notifies both
4.
User wants to opens app so that sees nearby profiles to swipe
✅ Functional Requirements
- •Profile creation with photos
- •Location-based profile discovery
- •Swipe right (like) / left (pass)
- •Match on mutual likes
- •Match notification
- •Direct messaging with matches
- •Preference filters (age, distance, gender)
⚡ Non-Functional Requirements
- •Profile card load < 200ms
- •Match notification < 1 second
- •Support 50M daily active users
- •99.9% availability
⚠️ Constraints & Assumptions
- •Location must be up-to-date
- •Don't show already-swiped profiles
- •Limited daily swipes for free users
📊 Capacity Estimation
👥 Users
100M users, 50M DAU
💾 Storage
5TB (profiles), 50TB (photos)
⚡ QPS
Swipes: 50K/sec, Profile loads: 100K/sec
📐 Assumptions
- • 100M registered users
- • 50M daily active users
- • 100 swipes per user per day
- • 2% match rate
💡 Key Concepts
CRITICAL
Geo-based Discovery
Elasticsearch geo queries for nearby profiles within radius.
CRITICAL
Match Detection
Check if swipe-target already liked current user (Redis set lookup).
HIGH
Swipe Deduplication
Track swiped profiles to never show again.
MEDIUM
ELO-like Ranking
Rank profiles by attractiveness score for better matches.
💡 Interview Tips
- 💡Start with the matching algorithm and geospatial queries
- 💡Discuss the recommendation system for profile ordering
- 💡Emphasize real-time match notification
- 💡Be prepared to discuss fraud and safety features
- 💡Know the tradeoffs between pre-computed and on-demand discovery
- 💡Understand the business model impact on system design