← Coinbase Interview Insights

Coinbase·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
May 2026

Summary

System design round at Coinbase for a software engineer role, focused entirely on building a real-time crypto price feed at scale. Pretty deep technically, they wanted specifics on every layer from exchange ingestion all the way to what the browser does when it loses connection.

Questions Asked (7)

Q1

Design the Coinbase home page with real-time cryptocurrency price updates. Walk through the full pipeline from exchange data feeds to what the client renders.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This is the whole question, basically.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, latency, consistency) and then walk through the pipeline from exchange feeds to client rendering, highlighting key components and trade-offs. Focus on real-time data flow, scalability, and user experience, and justify your design choices.

Pro tip: Emphasize the importance of handling stale or missing data gracefully, as real-time systems must degrade gracefully; mention specific techniques like circuit breakers and fallback to cached data.

1. Clarify Requirements and Scope

Ask questions to understand scale (number of users, updates per second), latency requirements, consistency needs, and client platforms. Define what 'real-time' means (e.g., sub-second updates).

2. Design Data Ingestion from Exchanges

Describe how to connect to multiple exchange feeds (WebSocket/REST), normalize data, and handle failures. Consider using a message queue (e.g., Kafka) to decouple ingestion from processing.

3. Build Real-Time Processing and Distribution

Explain how to process and aggregate data (e.g., compute OHLC, detect anomalies) and distribute to clients via WebSockets or SSE. Use a pub/sub system (e.g., Redis Pub/Sub) for scalability.

4. Design Client-Side Rendering and Updates

Describe how the client subscribes to updates, efficiently renders changes (e.g., virtual DOM, throttling), and handles reconnections. Discuss caching and optimistic UI.

5. Address Trade-offs and Scalability

Discuss trade-offs: push vs. pull, consistency vs. latency, cost. Explain how to scale horizontally (sharding, load balancing) and ensure fault tolerance.

Key Points to Mention

  • Use of WebSockets for low-latency bidirectional communication between server and client.
  • Message queue (e.g., Kafka) for reliable ingestion and buffering of exchange data.
  • Data normalization across exchanges to ensure consistent format and handling of different symbols.
  • Caching strategies (e.g., Redis) to serve recent prices quickly and reduce load on backend.
  • Client-side performance optimizations: throttling updates, using requestAnimationFrame, and minimizing re-renders.
  • Fault tolerance: handling exchange downtime, network issues, and graceful degradation (e.g., showing last known price with a stale indicator).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Compare WebSocket, Server-Sent Events, and long-polling for streaming price updates to the client. What are the tradeoffs and when would you fall back?

Technical Trade-offsAPI & IntegrationsSystem Design
Author's notes

Felt pretty solid here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining each technology's core mechanics and then compare them across dimensions like latency, scalability, and complexity. Tailor your answer to Coinbase's real-time price streaming needs, emphasizing when to choose each and fallback scenarios.

Pro tip: Mention that the choice often depends on infrastructure constraints and client capabilities, and that a hybrid approach (e.g., WebSocket with long-polling fallback) is common in production systems to handle diverse client environments.

1. Define the technologies

Briefly explain WebSocket (full-duplex, persistent), Server-Sent Events (unidirectional, HTTP-based), and long-polling (repeated HTTP requests with delayed responses).

2. Compare tradeoffs

Discuss latency, scalability, overhead, browser support, and complexity for each. Highlight that WebSocket offers lowest latency but requires more infrastructure; SSE is simpler but unidirectional; long-polling is widely compatible but inefficient.

3. Relate to Coinbase's use case

Explain that for real-time price updates, low latency and high throughput are critical, making WebSocket the primary choice. SSE could work for simpler one-way streams, and long-polling as a fallback for restrictive environments.

4. Discuss fallback scenarios

Identify when to fall back: corporate proxies blocking WebSocket, legacy clients, or when scaling WebSocket connections becomes cost-prohibitive. Mention that fallback should be automatic and seamless.

5. Conclude with a recommendation

Summarize that WebSocket is ideal for Coinbase's real-time needs, but a robust system should support SSE and long-polling as fallbacks, possibly using a library like Socket.IO or SockJS.

Key Points to Mention

  • WebSocket provides full-duplex communication over a single TCP connection, minimizing latency and overhead.
  • Server-Sent Events (SSE) is unidirectional (server to client) and works over HTTP, but lacks binary support and has connection limits per domain in HTTP/1.1.
  • Long-polling holds a request open until data is available, then repeats, causing higher latency and server load due to frequent reconnections.
  • Scalability considerations: WebSocket requires sticky sessions or a pub/sub layer; SSE can leverage HTTP/2 multiplexing; long-polling is stateless but resource-intensive.
  • Fallback strategies: use long-polling when WebSocket is blocked by firewalls/proxies, or SSE when only server-to-client updates are needed.
  • Coinbase's context: high-frequency price updates demand low latency, so WebSocket is preferred, but fallbacks ensure accessibility across diverse client environments.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you handle throttling and coalescing high-frequency price updates so the UI doesn't become unusable?

System DesignTechnical Trade-offs
Author's notes

Blanked for a second on the exact terminology.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: update frequency, UI components affected, and acceptable latency. Then propose a layered solution combining throttling (rate limiting) and coalescing (batching) at the data layer, with UI optimizations like virtualization and requestAnimationFrame. Discuss trade-offs between freshness and performance, and how to measure and iterate.

Pro tip: Mention that you'd use a single WebSocket connection with server-side throttling and client-side coalescing, and that you'd instrument the UI to monitor frame rates and update latency to validate the approach.

1. Clarify Requirements and Constraints

Ask about update frequency, number of symbols, UI components, and acceptable latency. Understand the scale and performance targets.

2. Choose Throttling Strategy

Decide on a throttling approach (e.g., time-based or count-based) to limit update frequency. Consider using requestAnimationFrame for UI updates to align with browser repaint cycles.

3. Implement Coalescing

Batch multiple updates into a single render by coalescing changes over a short interval (e.g., 100ms). Use a data structure to keep only the latest value per symbol.

4. Optimize UI Rendering

Apply UI optimizations like virtualization for long lists, memoization, and avoiding unnecessary re-renders. Use efficient diffing or key-based updates.

5. Monitor and Iterate

Instrument performance metrics (FPS, update latency) and adjust throttling/coalescing parameters based on real usage. Consider adaptive throttling based on device capabilities.

Key Points to Mention

  • Throttling vs. debouncing: throttling ensures regular updates, debouncing waits for a pause; throttling is better for continuous streams.
  • Coalescing: merging multiple updates into one render to reduce DOM operations.
  • Use of requestAnimationFrame to synchronize UI updates with the browser's repaint cycle.
  • Web Workers for offloading data processing to avoid blocking the main thread.
  • Virtualization (e.g., react-window) for rendering only visible items in large lists.
  • Trade-offs: freshness vs. performance, and how to choose intervals based on user perception.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

Describe a viewport-driven subscription model where clients only receive updates for the symbols currently visible on screen.

System DesignProduct Sense & Ideation
Author's notes

This one was fun.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then propose a high-level architecture that tracks client viewport state and dynamically subscribes to relevant symbols. Dive into key components like viewport tracking, subscription management, and efficient data delivery, while addressing scalability and real-time challenges.

Pro tip: Emphasize the importance of debouncing viewport changes and handling subscription churn gracefully to avoid overwhelming the backend, and discuss how to leverage existing pub/sub systems like Redis or Kafka for scalability.

1. Clarify Requirements and Constraints

Ask questions to understand scale (number of clients, symbols), update frequency, latency requirements, and existing infrastructure. Clarify what 'visible on screen' means (e.g., partial visibility, zoom levels).

2. High-Level Architecture

Outline the main components: client-side viewport tracker, subscription manager (server-side), data source (market data feed), and delivery mechanism (WebSocket, SSE). Explain how they interact.

3. Viewport Tracking and Subscription Management

Describe how the client determines visible symbols and communicates changes to the server. Discuss debouncing, batching, and how the server maintains per-client subscriptions and handles churn.

4. Data Delivery and Efficiency

Explain how updates are pushed only for subscribed symbols, including message formats, compression, and throttling. Address how to handle high-frequency updates and ensure low latency.

5. Scalability, Reliability, and Trade-offs

Discuss scaling the subscription manager (e.g., using consistent hashing, sharding), handling failures, and trade-offs between server-side vs. client-side filtering. Mention monitoring and metrics.

Key Points to Mention

  • WebSocket or Server-Sent Events (SSE) for real-time bidirectional communication
  • Debouncing and throttling viewport change events to reduce subscription churn
  • Server-side subscription registry with efficient data structures (e.g., hash maps, sets)
  • Pub/sub system (e.g., Redis Pub/Sub, Kafka) to decouple data producers from consumers
  • Handling partial visibility and zoom levels to determine which symbols are 'visible'
  • Backpressure and rate limiting to prevent overwhelming clients or servers

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

How do you scale the fan-out layer to support millions of concurrent connected clients?

System DesignTechnical Trade-offs
Author's notes

This is where I spent most of my energy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (e.g., protocol, message size, latency, fan-out ratio) and then propose a horizontally scalable architecture using a distributed pub/sub system and stateless connection servers. Discuss trade-offs between consistency, latency, and cost, and highlight how to handle failures and reconnections.

Pro tip: Emphasize the importance of backpressure and graceful degradation to maintain service under load, and mention that you'd measure and monitor key metrics like connection count, message throughput, and latency to validate the design.

1. Clarify Requirements and Constraints

Ask about expected message rate, payload size, latency requirements, and client types to scope the problem. This ensures your design addresses the actual needs.

2. Design a Scalable Connection Layer

Propose using stateless servers (e.g., WebSocket or MQTT brokers) behind a load balancer, with consistent hashing to distribute connections. Discuss how to handle reconnections and session state.

3. Implement a Distributed Pub/Sub Backbone

Use a scalable message broker (e.g., Kafka, Redis Pub/Sub, or NATS) to decouple producers from consumers and enable fan-out to millions of clients. Address partitioning and replication for fault tolerance.

4. Address Trade-offs and Failure Modes

Discuss trade-offs like at-least-once vs. exactly-once delivery, latency vs. throughput, and cost. Explain how to handle server failures, network partitions, and message backlog.

5. Plan for Monitoring and Scaling

Describe how to monitor key metrics (connections, throughput, latency) and use auto-scaling to handle load spikes. Mention capacity planning and load testing.

Key Points to Mention

  • Horizontal scaling with stateless connection servers and consistent hashing
  • Distributed pub/sub systems (e.g., Kafka, Redis, NATS) for message fan-out
  • Backpressure and flow control to prevent overload
  • Trade-offs: latency vs. consistency, cost vs. performance
  • Fault tolerance and graceful degradation (e.g., circuit breakers, retries)
  • Monitoring and auto-scaling based on metrics like connection count and message rate

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

What are your reconnect and replay semantics when a client drops and reconnects?

System DesignAPI & Integrations
Author's notes

Talked about clients sending a last-seen sequence number or timestamp on reconnect so the server can replay any missed updates.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the context: what kind of client (e.g., WebSocket, mobile app) and what data stream (e.g., market data, order updates). Then describe a robust design that uses sequence numbers, acknowledgments, and a replay buffer to ensure exactly-once or at-least-once delivery, and explain how you handle gaps and duplicates.

Pro tip: Emphasize idempotency and client-side deduplication, as financial systems require exactly-once semantics for critical events like trades. Also mention monitoring and alerting for replay buffer overflows to detect systemic issues.

1. Clarify Requirements and Constraints

Ask about the client type, data criticality, and expected reconnect frequency to tailor the solution. For Coinbase, assume high-throughput, low-latency, and exactly-once delivery for financial data.

2. Design Reconnect Protocol

On reconnect, the client sends its last received sequence number. The server checks if it can resume from that point using a replay buffer; if not, it initiates a full resync.

3. Implement Replay Semantics

Use a bounded replay buffer (e.g., ring buffer) storing recent messages with sequence numbers. If the requested sequence is within the buffer, replay missed messages; otherwise, trigger a snapshot or full state transfer.

4. Handle Duplicates and Ordering

Ensure messages are idempotent and include sequence numbers so the client can detect and discard duplicates. Use a monotonic sequence to maintain order.

5. Monitor and Alert

Track metrics like reconnect rate, replay buffer hit/miss ratio, and resync frequency. Alert on anomalies to detect issues early.

Key Points to Mention

  • Sequence numbers for message ordering and gap detection
  • Replay buffer with bounded size and eviction policy
  • Idempotent message processing and client-side deduplication
  • Snapshot or full state transfer for resync when buffer is insufficient
  • Exactly-once vs at-least-once delivery semantics and trade-offs
  • Monitoring and alerting for replay buffer overflows and resync events

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q7

How does the client degrade gracefully when the streaming connection fails or the data becomes stale?

Technical Trade-offsProduct Sense & Ideation
Author's notes

Showed a stale-data indicator after some timeout, fell back to periodic REST polling as a last resort, and disabled the real-time UI elements rather than showing frozen prices as if they were live.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the failure modes (connection drop, stale data) and then walk through a layered degradation strategy that prioritizes user trust and actionable information. Emphasize how you would detect, communicate, and recover from each failure mode while maintaining a seamless experience.

Pro tip: Tie your answer to Coinbase's core value of trust: users must never see incorrect or outdated prices without clear indication. Mention that you would log and alert on degradation events to proactively identify systemic issues.

1. Identify failure modes and user impact

Distinguish between connection failure (e.g., WebSocket drop) and stale data (e.g., no updates for N seconds). For each, assess the risk to user decisions and trust.

2. Define graceful degradation tiers

Outline a tiered response: e.g., first attempt reconnection with exponential backoff; if unsuccessful, fall back to polling; if still failing, show last known data with a clear stale indicator.

3. Communicate state to the user

Use UI cues (banners, icons, timestamps) to inform users of the connection status and data freshness. Avoid silent failures that could mislead.

4. Implement recovery and reconciliation

Once connection is restored, fetch missed updates and reconcile state to avoid gaps or duplicates. Ensure the UI smoothly transitions back to live data.

5. Monitor and iterate

Log degradation events, measure frequency and impact, and use metrics to improve thresholds and fallback strategies over time.

Key Points to Mention

  • Exponential backoff with jitter for reconnection attempts to avoid thundering herd.
  • Fallback to HTTP polling or REST API when WebSocket fails.
  • Stale data detection via heartbeat or timestamp checks, with visual indicators (e.g., 'Last updated 2 min ago').
  • User trust: never show stale prices as live; clearly label data as delayed or stale.
  • Reconciliation on reconnect: fetch missed updates and merge without duplicates.
  • Monitoring and alerting on degradation events to detect systemic issues.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.