List the key functional requirements for the system (Ask the AI for hints if stuck)...
List the key non-functional requirements (performance, scalability, reliability, etc.)...
Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
update count: POST count (accepts positive integer only)
view count: GET count
/count)/count{ "videoId": "string", // The ID of the video being watched "increment": 1 // Positive integer value to increment}{ "success": true, "newCount": integer // The updated view count after increment}/count/{videoId})/count/{videoId}{ "videoId": "string", "currentCount": integer // The current view count}Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
For DB we will use simple key value store, as its good for high write and read throughput. Consistency is not a big dealbreaker here.
This architecture is designed for high scalability and allows you to maintain eventual consistency, as specified in your requirements.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.
How we will scale this: