Design a Multi-Provider Financial Dashboard
Company: Amazon
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
Design a financial dashboard that shows account balances, stock holdings, cryptocurrency holdings, and derived portfolio metrics. Data arrives from multiple external providers with different schemas, update frequencies, rate limits, and reliability. Users should see when data was last refreshed and should not be shown silently inconsistent totals.
### Constraints & Assumptions
- A user may connect several provider accounts.
- Provider APIs can be delayed, duplicated, reordered, temporarily unavailable, or corrected later.
- Currency conversion and market prices are time-dependent inputs to derived metrics.
- Read traffic is much higher than connection or account-update traffic.
- The design must preserve historical snapshots needed to explain displayed values.
### Clarifying Questions to Ask
- Which metrics require near-real-time data, and which can be eventually consistent?
- Are transactions ingested, or only balance and position snapshots?
- How fresh must prices and exchange rates be, and what should happen when one source is stale?
- What retention, audit, privacy, and regional-storage requirements apply?
### What a Strong Answer Covers
- Separates provider adapters, raw ingestion, normalization, calculation, storage, and dashboard serving.
- Makes synchronization idempotent and records provider cursors, versions, and observation times.
- Defines canonical account, instrument, position, price, and snapshot models.
- Computes derived metrics from a coherent valuation timestamp and exposes freshness or partial-data status.
- Handles rate limits, retries, backfills, corrections, provider outages, and duplicate events.
- Discusses security for provider credentials, user isolation, observability, and reconciliation.
### Follow-up Questions
1. How would you prevent a slow provider from delaying every other provider on a user's dashboard?
2. How would you reproduce the exact portfolio value that a user saw yesterday?
3. What changes if the dashboard must stream intraday price updates to millions of connected clients?
Quick Answer: Design a financial dashboard that reconciles balances, securities, cryptocurrency, prices, and derived metrics from unreliable external providers. Explain freshness, historical reproducibility, permissions, corrections, outages, and how users can recognize partial or inconsistent data.