Design Uber Eats Restaurant Feed Backend
Difficulty: MEDIUMCategory: HLDFrequency: 1Asked On 2024-10-19
Problem Statement
Design a backend system that serves the personalized, real-time restaurant feed to users of a food delivery platform like Uber Eats. The feed should dynamically show nearby restaurants based on:
•User location
•Availability
•Restaurant operating hours
•Delivery range
•Promotions
•Cuisine preferences
•Historical behavior (e.g., previous orders, favorites)
The system must support millions of users across cities and deliver responses in low latency with high availability.
🎯 Functional Requirements:
1.Dynamic Feed Generation
•Restaurants near the user (geolocation-based)
•Sorted by relevance (distance, rating, delivery time, etc.)
•Support for infinite scroll or pagination
2.Filtering & Sorting
•Cuisine, rating, offers, vegetarian-only, delivery time, etc.
3.Personalization
•Use user order history, preferences, favorites to rank restaurants
4.Real-time Availability
•Exclude restaurants that are closed or not delivering in real time
5.Promotions
•Show personalized or location-based promotions/discounts
6.Search Integration
•Support querying by name, dish, cuisine, etc.
⚙️ Non-Functional Requirements:
•Sub-200ms API latency for feed requests
•Horizontally scalable to support millions of concurrent users
•Fault-tolerant with fallback mechanisms
•Consistent user experience across platforms (mobile, web)
•Geo-distributed architecture for low latency