Design Restaurant Search and Monitoring
Company: Uber
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design the search component for a food delivery application.
Users should be able to search for restaurants and menu items by text query, for example `pizza`, `sushi`, or `vegan burger`. Search results should consider relevance, restaurant availability, delivery distance, estimated delivery time, ratings, promotions, and business constraints.
Your design should cover:
1. User-facing search APIs.
2. Data ingestion for restaurants, menus, availability, pricing, ratings, and promotions.
3. Indexing and retrieval architecture.
4. Ranking strategy.
5. Handling real-time updates, such as a restaurant closing, an item going out of stock, or a price changing.
6. Scaling, caching, and fault tolerance.
7. A metric monitoring system for search quality, reliability, latency, and business impact.
8. Follow-up trade-offs, such as freshness versus latency, exact matching versus semantic matching, and online ranking versus precomputed ranking.
Quick Answer: This question evaluates system design competency for building a large-scale, real-time search and ranking service for a food delivery platform, including indexing, retrieval, ranking, data ingestion, freshness handling, scalability, caching, and monitoring.