Loading...
Loading...
Design a location-based dating platform similar to Tinder, where users can create profiles, specify their preferences, discover potential matches nearby, and express interest by swiping right or left. The system should generate a stack of candidate profiles that satisfy the user's preferences and geographic distance constraints.
The central challenge is efficiently discovering eligible profiles while maintaining consistent swipe and matching behavior. Users should be able to browse potential matches based on their preferred age range, interests, and maximum distance from their current location. The system must also avoid recommending profiles that a user has already swiped on.
Users interact with candidate profiles one at a time. Swiping right indicates interest, while swiping left indicates that the user wants to pass. When two users have both swiped right on each other, the system must recognize the mutual interest and generate a match notification. Strong consistency is required so that concurrent or closely timed swipes do not cause valid mutual matches to be missed.
The platform must support approximately 20 million daily active users, with each user performing an average of 100 swipes per day. Candidate profile stacks should load within 300 milliseconds, making low-latency profile retrieval and efficient filtering important to the user experience.
The design focuses on profile creation, location-based candidate discovery, swipe processing, and mutual match notifications. Profile picture uploads, direct messaging after matching, super swipes, premium purchases, fake-profile detection, and detailed monitoring infrastructure are outside the scope.
User Profiles and Preferences: Users can create profiles and configure matching preferences, including age range, interests, and maximum distance from their current location.
Potential Match Discovery: Users can retrieve a stack of potential matches that satisfy their configured preferences and geographic distance constraints. The system must exclude profiles that the user has previously swiped on.
Swipe Processing: Users can swipe right to express interest or swipe left to pass on individual profiles. The system must record these decisions so previously swiped profiles are not shown again.
Mutual Match Detection and Notification: When two users have both swiped right on each other's profiles, the system must recognize the mutual match and notify the users. Matching behavior must remain consistent even when the two swipes occur close together.
Strong Swipe Consistency: Swipe processing must preserve mutual matching correctness. If a user swipes right on someone who has already swiped right on them, the system must recognize the match and generate a notification.
Low-Latency Candidate Retrieval: Load the stack of potential matches within 300 milliseconds.
Scalability: Support approximately 20 million daily active users, with each user performing an average of 100 swipes per day.
Previously Swiped Profile Exclusion: Ensure that users are not shown profiles they have already swiped on, regardless of whether the previous decision was a right or left swipe.