← Databricks Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

System design round at Databricks for a software engineer role, and it was not a whiteboard-and-move-on kind of session. They wanted pseudocode, not just boxes and arrows, and they grilled me line by line on the message-send and message-deliver paths. Probably the most technically exhausting design interview I've done.

Questions Asked (3)

Q1

Design a chat application end-to-end at the pseudocode level, covering client/server protocol, message ingestion and fan-out, storage and ordering, presence, group vs 1:1 chats, push notifications, and offline delivery.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

The scope of this thing is brutal if you're not ready for it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, latency, consistency, features) and then walk through the design from client-server protocol to storage, fan-out, presence, and offline delivery. Use pseudocode to illustrate key components and justify trade-offs, especially around ordering, delivery guarantees, and group vs 1:1 chats.

Pro tip: Emphasize idempotency and message ordering using per-conversation sequence numbers, and discuss how to handle offline delivery with a pull-based sync mechanism to avoid overwhelming push notifications.

1. Clarify Requirements and Scope

Ask about scale (users, messages per second), latency, consistency, and features like read receipts, typing indicators, and media. Define the core entities: users, conversations (1:1 and group), messages, and presence.

2. Design Client-Server Protocol and API

Choose a protocol (e.g., WebSocket for real-time, HTTP for history). Define endpoints for sending messages, fetching history, and managing conversations. Use pseudocode to show message format and authentication.

3. Design Message Ingestion, Fan-out, and Storage

Describe how messages are ingested (e.g., via API gateway), assigned a sequence number per conversation, stored in a database (e.g., Cassandra for write-heavy), and fanned out to online recipients. For groups, use a fan-out-on-write or fan-out-on-read approach based on group size.

4. Handle Presence, Notifications, and Offline Delivery

Design presence using heartbeats and a presence service. For push notifications, integrate with APNs/FCM. For offline delivery, use a pull-based sync where clients fetch missed messages upon reconnection, with a cursor based on last received sequence number.

5. Discuss Trade-offs and Scalability

Compare trade-offs: consistency vs availability, fan-out strategies, storage choices, and push vs pull for notifications. Address scaling with sharding, replication, and caching.

Key Points to Mention

  • Per-conversation sequence numbers for ordering and idempotency
  • Fan-out strategies: write vs read, and their impact on group chats
  • Storage choices: wide-column stores for messages, separate presence store
  • Offline delivery via pull-based sync with cursors
  • Presence service using heartbeats and pub/sub
  • Push notification integration and handling of delivery receipts

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

Q2

Walk through the pseudocode for the core message-send path and defend it line by line, including correctness and edge cases.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

This was the part that got uncomfortable.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system context and assumptions (e.g., at-least-once delivery, message ordering, failure model). Then present a concise pseudocode for the core send path, walking through each line to explain its purpose, invariants, and how it handles edge cases like retries, duplicates, and partial failures. Finally, discuss trade-offs and potential improvements.

Pro tip: Explicitly state your assumptions about the failure model and delivery guarantees upfront—this shows you understand distributed systems nuances and prevents the interviewer from derailing your answer with edge cases you haven't considered.

1. Clarify requirements and assumptions

Ask clarifying questions about delivery semantics (at-least-once, exactly-once), ordering, durability, and failure scenarios. State your assumptions clearly to set the stage.

2. Present high-level pseudocode

Write a concise pseudocode for the message-send path, focusing on the core steps: validation, persistence, replication, acknowledgment, and retry logic.

3. Walk through line by line

For each line, explain its purpose, the invariants it maintains, and how it contributes to correctness. Highlight any non-obvious design choices.

4. Analyze edge cases and failure modes

Discuss how the pseudocode handles edge cases such as network partitions, duplicate sends, message loss, and partial failures. Explain any retry or idempotency mechanisms.

5. Discuss trade-offs and alternatives

Summarize the trade-offs made (e.g., latency vs. durability, complexity vs. guarantees) and mention alternative approaches or potential optimizations.

Key Points to Mention

  • Delivery semantics: at-least-once vs. exactly-once and how they affect the send path
  • Idempotency and deduplication strategies to handle retries
  • Durability guarantees: write-ahead logging, replication, and acknowledgment timing
  • Failure handling: timeouts, retries with backoff, and circuit breakers
  • Ordering guarantees and how they are maintained (e.g., sequence numbers, partitioning)
  • Trade-offs between latency, throughput, and consistency in the send path

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

Q3

Walk through the pseudocode for the message-deliver path and defend edge cases, including scenarios where recipients are offline or on different devices.

System DesignTechnical Trade-offs
Author's notes

Went better than the send path.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scope and assumptions (e.g., at-least-once delivery, message ordering, device types) before walking through the pseudocode. Then, present a high-level pseudocode for the message-deliver path, focusing on key steps like message reception, persistence, recipient lookup, device selection, and delivery attempts. Finally, systematically address edge cases such as offline recipients and multi-device scenarios, explaining how the design handles them and the trade-offs involved.

Pro tip: Proactively discuss trade-offs between consistency, latency, and cost—showing you understand that edge cases often require balancing competing priorities. Also, mention how you would monitor and test these edge cases in production, demonstrating operational maturity.

1. Clarify Requirements and Assumptions

Ask clarifying questions to understand the expected delivery guarantees (at-least-once, exactly-once), ordering requirements, and device types. State your assumptions explicitly to set the context for your answer.

2. Outline High-Level Pseudocode

Present a structured pseudocode for the message-deliver path, covering message ingestion, persistence, recipient lookup, device selection, and delivery attempts. Keep it concise and focus on the main flow.

3. Address Offline Recipients

Explain how the system handles offline recipients: store messages durably, use push notifications or polling to detect when they come online, and implement retry logic with backoff. Discuss trade-offs like storage cost vs. delivery latency.

4. Handle Multiple Devices

Describe how messages are delivered to multiple devices: fan-out to all active devices, maintain per-device delivery state, and handle synchronization (e.g., read receipts, message ordering). Mention potential issues like duplicate deliveries and how to deduplicate.

5. Defend Edge Cases and Trade-offs

Systematically discuss other edge cases (e.g., device offline during delivery, message expiration, network partitions) and justify your design choices. Highlight trade-offs between consistency, availability, and latency.

Key Points to Mention

  • Delivery guarantees (at-least-once vs. exactly-once) and idempotency to handle duplicates.
  • Message persistence and durability (e.g., write-ahead log, database) to survive failures.
  • Device registration and presence tracking to know which devices are online.
  • Retry policies with exponential backoff and dead-letter queues for failed deliveries.
  • Fan-out strategies for multiple devices and handling per-device delivery state.
  • Trade-offs between consistency (e.g., ordering) and availability (e.g., offline delivery).

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