Moloco·Software Engineer·Onsite - System Design / Architecture
- Design a large-scale autocomplete service that returns the top 5 query suggestions within 100ms as a user types, ranked by popularity and recent trends.
- How would you design the API for an autocomplete service, and what does the data model look like underneath it?
- How would you handle sharding and hot prefixes in a high-traffic autocomplete system?
- Walk through your cache design for this system, including what you cache, at what layer, and how you handle invalidation.
- Describe the offline and online pipelines you'd build to keep autocomplete suggestions fresh and updated from new search logs.
“This is a meaty one and I underestimated how many sub-problems were hiding inside it.”