Uber System Design Interview: Stock Price Move Alerts
Based on questions reported for Uber interviews
The interviewer opens
Hi, and thanks for joining. Welcome to your interview for the software engineer role at Uber. We'll design a system together, with you sketching on the whiteboard on the right as you talk, and you can pause anytime with the Pause button at the top right if you need a break.
The problem is in the Problem tab: it's a stock price move alert system, a real-time notification pipeline of the kind that matters at Uber's scale. Please read through the requirements and ask me anything you'd like clarified before you start drawing.
The problem
Design a system that consumes a live stream of stock prices (symbol, current price, previous close) and sends a push notification to every user subscribed to a stock when its price moves more than 5% from the previous close.
Must do
- Users subscribe to and unsubscribe from stocks
- Consume a continuous feed of price ticks: symbol, current price, previous close
- Detect when a stock moves more than 5% up or down from its previous close
- Send a push notification to every subscriber of that stock
Must hold
- A user must not receive the same alert twice
- Alerts must reach subscribers promptly after a move