← Harvey Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

System design round at Harvey for a software engineer role. The whole thing was one big question about designing a cloud file storage and collaboration service, think Google Drive or Dropbox, and they went deep on every layer. Brutal but fair.

Questions Asked (6)

Q1

Design a cloud file storage and collaboration service similar to Google Drive or Dropbox, covering file operations, hierarchical folders, sharing with fine-grained permissions, resumable large-file uploads, version history, multi-client sync, and search.

System DesignTechnical Trade-offsData Modeling
Author's notes

The scope of this was intimidating.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale (e.g., number of users, file sizes, consistency needs), then design the core data model and APIs for file operations, folders, and sharing. Next, dive into the critical components: chunked resumable uploads, versioning, sync protocol, and search, discussing trade-offs and bottlenecks. Finally, tie it together with a high-level architecture diagram and address scalability, reliability, and security.

Pro tip: Emphasize the sync protocol early—it's the hardest part and often overlooked. Discuss how you'd handle conflicts (e.g., vector clocks or operational transforms) and why you chose a particular approach.

1. Clarify Requirements and Scope

Ask questions to understand scale (users, files, QPS), consistency requirements, and key features. Define functional and non-functional requirements to guide the design.

2. Design Data Model and APIs

Define entities: users, files, folders, permissions, versions. Design RESTful APIs for CRUD operations, sharing, and search. Discuss how to represent hierarchical folders (e.g., materialized paths or adjacency lists).

3. Architect Core Components

Outline services: metadata service, block storage, upload service, sync service, search service. Explain how they interact and scale. Cover chunked resumable uploads, deduplication, and versioning.

4. Address Sync and Conflict Resolution

Detail the sync protocol: how clients detect changes, push/pull updates, and resolve conflicts. Discuss trade-offs between consistency models (e.g., strong vs eventual) and conflict resolution strategies.

5. Discuss Trade-offs and Scalability

Highlight key trade-offs (e.g., consistency vs availability, latency vs durability). Explain how to scale each component (sharding, caching, CDN) and ensure security (encryption, access control).

Key Points to Mention

  • Chunked and resumable uploads with checksums for integrity, and deduplication to save storage.
  • Fine-grained permissions using ACLs or RBAC, with inheritance in folder hierarchies.
  • Version history using immutable blocks and metadata pointers, enabling efficient rollback.
  • Sync protocol with change logs, delta sync, and conflict resolution (e.g., vector clocks, last-write-wins).
  • Search indexing (e.g., Elasticsearch) with incremental updates and permission-aware filtering.
  • Scalability and reliability: sharding metadata, using object storage for blobs, and ensuring fault tolerance.

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

Q2

A user moves a folder containing 50,000 files into a new parent with different sharing settings. How do you make the move appear atomic, and how do you propagate the permission change without synchronously rewriting 50,000 rows?

System DesignTechnical Trade-offsData Modeling
Author's notes

This one stung.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: atomicity from the user's perspective, consistency of permissions, and performance constraints. Then propose a design that separates the logical move from the physical permission propagation, using indirection and asynchronous processing to achieve both goals.

Pro tip: Emphasize that 'atomic' means the user sees an instantaneous change, not that the underlying data is updated in one transaction. This distinction shows you understand real-world trade-offs and can design for user experience while managing backend complexity.

1. Clarify requirements and constraints

Ask about the expected scale, consistency requirements, and whether the move must be truly atomic or just appear atomic to the user. Confirm that permissions are inherited from the parent and that rewriting 50,000 rows synchronously is unacceptable.

2. Design for atomic appearance

Propose updating a single pointer or metadata record to change the folder's parent, making the move appear instantaneous. Use a transaction to ensure the pointer update is atomic and consistent.

3. Decouple permission propagation

Instead of updating each file's permissions, compute effective permissions dynamically by traversing the folder hierarchy. Alternatively, use an asynchronous job to propagate changes in the background, ensuring eventual consistency.

4. Address consistency and failure handling

Discuss how to handle reads during propagation: either serve stale permissions until the job completes or use a versioning scheme to ensure correct access. Implement idempotent and retryable background jobs to handle failures.

5. Evaluate trade-offs and alternatives

Compare approaches: dynamic permission calculation (simpler but potentially slower reads) vs. asynchronous propagation (faster reads but eventual consistency). Mention caching and indexing strategies to mitigate performance impacts.

Key Points to Mention

  • Use of indirection: store parent-child relationships and compute permissions on read, avoiding mass updates.
  • Asynchronous background jobs for permission propagation, with idempotency and retry logic.
  • Eventual consistency model and how to communicate it to users (e.g., 'permissions updating...').
  • Caching strategies to avoid performance degradation when computing permissions dynamically.
  • Transaction boundaries: ensure the move operation is atomic at the metadata level.
  • Scalability considerations: handling 50,000 files without locking or downtime.

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

Q3

Two desktop clients each edit the same file while offline, then both reconnect at the same time. Walk through exactly how your sync protocol detects the conflict and what the user actually sees.

System DesignTechnical Trade-offs
Author's notes

I think I answered this okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Walk through the sync protocol end-to-end: how each client tracks changes offline, how the server detects concurrent edits on reconnect, and the conflict resolution strategy. Then describe the user experience—what UI signals a conflict and what options the user has to resolve it.

Pro tip: Acknowledge that perfect automatic merge is impossible for all file types; show maturity by proposing a hybrid approach (auto-merge for text, manual resolution for binary) and explaining how you'd measure conflict rates to improve the system.

1. Track changes offline

Explain how each client records local edits while offline—e.g., using a version vector, operation log, or file hash—so the server can later identify concurrent modifications.

2. Detect conflict on reconnect

Describe the handshake: each client sends its base version and changes; the server compares versions and detects that both clients edited from the same base, indicating a conflict.

3. Resolve or merge

Outline the resolution strategy: attempt automatic merge (e.g., three-way merge for text), fall back to conflict markers or manual resolution for binary or overlapping edits.

4. Present to user

Detail what the user sees: a conflict notification, side-by-side diff, or merged file with markers, plus options to choose a version or edit manually.

5. Handle edge cases

Mention scenarios like simultaneous reconnects, large files, or partial sync failures, and how the protocol ensures consistency (e.g., server serializes updates, uses locks).

Key Points to Mention

  • Version vectors or vector clocks to track causality and detect concurrency
  • Three-way merge algorithm for text files, with conflict markers
  • Server-side conflict detection using base version comparison
  • User interface for conflict resolution: diff view, choose version, manual merge
  • Trade-offs: automatic merge vs. manual resolution, latency vs. consistency
  • Handling binary files or non-mergeable content (e.g., last-write-wins with backup)

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

Q4

How would you add block-level delta sync so that only the changed chunks of a large edited file are re-uploaded, rather than the whole file? What changes in the data model and upload path?

System DesignData ModelingTechnical Trade-offs
Author's notes

Content-addressing chunks by hash is the key insight here.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints (file size, edit frequency, network conditions). Then propose a chunking strategy (e.g., content-defined chunking) and describe how to track chunk versions in the data model. Finally, outline the upload path changes: client computes chunk hashes, sends only missing chunks, and server updates metadata atomically.

Pro tip: Mention that content-defined chunking (like Rabin fingerprinting) is more robust than fixed-size chunking for insertions/deletions, and discuss how to handle chunk deduplication across files to save storage.

1. Clarify requirements and constraints

Ask about file size, edit patterns, network reliability, and consistency requirements to tailor the solution.

2. Design chunking strategy

Choose between fixed-size and content-defined chunking (CDC), explaining trade-offs. CDC handles shifts better but has higher CPU overhead.

3. Extend data model

Add chunk-level metadata: chunk hashes, sizes, order, and versioning. Consider a manifest that maps file versions to chunk lists.

4. Modify upload path

Client computes chunk hashes, compares with server manifest, uploads only missing chunks, and sends a new manifest to commit the version.

5. Address consistency and failure handling

Ensure atomic updates, handle partial uploads, and implement garbage collection for orphaned chunks.

Key Points to Mention

  • Content-defined chunking (e.g., Rabin fingerprinting) vs fixed-size chunking
  • Chunk deduplication across files and versions
  • Manifest or metadata structure to track chunk order and versions
  • Client-server protocol for negotiating missing chunks (e.g., hash list exchange)
  • Atomic commit of new file version and rollback on failure
  • Garbage collection and storage optimization for unused chunks

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

Q5

Storage costs are dominated by duplicate content across users, like the same PDF shared widely. How do you deduplicate safely, and what are the privacy and security risks of cross-user dedup?

System DesignTechnical Trade-offs
Author's notes

Convergent encryption is the answer they were looking for and I knew it existed but could not remember the name or explain it precisely under pressure.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and sensitivity of the data, then propose a content-addressed deduplication system with per-user encryption and access controls. Explain how to safely deduplicate while mitigating privacy and security risks like side-channel attacks and data leakage.

Pro tip: Emphasize that deduplication must be done on encrypted data with per-user keys to avoid cross-user information leakage, and mention that you'd use a keyed hash (HMAC) instead of a plain hash to prevent confirmation attacks.

1. Clarify requirements and constraints

Ask about data volume, sensitivity, compliance needs (e.g., GDPR, HIPAA), and whether cross-user deduplication is even allowed. This shows you consider legal and privacy implications before technical solutions.

2. Design a secure deduplication architecture

Propose content-defined chunking (e.g., Rabin fingerprinting) to identify duplicates at block level, and store chunks in a content-addressed store. Use convergent encryption with per-user keys to encrypt chunks before deduplication.

3. Address privacy risks

Explain that plaintext hashes enable confirmation attacks (an attacker can check if a file exists). Mitigate by using keyed hashes (HMAC) with a secret key, or by only deduplicating within a user's own data.

4. Address security risks

Discuss risks like side-channel attacks (timing, storage usage) that can reveal file existence, and poisoning attacks where a malicious user injects a chunk to corrupt others' data. Mitigate with access controls, integrity checks, and per-user encryption.

5. Discuss trade-offs and alternatives

Acknowledge that perfect cross-user dedup may be impossible without some information leakage. Offer alternatives like client-side dedup with user-specific salts, or limiting dedup to within a tenant/organization.

Key Points to Mention

  • Content-defined chunking (e.g., Rabin fingerprinting) for efficient deduplication
  • Convergent encryption: encrypting data with a key derived from its content to enable dedup on encrypted data
  • Confirmation attacks: how an attacker can verify if a file exists by comparing hashes
  • Side-channel attacks: timing or storage usage revealing file existence
  • Keyed hashes (HMAC) or per-user salts to prevent cross-user hash correlation
  • Compliance and privacy regulations (GDPR, HIPAA) that may restrict cross-user dedup

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

Q6

The region hosting your metadata primary goes down entirely. What is your failover story, what is the RPO and RTO, and what might clients observe as lost or stale during the cutover?

System DesignTechnical Trade-offs
Author's notes

Went with a multi-region setup using synchronous replication to a standby with automatic promotion.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the failure scenario and the failover mechanism, then quantify RPO and RTO with concrete numbers and assumptions. Finally, walk through client-visible symptoms during cutover, emphasizing trade-offs between consistency and availability.

Pro tip: Proactively discuss how you would measure and monitor RPO/RTO in production, and mention any mitigations like client-side retries or read-only fallbacks to reduce user impact.

1. Define the failure and failover mechanism

Describe the region failure and how failover is triggered—automatically via health checks or manually. Mention the replication setup (e.g., synchronous vs asynchronous) and the promotion of a standby replica.

2. Quantify RPO and RTO

State expected RPO (e.g., near-zero for sync replication, seconds/minutes for async) and RTO (e.g., minutes for automated failover). Justify with architecture details and note any dependencies like DNS TTL.

3. Explain client-visible impact during cutover

Detail what clients might experience: increased latency, errors, stale reads, or lost writes. Differentiate between read and write operations and mention any client-side retry logic.

4. Discuss trade-offs and mitigations

Highlight trade-offs between consistency and availability, and propose mitigations like idempotent writes, conflict resolution, or degraded read-only mode to minimize impact.

5. Summarize and validate

Recap the failover story, RPO/RTO, and client impact. Suggest testing via game days or chaos engineering to validate assumptions.

Key Points to Mention

  • Replication strategy: synchronous vs asynchronous and its effect on RPO
  • Failover automation: health checks, leader election, and promotion process
  • RTO components: detection time, promotion time, DNS propagation, client reconnection
  • Client-visible symptoms: errors, latency spikes, stale reads, lost writes
  • Trade-offs: consistency vs availability, data loss vs downtime
  • Mitigations: idempotent operations, retries with backoff, read-only fallback, conflict resolution

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