Design a Cross-Exchange Stock Price Service
Serve fresh, normalized stock prices from multiple exchanges with explicit source freshness.
Problem statement
For this exercise, assume you are designing a cross-exchange stock price service. Serve fresh, normalized stock prices from multiple exchanges with explicit source freshness. Define a coherent first production version that satisfies the listed requirements and scale while making failures and degraded behavior visible.
What to build
- Ingest, normalize, and deduplicate quote updates from multiple exchanges.
- Serve the latest trusted quote and source timestamp for a requested symbol.
- Expose stale or unavailable exchange state instead of silently returning an untrusted value.
At scale
- For this exercise, assume 50 exchange feeds and 100,000 quote updates per second at peak.
- Serve 500,000 query requests per second with p99 latency below 100 ms.
- Retain seven days of normalized quote history for audit and correction.