Common Problems
Online Auction
Dealing with Contention
Real-time Updates
Understanding the Problem
🛍️ What is an online auction?
An online auction service lets users list items for sale while others compete to purchase them by
placing increasingly higher bids until the auction ends, with the highest bidder winning the item.
As is the case with all of our common question breakdowns, we'll walk through this problem step by step, using the Hello Interview System Design Framework as our guide. Note that I go into more detail here than would be required or possible in an interview, but I think the added detail is helpful for teaching concepts and deepening understanding.
Functional Requirements
Core Requirements
- Users should be able to post an item for auction with a starting price and end date.
- Users should be able to bid on an item. Where bids are accepted if they are higher than the current highest bid.
- Users should be able to view an auction, including the current highest bid.
Below the line (out of scope):
- Users should be able to search for items.
- Users should be able to filter items by category.
- Users should be able to sort items by price.
- Users should be able to view the auction history of an item.
Non-Functional Requirements
Before diving into the non-functional requirements, ask your interviewer about the expected scale of the system. Understanding the scale requirements early will help inform key architectural decisions throughout your design.
The Set Up
Defining the Core Entities
API or System Interface
High-Level Design
1) Users should be able to post an item for auction with a starting price and end date.
2) Users should be able to bid on an item. Where bids are accepted if they are higher than the current highest bid.
3) Users should be able to view an auction, including the current highest bid.
Potential Deep Dives
1) How can we ensure strong consistency for bids?
2) How can we ensure that the system is fault tolerant and durable?
3) How can we ensure that the system displays the current highest bid in real-time?
4) How can we ensure that the system scales to support 10M concurrent auctions?
Final Design
Some additional deep dives you might consider
What is Expected at Each Level?
Mid-level
Senior
Staff
Test Your Knowledge
Answer the question below to find your gaps.
Purchase Premium to Keep Reading
Unlock this article and so much more with Hello Interview Premium
