Design a Customer Order History Service Spanning Decades of Orders
Last updated: November 29, 2026
Quick Overview
Design the service behind 'Your Orders' that lets each customer browse, search, and filter every order they have ever placed, some accounts having tens of thousands of orders over twenty years.
Amazon
November 29, 20260
0
0 solved
Design the service behind 'Your Orders' that lets each customer browse, search, and filter every order they have ever placed, some accounts having tens of thousands of orders over twenty years.
Order history is read constantly for tracking, returns, and reordering, while data spans many years and storage tiers. Amazon interviewers check whether you model access patterns per customer, use tiered storage for old orders, and keep the view consistent with live order changes.
What the Interviewer Expects
- Data model keyed by customer for fast pagination
- Filter by year, status, and keyword search
- Tiered storage for old orders with acceptable latency
- Updates from order lifecycle events (shipped, returned, refunded)
- Privacy features such as archived or hidden orders
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 search for 'that blue lamp I bought in 2016'?
- How do you handle corrections to very old orders, such as late refunds?
- How do you support a household with multiple accounts?
- How do you handle data deletion requests?
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: list orders newest first with pagination; filter by year and status; search by product title; view order details; hide or archive orders. Non-functional: hundreds of millions of cu...
High-Level Design
- Order System of Record emits lifecycle events (placed, shipped, delivered, returned, refunded).
- History Projector consumes events and maintains an Order Summary table: partition key `c...