0
0
LLDsystem_design~20 mins

Rating and review system in LLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Rating and Review System Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Design components for a scalable rating and review system

Which of the following component sets best supports a scalable rating and review system that handles millions of users submitting reviews and ratings concurrently?

ASingle web server, relational database, no caching, direct database writes
BLoad balancer, API servers, relational database, caching layer, message queue, search engine
CLoad balancer, API servers, flat file storage, no caching, no message queue
DSingle web server, NoSQL database, no caching, no message queue
Attempts:
2 left
💡 Hint

Think about components that help with high traffic, fast reads, and asynchronous processing.

scaling
intermediate
2:00remaining
Handling sudden spikes in review submissions

During a product launch, the system experiences a sudden spike in review submissions. Which approach best helps maintain system stability?

AReject all new review submissions until the spike ends
BDirectly write all reviews synchronously to the database without any queueing
CUse a message queue to buffer incoming reviews and process them asynchronously
DStore reviews only in cache without persisting to the database
Attempts:
2 left
💡 Hint

Think about how to handle bursts without overwhelming the database.

tradeoff
advanced
2:00remaining
Choosing database type for storing reviews and ratings

Which database choice best balances consistency, scalability, and query flexibility for a rating and review system?

ARelational database with strong consistency and support for complex queries
BNoSQL document store with eventual consistency and flexible schema
CIn-memory key-value store without persistence
DFlat file storage on a single server
Attempts:
2 left
💡 Hint

Consider the need for accurate ratings and complex queries like filtering and sorting reviews.

🧠 Conceptual
advanced
2:00remaining
Ensuring data integrity in concurrent review submissions

What mechanism best prevents race conditions when multiple users submit or update reviews for the same product simultaneously?

AUse optimistic concurrency control with version numbers or timestamps
BLock the entire database during every review submission
CAllow all writes without any concurrency control and overwrite data
DStore reviews only in cache without synchronization
Attempts:
2 left
💡 Hint

Think about a method that detects conflicts without blocking all users.

estimation
expert
2:00remaining
Estimating storage needs for a rating and review system

Estimate the approximate storage needed per year if the system expects 10 million new reviews annually, each review averaging 1 KB, and ratings stored separately averaging 100 bytes each. Assume each review has one rating.

AApproximately 100 MB per year
BApproximately 1.1 TB per year
CApproximately 110 GB per year
DApproximately 11 GB per year
Attempts:
2 left
💡 Hint

Calculate total size by adding review and rating sizes multiplied by number of reviews.