← Harvey Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

System design round at HarveyAI for a software engineer role. The interviewer pushed way deeper than I expected on two specific areas, file uploads and access control, and I came out of it feeling like I'd only half-answered both.

Questions Asked (2)

Q1

Design the file upload flow for a Google Drive-like system, including chunking, resumable uploads, deduplication, and how you separate metadata storage from blob storage.

System DesignTechnical Trade-offsData Modeling
Author's notes

I started with the happy path, client uploads a file, server stores it, done.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (file sizes, concurrency, consistency, cost) and then walk through the end-to-end upload flow: client chunks the file, uploads chunks with resumable sessions, server stores chunks in blob storage and metadata in a database. Emphasize deduplication via content hashing and separation of metadata (SQL/NoSQL) from blob storage (object store) to enable scalability and cost efficiency.

Pro tip: Proactively discuss trade-offs: e.g., chunk size vs. overhead, strong vs. eventual consistency for dedup, and how to handle partial failures. Also mention that dedup should be done at chunk level to maximize storage savings and that metadata should include references to blob locations.

1. Clarify Requirements and Constraints

Ask about expected file sizes, upload frequency, consistency needs, and budget. This shapes decisions on chunk size, storage systems, and dedup strategy.

2. Design Chunking and Resumable Upload Protocol

Define chunk size (e.g., 5-10 MB), use a session ID to track upload progress, and allow clients to resume by querying which chunks are already received. Consider using HTTP range requests or a custom protocol.

3. Implement Deduplication at Chunk Level

Compute a cryptographic hash (e.g., SHA-256) for each chunk. Before storing, check if the hash exists in a dedup index; if so, reference the existing blob instead of storing a duplicate.

4. Separate Metadata and Blob Storage

Store file metadata (name, owner, permissions, chunk list, hashes) in a transactional database (e.g., PostgreSQL). Store actual chunk data in a scalable object store (e.g., S3, GCS). Metadata references blobs by unique IDs.

5. Handle Failure, Consistency, and Garbage Collection

Design for retries, idempotent chunk uploads, and eventual consistency in dedup. Implement garbage collection for orphaned blobs when files are deleted or dedup references drop to zero.

Key Points to Mention

  • Chunk size trade-offs: smaller chunks reduce retransmission but increase overhead; larger chunks are efficient but risk more rework.
  • Resumable upload session management: session ID, chunk status tracking, and client-side retry logic.
  • Deduplication using content-addressable storage: hash chunks, check existence, and reference existing blobs.
  • Metadata vs. blob storage separation: use a relational DB for metadata and an object store for blobs to scale independently.
  • Consistency models: strong consistency for metadata, eventual consistency for dedup index, and how to handle race conditions.
  • Security and access control: ensure uploads are authenticated, chunks are encrypted, and metadata enforces permissions.

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

Q2

How would you design the access control system for a cloud storage product, covering user and group sharing, link-based permissions, folder inheritance, and ACL checks at scale?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This one exposed a gap I didn't know I had.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a layered model with users, groups, resources, and permissions, using a centralized authorization service. Explain how to handle inheritance, link sharing, and efficient ACL checks with caching and indexing, and discuss trade-offs between consistency and performance.

Pro tip: Emphasize the importance of a consistent authorization model and the use of a dedicated service with caching and precomputed effective permissions to achieve low-latency checks at scale. Also, mention the need for auditability and revocation propagation.

1. Clarify Requirements and Scale

Ask about expected number of users, groups, resources, sharing patterns, and performance requirements. Clarify consistency needs (e.g., immediate revocation) and compliance constraints.

2. Design Core Data Model

Define entities: users, groups, resources (files/folders), permissions (read/write/share), and ACLs. Decide on a model that supports direct user/group grants and link-based permissions.

3. Handle Inheritance and Link Sharing

Explain how folder inheritance works (e.g., propagating permissions down the tree) and how link-based permissions are represented (e.g., tokens with scoped access). Discuss how to resolve effective permissions.

4. Implement Efficient ACL Checks

Propose a centralized authorization service with caching (e.g., Redis) and precomputed effective permissions. Use indexing (e.g., by user/group and resource) to quickly answer 'can user X access resource Y?'.

5. Address Scale and Trade-offs

Discuss scaling strategies: sharding, read replicas, cache invalidation, and eventual consistency. Trade-offs between strong consistency (slower) and eventual consistency (faster but risk of stale permissions).

Key Points to Mention

  • Use of a centralized authorization service (e.g., Zanzibar-style) for consistent policy evaluation.
  • Caching effective permissions and using inverted indexes for fast lookups.
  • Handling inheritance efficiently by precomputing or using hierarchical path-based checks.
  • Link-based permissions as signed tokens with scoped access and optional expiration.
  • Trade-offs between consistency and performance, and strategies for revocation propagation.
  • Auditability and logging of permission changes for compliance.

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