Databricks System Design Interview: Best-Price Book Purchasing Across Many Bookstores
Based on questions reported for Databricks interviews
The interviewer opens
Hi, and thanks for joining. Welcome to your interview for the software engineer role at Databricks. We'll design a system together, and you can sketch on the whiteboard on the right of your screen as you talk. If you need to step out or take a break, the Pause button at the top right will pause the interview.
The problem is in the Problem tab, about a service that finds the best bookstore price and places the order. Please read through the requirements and ask me anything you'd like clarified before you start drawing.
The problem
Design a service where a user submits an ISBN and a maximum price. It asks many independent bookstores for their price, picks the best offer within the limit, and places the order with that store.
Must do
- Accept a purchase request: ISBN, maximum price, and the user's identity
- Ask the participating bookstores for their current price and availability
- Pick the best qualifying offer and place the order with that store
- Let the user see the outcome: ordered (store, price), no qualifying offer, or failed
Must hold
- Slow or unavailable stores must not stall a user's purchase
- A user must never be charged for the same book twice