Skip to Content

Design autocomplete ie typeahead suggestion functionality for a text search

Home | Coding Interviews | System Design | Design autocomplete ie typeahead suggestion functionality for a text search

Functional Requirements

1. As users type text in a search box, show the top 10 auto complete results with very low latency

2. Analytics will be collected on what the user types

Posted by Jamie Meyer 7 months ago

Related Problems

A video service (like youtube) has many viewers watching videos. Given a stream of the video IDs that are being watched, we need to find the top K most viewed videos for different periods of time (1 hour, 1 day, 1 month, all time). For the top K videos returned, we also want the count of views during this period.

Sending user notifications is a common requirement in system design. Design a notification service for an organization. The system will use shared services for the underlying messaging implementation (email, sms, push notifications, etc) so the actual messaging implementation does not need to be designed. The system should support a user publishing a notification to a single user or groups of users. Notifications can be triggered manually via a web UI or programmatically via an API. Users should be able to view their past notifications they published. If a user is unable to receive a notification, they should still receive it at the next opportunity and not miss the message. The notification service should scale to billions of notifications per day, with messages delivered within a few seconds, with five 9s uptime.

Design a service with the following functional requirements

1. Users should be able to upload and download files

2. The files should be able to be shared with other users

3. Changes to the files should be pushed to other users with the content on their machine

4. There must be no risk of file corruption

5. Keep track of different versions of the files so they may be rolled back

6. Users should be able to edit files without an internet connection and the changes sync up when a connection becomes available

Design a social network website with the following functional requirements

1. Users should be able to post content with text, images or video 2. Users should be able to follow other users 3. Each user will have a relatively low latency feed which shows content posted by users they follow