Design a Food Review System With Restaurant Ratings for a Delivery App

Quick Overview

Design a food review system for a food delivery platform where customers rate restaurants and dishes after ordering and others read reviews and overall ratings. Tests APIs, data modeling, review eligibility, keeping rating summaries correct under edits and retries, read-heavy scaling, and defending a SQL or NoSQL choice.

Design a Food Review System With Restaurant Ratings for a Delivery App

Company: DoorDash

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

Design a food review system for a food delivery platform. Customers rate and review restaurants and the dishes they ordered, and other customers read those reviews and each restaurant's overall rating while deciding where to order. The interviewer follows the design with a question about the database choice. ### Clarifying Questions - What can be reviewed: the restaurant, individual dishes, the delivery, or several of these? - Can only a customer with a completed order write a review, and for how long after delivery? - Can a review be edited or deleted later, and must the restaurant's rating reflect that? - How soon after submission must a review appear, and how fresh must the overall rating be? - Do reviews include photos, and do they go through moderation before they are shown? - How many orders, reviews and restaurant page views are there per day? ### Part 1: Design the review system Design the system end to end: the APIs, the data model, the write path for submitting a review, the read path for a restaurant page that shows its rating and its reviews, and how the design scales. ```hint Two different reads A restaurant page shows a rating summary on every view, but customers read the review text far less often. Decide whether both should come from the same place. ``` #### What This Part Should Cover - APIs and a data model for reviews and per-restaurant rating summaries. - The write path, including eligibility checks and duplicate submissions. - The read path: pagination and sort order for reviews, and how the rating summary is computed and cached. - Scaling for read-heavy traffic and for very popular restaurants. ### Part 2: SQL or NoSQL Which database would you use, SQL or NoSQL? Pick a store for each kind of data in your design and defend the choice with this system's access patterns, write volume and consistency needs. Say which guarantees you rely on and for which operations, and what you would give up with the other option. ```hint List what must change together When a review is submitted, list every record that changes and decide which of those changes must succeed or fail as one unit. ``` #### What This Part Should Cover - The access patterns for each data set (by restaurant, by customer, by order). - Which invariants need transactions or uniqueness, and which can be eventually consistent. - How the choice scales: partitioning, hot restaurants, and read replicas or caches. - A fair comparison with the alternative store. ### What a Strong Answer Covers - Review rules enforced by the design: one review per eligible order, with edits and deletions reflected in the rating. - A rating summary that stays correct under concurrent reviews and retries and is not recomputed on every page view. - A read path sized for traffic far heavier than writes. - A storage choice justified by the operations in this design, naming the invariant each guarantee protects. - Moderation and abuse handling, such as fake or coordinated reviews. ### Follow-up Questions - A restaurant's rating jumps after a burst of suspicious five-star reviews. How do you detect it, and what happens to the rating while you investigate? - How would you choose which reviews appear first on a restaurant page? - A customer edits a five-star review down to one star. Walk through how the stored rating and every cached copy get updated. - How would you add photos to reviews?

Overview: Design a food review system for a food delivery platform where customers rate restaurants and dishes after ordering and others read reviews and overall ratings. Tests APIs, data modeling, review eligibility, keeping rating summaries correct under edits and retries, read-heavy scaling, and defending a SQL or NoSQL choice.

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

DoorDash logo
DoorDash
Nov 15, 2026
hardSoftware EngineerOnsiteSystem Design
1
0

Design a food review system for a food delivery platform. Customers rate and review restaurants and the dishes they ordered, and other customers read those reviews and each restaurant's overall rating while deciding where to order. The interviewer follows the design with a question about the database choice.

Clarifying Questions Guidance

  • What can be reviewed: the restaurant, individual dishes, the delivery, or several of these?
  • Can only a customer with a completed order write a review, and for how long after delivery?
  • Can a review be edited or deleted later, and must the restaurant's rating reflect that?
  • How soon after submission must a review appear, and how fresh must the overall rating be?
  • Do reviews include photos, and do they go through moderation before they are shown?
  • How many orders, reviews and restaurant page views are there per day?

Part 1: Design the review system

Design the system end to end: the APIs, the data model, the write path for submitting a review, the read path for a restaurant page that shows its rating and its reviews, and how the design scales.

What This Part Should Cover Guidance

  • APIs and a data model for reviews and per-restaurant rating summaries.
  • The write path, including eligibility checks and duplicate submissions.
  • The read path: pagination and sort order for reviews, and how the rating summary is computed and cached.
  • Scaling for read-heavy traffic and for very popular restaurants.

Part 2: SQL or NoSQL

Which database would you use, SQL or NoSQL? Pick a store for each kind of data in your design and defend the choice with this system's access patterns, write volume and consistency needs. Say which guarantees you rely on and for which operations, and what you would give up with the other option.

What This Part Should Cover Guidance

  • The access patterns for each data set (by restaurant, by customer, by order).
  • Which invariants need transactions or uniqueness, and which can be eventually consistent.
  • How the choice scales: partitioning, hot restaurants, and read replicas or caches.
  • A fair comparison with the alternative store.

What a Strong Answer Covers Guidance

  • Review rules enforced by the design: one review per eligible order, with edits and deletions reflected in the rating.
  • A rating summary that stays correct under concurrent reviews and retries and is not recomputed on every page view.
  • A read path sized for traffic far heavier than writes.
  • A storage choice justified by the operations in this design, naming the invariant each guarantee protects.
  • Moderation and abuse handling, such as fake or coordinated reviews.

Follow-up Questions Guidance

  • A restaurant's rating jumps after a burst of suspicious five-star reviews. How do you detect it, and what happens to the rating while you investigate?
  • How would you choose which reviews appear first on a restaurant page?
  • A customer edits a five-star review down to one star. Walk through how the stored rating and every cached copy get updated.
  • How would you add photos to reviews?