Design a Product Review Aggregation and Star Rating Service
Last updated: November 29, 2026
Quick Overview
Design the service that accepts customer reviews, moderates them, and serves the average star rating, rating histogram, and paginated reviews on every product page.
Amazon
November 29, 20260
0
0 solved
Design the service that accepts customer reviews, moderates them, and serves the average star rating, rating histogram, and paginated reviews on every product page.
Reviews appear on every Amazon product page, so the read path is enormous while writes are modest and need moderation. The interviewer checks read and write separation, how you keep aggregates consistent, and how abuse detection fits into the pipeline.
What the Interviewer Expects
- Write path with asynchronous moderation
- Precomputed aggregates rather than computing averages per request
- Sort orders such as most helpful and most recent
- Helpful-vote counting at high volume
- Handling review edits and deletions in aggregates
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How would you support reviews shared across product variations (sizes, colors)?
- How do you rank the 'top reviews' shown first?
- How do you handle a sudden flood of fake reviews on one product?
- How would you support searching within reviews?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: submit, edit, and delete a review (rating 1 to 5, text, images); moderation before publish; product page shows average, count, histogram, top reviews, and paginated lists by recency or...
High-Level Design
- Review Write API stores the review in a Reviews table keyed by
review_idwith statusPENDINGand emits an event. - Moderation Pipeline: automated checks (profanity, spam classifier, ...