Bird
Raised Fist0
HLDsystem_design~20 mins

Video recommendation system in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Video Recommendation System Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Identify the correct high-level architecture for a video recommendation system

Which of the following diagrams best represents a scalable high-level architecture for a video recommendation system that handles millions of users and videos?

AUser requests → Load Balancer → Cache → Recommendation Service → Video Metadata DB → User
BUser requests → Cache → Load Balancer → Recommendation Service → Video Metadata DB → User
CUser requests → Recommendation Service → Load Balancer → Cache → Video Metadata DB → User
DUser requests → Load Balancer → Recommendation Service → Video Metadata DB → Cache → User
Attempts:
2 left
💡 Hint

Think about the order of components to optimize latency and scalability.

scaling
intermediate
2:00remaining
Estimate the capacity needed for the recommendation service

A video recommendation system expects 10 million daily active users, each making 20 recommendation requests per day. Each request requires 200ms of CPU time on the recommendation service. How many recommendation service instances are needed to handle peak load assuming 10% of daily requests happen in the busiest hour and each instance can handle 50 requests per second?

A400 instances
B800 instances
C1600 instances
D200 instances
Attempts:
2 left
💡 Hint

Calculate total requests in peak hour, then divide by requests per instance per second and seconds in an hour.

tradeoff
advanced
2:00remaining
Choose the best data storage for user watch history

Which storage option is best suited for storing user watch history to support fast personalized recommendations in a video recommendation system?

ARelational database with normalized tables
BDistributed key-value store with TTL (time-to-live)
CDistributed graph database
DFlat files stored on a network file system
Attempts:
2 left
💡 Hint

Consider the relationships between users and videos and the need for fast traversal.

🧠 Conceptual
advanced
2:00remaining
Identify the main challenge in real-time recommendation updates

What is the primary challenge when updating recommendations in real-time as users watch videos in a large-scale video recommendation system?

AUsing batch processing to update recommendations once a day
BStoring all user data in a single database for consistency
CAvoiding any caching to always serve fresh data
DEnsuring low latency while processing large volumes of streaming data
Attempts:
2 left
💡 Hint

Think about the balance between speed and data volume.

component
expert
3:00remaining
Determine the correct request flow for personalized video recommendations

Given a video recommendation system with components: User Interface (UI), API Gateway, Recommendation Engine, User Profile Store, Video Metadata Store, and Cache, what is the correct sequence of steps when a user requests personalized recommendations?

A1,3,2,4,5,6,7
B1,2,3,4,5,6,7
C1,2,4,3,5,6,7
D1,2,3,5,4,6,7
Attempts:
2 left
💡 Hint

Consider the logical order of request handling and cache usage.