#44EasyFinTech & Transactional APIs

Design a System to View Latest Stock Prices Worldwide

ASKED IN INTERVIEWS AT:GoogleBloombergAmazon

EXECUTIVE SUMMARY & PROBLEM STATEMENT

Design a real-time global financial ticker pushing live stock bid/ask quotes to millions of connected web and mobile devices with millisecond latency.

SCALE ESTIMATION & TRAFFIC ENVELOPE

DAILY ACTIVE USERS / TPS5 Million concurrent connected traders, 50,000 ticks/sec
READ / WRITE TRAFFIC RATIOMassive 1:N fan-out
5-YEAR STORAGE CAPACITYCurrent price cache in RAM + Time-series DB for historical bars

FUNCTIONAL REQUIREMENTS

  • [1]Stream real-time price changes for thousands of stocks
  • [2]Instant retrieval of current price on search/load
  • [3]Display candlestick charts for multiple timeframes

NON-FUNCTIONAL REQUIREMENTS

  • •Tick-to-screen latency < 50ms
  • •Handle high volume market opening surges
  • •Support 10M+ concurrent open WebSocket connections

CORE ARCHITECTURAL COMPONENTS

Exchange Feed Handler
Pub/Sub Message Bus (Redis/Kafka)
WebSocket Gateway Farm
Redis Current Price Store
Historical TSDB

DATA SCHEMA & PERSISTENCE

TickerSnapshot: symbol (PK), last_price, bid, ask, volume, timestamp

DISTRIBUTED TRADE-OFFS & FAILURE MODES

  • ⟡Server-Sent Events (SSE) offer simpler, more firewall-friendly HTTP/2 streaming for one-way market data than two-way WebSockets.