Design review system with voting and rewards
Company: DoorDash
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design a scalable review system for an e-commerce platform where customers can post reviews on products and upvote/downvote existing reviews, and review authors receive rewards based on upvote counts. Define APIs for creating reviews, voting, querying top reviews, and claiming rewards. Model the data schema for reviews, votes, and per-review upvote counters. Ensure idempotent voting, prevent double-votes and abuse (e.g., sybil/brigading), and support undo/changes. Propose a counter architecture (e.g., sharded or approximate counters) and a ranking strategy. Address scaling, caching, consistency, and reliability (failover, retries, deduplication), and outline monitoring and backfill processes.
Quick Answer: This question evaluates system design competencies such as designing scalable architectures, distributed data modeling, idempotent APIs, sharded or approximate counters, ranking strategies, consistency and reliability, and abuse-resistance for a high-traffic reviews and voting feature.