Design a rating and review system for individual food items

Read the full interview experience this question came from →

Quick Overview

Design a rating and review system for individual food items, covering who may leave a review, how reviews are stored, moderated and displayed, and how each item's rating stays current. It tests write and read paths, precomputed aggregates, caching, pagination and scaling for heavily viewed menu pages.

Design a rating and review system for individual food items

Company: DoorDash

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

Design a system that lets customers rate and review individual food items, such as the dishes on a restaurant's menu, and shows those ratings and reviews to other customers who are browsing the items. The report gives only the name of the problem, so scope, scale and review policies are open: settle them with the interviewer before designing. ```hint Who may review Think about which record proves that a customer actually received the item, and how the review service can check it without slowing every submission. ``` ```hint Precompute the read Menu pages show an item's rating far more often than anyone writes a review; consider what you would store so that a page never computes an average on the fly. ``` ### Clarifying Questions - May only customers who ordered and received the item review it, and for how long after delivery? - Is a review a star rating, text, photos, or any combination, and can a customer review the same item again after a later order? - How many items, orders and reviews per day are there, and how often is a rating displayed? - How fresh must an item's rating be after a new review, and can reviews be edited or deleted? - What moderation is required, and can restaurants respond to reviews? - When the same dish is sold by many locations of a chain, or a menu item is renamed, which ratings count? ### What a Strong Answer Covers - Requirements, review policy and scale estimates agreed before the design - APIs and a data model for reviews and per-item rating aggregates - A write path that verifies eligibility and is idempotent against double submission - Aggregates kept current incrementally, correct under edits and deletes, and reconciled - A read path built on caching and batch reads for menu pages, with cursor pagination for review lists - Moderation, fake-review defenses, failure handling and monitoring ### Follow-up Questions - A menu item is renamed or its recipe changes. Do the old reviews still count? - How do you rank reviews so that the most useful appear first? - How would you detect a restaurant posting fake reviews of its own dishes? - How do you show a sensible rating for an item that has only two reviews?

Overview: Design a rating and review system for individual food items, covering who may leave a review, how reviews are stored, moderated and displayed, and how each item's rating stays current. It tests write and read paths, precomputed aggregates, caching, pagination and scaling for heavily viewed menu pages.

Read the full DoorDash Software Engineer interview experience this question came from

DoorDash logo
DoorDash
Oct 28, 2026
mediumSoftware EngineerOnsiteSystem Design
0
0

Design a system that lets customers rate and review individual food items, such as the dishes on a restaurant's menu, and shows those ratings and reviews to other customers who are browsing the items. The report gives only the name of the problem, so scope, scale and review policies are open: settle them with the interviewer before designing.

Clarifying Questions Guidance

  • May only customers who ordered and received the item review it, and for how long after delivery?
  • Is a review a star rating, text, photos, or any combination, and can a customer review the same item again after a later order?
  • How many items, orders and reviews per day are there, and how often is a rating displayed?
  • How fresh must an item's rating be after a new review, and can reviews be edited or deleted?
  • What moderation is required, and can restaurants respond to reviews?
  • When the same dish is sold by many locations of a chain, or a menu item is renamed, which ratings count?

What a Strong Answer Covers Guidance

  • Requirements, review policy and scale estimates agreed before the design
  • APIs and a data model for reviews and per-item rating aggregates
  • A write path that verifies eligibility and is idempotent against double submission
  • Aggregates kept current incrementally, correct under edits and deletes, and reconciled
  • A read path built on caching and batch reads for menu pages, with cursor pagination for review lists
  • Moderation, fake-review defenses, failure handling and monitoring

Follow-up Questions Guidance

  • A menu item is renamed or its recipe changes. Do the old reviews still count?
  • How do you rank reviews so that the most useful appear first?
  • How would you detect a restaurant posting fake reviews of its own dishes?
  • How do you show a sensible rating for an item that has only two reviews?