Design an online bookstore for browse and purchase
Company: Amazon
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
Design an online bookstore that supports viewing/browsing books and purchasing. Elicit functional and non-functional requirements; propose APIs for search/browse, product detail, cart, checkout, payments, and order history; design the data model for books, authors, inventory, pricing, users, carts, and orders; outline service decomposition, storage choices (SQL/NoSQL), search indexing, caching/CDN, and read/write patterns. Address inventory reservation and consistency during checkout, idempotency for payment/order creation, security/privacy, observability, capacity planning, and strategies for scalability, availability, and fault tolerance.
Quick Answer: This question evaluates a candidate's skills in scalable system design, including distributed architecture, API design, data modeling, search/indexing, caching, inventory consistency, payment integration, security and observability.