Start by clarifying requirements (scale, latency, consistency) and then walk through the full stack: ingestion from multiple exchanges, storage for time-series data, API layer for serving data, and client update mechanism. Emphasize trade-offs at each layer, such as push vs. pull, consistency vs. availability, and cost vs. performance.
Pro tip: Demonstrate awareness of real-world constraints by discussing how to handle exchange outages, data discrepancies, and the need for idempotent processing to avoid duplicates. Also, mention monitoring and alerting for data quality issues.
Ask questions to understand expected data volume, update frequency, latency requirements, consistency needs, and user scale. This sets the stage for design decisions.
Describe how to connect to multiple exchanges (e.g., WebSocket, REST APIs), normalize data formats, and handle failures with retries and backoff. Consider using a message queue for decoupling.
Select appropriate storage for time-series data (e.g., TimescaleDB, InfluxDB) and a stream processing engine (e.g., Kafka Streams, Flink) for real-time aggregation and synchronization.
Decide between push (WebSocket, SSE) and pull (polling) for client updates. Design REST or GraphQL APIs for historical data and WebSocket for real-time updates. Ensure scalability with load balancers and caching.
Discuss consistency vs. availability, latency vs. cost, and how to monitor data quality, handle exchange outages, and ensure idempotency. Mention deployment and scaling strategies.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.