← Uber Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

System design round at Uber for a software engineer role, focused entirely on building a real-time chat system. The whole session drilled into transport layer choices and offline delivery, which I wasn't expecting to go that deep on.

Questions Asked (6)

Q1

Design the backend for a real-time one-to-one and group messaging application, covering live delivery, message history, and delivery/read receipts.

System DesignTechnical Trade-offs
Author's notes

I started with the database and the interviewer immediately steered me toward the transport layer.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then sketch a high-level architecture with separate services for connection management, message routing, storage, and receipts. Dive into the critical path for live delivery and message history, discussing trade-offs around consistency, latency, and scalability.

Pro tip: Emphasize idempotency and ordering guarantees for message delivery, as these are often overlooked but critical for a reliable messaging system. Also, proactively discuss how to handle offline users and message synchronization across multiple devices.

1. Clarify Requirements and Scale

Ask about expected user scale, message volume, latency requirements, and consistency needs. Define functional requirements: one-to-one and group messaging, live delivery, history, and receipts.

2. High-Level Architecture

Outline core components: WebSocket gateways for persistent connections, a message service for routing and persistence, a presence service, and a receipt service. Use a message queue for asynchronous processing.

3. Live Delivery and Connection Management

Explain how to maintain WebSocket connections, handle reconnections, and route messages to online users. Discuss using a consistent hashing or a registry to map user IDs to gateway servers.

4. Message Storage and History

Choose a database (e.g., Cassandra for scalability) and design schema for messages, conversations, and user inboxes. Discuss indexing for efficient history retrieval and pagination.

5. Delivery and Read Receipts

Describe how to track and propagate receipts: use message IDs, store receipt status per user, and push updates via WebSocket. Ensure idempotency and handle offline users with queuing.

Key Points to Mention

  • WebSocket for real-time bidirectional communication, with fallback to long polling.
  • Message ordering and idempotency using sequence numbers or timestamps and deduplication.
  • Database choice: NoSQL (e.g., Cassandra) for high write throughput and scalability; consider consistency trade-offs.
  • Group messaging: fan-out on write vs. fan-out on read, and handling large groups.
  • Receipts: delivery and read receipts as separate events, with efficient storage and retrieval.
  • Offline handling: message queuing, push notifications, and synchronization on reconnect.

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

Q2

Walk through exactly what happens, step by step, when user A sends a message to user B while B is offline, and then B reconnects 10 minutes later.

System DesignAPI & Integrations
Author's notes

This is where I fumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope and assumptions (e.g., messaging service, offline storage, delivery guarantees). Then walk through the end-to-end flow: message ingestion, persistence, offline detection, notification, and eventual delivery upon reconnection. Emphasize reliability, idempotency, and ordering.

Pro tip: Highlight the trade-offs between different delivery guarantees (at-least-once vs exactly-once) and how you'd handle duplicate messages or out-of-order delivery. This shows you think beyond the happy path.

1. Clarify Requirements and Assumptions

Ask about the messaging system's expected scale, delivery guarantees, and whether messages should be stored server-side or client-side. Assume a typical chat system with server-side storage and push notifications.

2. Message Ingestion and Persistence

Describe how A's message is sent to the server, validated, and stored in a durable message store (e.g., database) with metadata like sender, recipient, timestamp, and status.

3. Offline Detection and Notification

Explain how the server detects B is offline (e.g., no active connection) and triggers a push notification to B's device, while keeping the message queued for delivery.

4. Reconnection and Message Retrieval

When B reconnects, the client authenticates, syncs with the server (e.g., via a sync API or websocket), and fetches undelivered messages. The server marks messages as delivered and updates status.

5. Delivery Acknowledgement and Cleanup

B's client acknowledges receipt, and the server updates the message status to 'delivered' or 'read'. Discuss idempotency to handle retries and ensure no duplicates.

Key Points to Mention

  • Message queue or durable storage for offline messages
  • Push notification service (e.g., APNs, FCM) for offline alerts
  • Reconnection sync protocol (e.g., delta sync, message sequence numbers)
  • Idempotency and deduplication to handle retries
  • Ordering guarantees and how to maintain message order
  • Delivery status tracking (sent, delivered, read)

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

Q3

Defend the choice of WebSocket over HTTP long polling and Server-Sent Events for this workload. When would you actually prefer SSE or long polling?

Technical Trade-offsSystem Design
Author's notes

Surprisingly enjoyed this one.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the workload's communication patterns (bidirectional, low-latency, high-frequency) and then compare WebSocket, SSE, and long polling against those requirements. Defend WebSocket as the best fit for full-duplex, real-time use cases, but acknowledge that SSE or long polling can be preferable when the constraints differ (e.g., unidirectional updates, legacy infrastructure, or simplicity).

Pro tip: Show maturity by quantifying trade-offs (e.g., connection overhead, latency, scalability) and mentioning real-world constraints like proxy/firewall compatibility, which often drive the choice at companies like Uber.

1. Clarify workload requirements

Identify the key characteristics: bidirectional communication, message frequency, latency sensitivity, number of concurrent connections, and client diversity. This sets the criteria for evaluation.

2. Compare WebSocket, SSE, and long polling

Highlight WebSocket's full-duplex, low-latency nature; SSE's unidirectional server push over HTTP; and long polling's request-response emulation. Discuss overhead, complexity, and scalability for each.

3. Defend WebSocket for the given workload

Argue why WebSocket is optimal: it eliminates polling overhead, supports real-time bidirectional messaging, and scales well with proper infrastructure. Tie this to the workload's needs (e.g., live tracking, chat).

4. Identify when SSE or long polling is preferable

Explain scenarios: SSE for unidirectional server-to-client updates (e.g., notifications, feeds) with automatic reconnection; long polling for legacy environments or when WebSocket/SSE are blocked by proxies/firewalls.

5. Summarize with a balanced conclusion

Reiterate that the choice depends on trade-offs, and show awareness that even at Uber, different services may use different technologies based on specific constraints.

Key Points to Mention

  • WebSocket provides full-duplex communication over a single TCP connection, reducing latency and overhead compared to HTTP-based polling.
  • SSE is simpler, works over HTTP/2, and is ideal for unidirectional server push, but lacks native bidirectional support.
  • Long polling introduces higher latency and server load due to repeated request-response cycles, but is universally supported and easy to implement.
  • Consider infrastructure compatibility: WebSocket may face issues with proxies, firewalls, or load balancers, while SSE and long polling are more HTTP-friendly.
  • Scalability: WebSocket requires stateful connections and careful resource management; SSE can leverage HTTP/2 multiplexing; long polling can be stateless but inefficient.
  • Real-world examples: Uber's real-time features (e.g., driver location updates) often use WebSocket, but internal tools or legacy systems might use SSE or long polling.

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

Q4

How do you guarantee per-conversation message ordering and deduplicate retried sends from a flaky mobile client?

System DesignAlgorithms & Data Structures
Author's notes

Client-generated idempotency keys plus a monotonic sequence number per conversation.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, such as the expected message volume, ordering guarantees, and deduplication window. Then propose a solution that combines client-generated sequence numbers and unique message IDs with server-side ordering and deduplication mechanisms, and discuss trade-offs between consistency and availability.

Pro tip: Emphasize idempotency and exactly-once semantics, and mention how you would handle edge cases like out-of-order delivery and client retries with exponential backoff. Also, relate it to real-world systems like Uber's chat or driver-rider communication.

1. Clarify Requirements and Constraints

Ask about the scale, ordering scope (per-conversation), deduplication window, and consistency requirements. Understand the mobile client's behavior and network conditions.

2. Design Client-Side Mechanisms

Propose that the client assigns a monotonically increasing sequence number per conversation and a globally unique message ID (e.g., UUID) to each message. Include retry logic with exponential backoff and jitter.

3. Design Server-Side Ordering and Deduplication

Use the sequence number to order messages per conversation, and the message ID to deduplicate. Store recent message IDs in a cache (e.g., Redis) with TTL for deduplication, and use a persistent store for ordering.

4. Handle Edge Cases and Failures

Discuss how to handle out-of-order messages (e.g., buffer and reorder), missing sequence numbers, and client reconnections. Consider using a message queue or stream processing for scalability.

5. Discuss Trade-offs and Alternatives

Compare approaches like using a centralized sequencer vs. client-side sequencing, and discuss consistency vs. availability trade-offs. Mention how to scale and monitor the solution.

Key Points to Mention

  • Client-generated sequence numbers per conversation for ordering
  • Unique message IDs (UUIDs) for deduplication
  • Server-side deduplication using a cache with TTL (e.g., Redis)
  • Idempotent message processing and exactly-once semantics
  • Handling out-of-order delivery with buffering and reordering
  • Retry logic with exponential backoff and jitter on the client

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

Q5

For a group with 200 members, do you fan out messages on write or on read, and what are the tradeoffs of each approach?

System DesignTechnical Trade-offs
Author's notes

Fan-out on write means you copy the message to every member's inbox at send time, which is fast for reads but expensive at write time for large groups.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the use case and requirements (e.g., latency, consistency, cost) for a 200-member group. Then compare fan-out on write vs. fan-out on read, highlighting trade-offs in terms of write/read amplification, storage, and complexity. Conclude with a recommendation based on typical patterns at scale, such as a hybrid approach.

Pro tip: Mention that the optimal choice depends on the read/write ratio and latency requirements, and that a hybrid approach (e.g., fan-out on write for active users, on read for inactive) is often used in production systems like chat apps.

1. Clarify requirements

Ask about the expected read/write ratio, latency SLAs, consistency needs, and group activity patterns (e.g., are all 200 members active?).

2. Define fan-out on write

Explain that on write, the message is immediately delivered to all 200 members' inboxes, resulting in 200 writes per message.

3. Define fan-out on read

Explain that on read, the message is stored once and each member pulls it when they open the app, resulting in 200 reads per message.

4. Compare trade-offs

Discuss write amplification vs. read amplification, storage costs, latency, and complexity for each approach.

5. Recommend an approach

Based on the requirements, suggest a suitable approach or a hybrid solution, and justify your choice.

Key Points to Mention

  • Write amplification: fan-out on write increases write load and storage but ensures low-latency reads.
  • Read amplification: fan-out on read reduces write load and storage but may increase read latency and complexity.
  • Storage costs: fan-out on write duplicates messages per member, while fan-out on read stores once.
  • Latency: fan-out on write provides faster reads; fan-out on read may introduce delay if not cached.
  • Scalability: with 200 members, fan-out on write is feasible but consider larger groups; fan-out on read scales better for large groups.
  • Hybrid approach: combine both, e.g., fan-out on write for active users and on read for inactive, to balance trade-offs.

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

Q6

How do you scale the stateful connection tier and route a message to the correct server holding a recipient's active socket?

System DesignData Modeling
Author's notes

You need a presence registry, basically a key-value store mapping user ID to the connection server they're currently on.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem as two distinct challenges: scaling the stateful connection tier and routing messages to the correct server. Then, propose a solution using a distributed registry (e.g., Redis or a custom service) to map user IDs to server instances, and discuss scaling strategies like consistent hashing and connection draining.

Pro tip: Emphasize the trade-offs between consistency and availability in the registry, and mention how you would handle server failures gracefully with reconnection logic and session resumption.

1. Clarify requirements and constraints

Ask about scale (number of concurrent connections, messages per second), latency requirements, and consistency needs. This shows you think before designing.

2. Design the connection tier scaling

Explain how to scale horizontally by adding more connection servers, using a load balancer with consistent hashing to distribute connections evenly and minimize rebalancing.

3. Implement a routing registry

Propose a centralized or distributed registry (e.g., Redis, ZooKeeper) that maps user IDs to the server holding their socket. Discuss how to keep it updated on connect/disconnect.

4. Route messages to the correct server

Describe the message flow: when a message arrives, look up the recipient's server in the registry, then forward the message via an internal RPC or message queue.

5. Handle failures and scaling events

Discuss how to handle server crashes (e.g., registry cleanup, client reconnection) and scaling (e.g., connection draining, consistent hashing rebalancing).

Key Points to Mention

  • Consistent hashing for even distribution and minimal disruption during scaling
  • Distributed registry (e.g., Redis) for user-to-server mapping with TTL and heartbeats
  • Message routing via internal RPC or message queue (e.g., Kafka) for decoupling
  • Connection draining and graceful shutdown to avoid dropping active connections
  • Handling server failures with reconnection logic and session resumption
  • Trade-offs between consistency and availability in the registry (e.g., AP vs CP)

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