Design a rate limiter
Functional Requirements
The ability to set limits on the number of requests allowed within a specific timeframe
Keep performance and fault tolerance in mind
Related Problems
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.
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
Functional Requirements
Users should be able to query plaintext documents (the twitter posts for this example)
Keep reliability and latency in mind
Functional Requirements:
1. Users can upload videos
2. Users can view videos
3. Search videos by video title
4. Videos should have like and view counts
5. Users can comment on videos