← HarveyAI Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

System design round at HarveyAI focused on building something close to their actual product, which made it feel less abstract than most design interviews. The follow-ups got pretty deep into upload mechanics and security, more than I expected.

Questions Asked (3)

Q1

Design a document storage system similar to Harvey's core vault product. Focus especially on scaling and access control.

System DesignTechnical Trade-offs
Author's notes

The fact that it was literally their own product made it a bit surreal.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a high-level architecture that separates storage, metadata, and access control layers. Dive deep into scaling strategies (sharding, replication, caching) and access control mechanisms (RBAC/ABAC, encryption), discussing trade-offs and failure modes.

Pro tip: Emphasize how access control decisions are enforced at every layer (API, service, storage) and how you'd audit and monitor them; this shows security maturity and aligns with Harvey's legal tech focus.

1. Clarify Requirements

Ask about scale (users, documents, size), access patterns (read/write ratio, sharing), security/compliance needs (encryption, audit logs), and consistency requirements.

2. High-Level Architecture

Propose a layered design: API gateway, metadata service, storage service (blob store), and access control service. Use microservices for scalability and separation of concerns.

3. Scaling Strategy

Discuss sharding (e.g., by tenant or document ID), replication for availability, caching (CDN for static content, Redis for metadata), and asynchronous processing for heavy tasks.

4. Access Control Design

Detail RBAC/ABAC models, permission checks at API and service levels, encryption at rest and in transit, and audit logging for compliance.

5. Trade-offs and Failure Handling

Discuss consistency vs. availability (CAP), latency vs. security, and how to handle failures (e.g., retries, circuit breakers, graceful degradation).

Key Points to Mention

  • Sharding and partitioning strategies for horizontal scaling
  • Replication and consistency models (e.g., eventual vs. strong consistency)
  • Caching layers (CDN, in-memory) to reduce latency and load
  • Role-Based Access Control (RBAC) and Attribute-Based Access Control (ABAC)
  • Encryption at rest and in transit, key management
  • Audit logging and monitoring for security and compliance

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

Q2

How would you handle very large file uploads in this system?

System DesignAPI & Integrations
Author's notes

Went straight to chunking and multipart upload, which was the right call.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: file sizes, expected concurrency, latency tolerance, and storage constraints. Then propose a chunked, resumable upload architecture using pre-signed URLs to offload data transfer from the application servers, and discuss how to handle metadata, validation, and post-processing asynchronously.

Pro tip: Mention that you would use pre-signed URLs to upload directly to object storage (e.g., S3) to avoid overwhelming the API servers, and that you'd implement chunking with checksums to ensure integrity and enable resumability.

1. Clarify Requirements

Ask about file sizes, upload frequency, concurrent users, and any compliance or latency requirements. This shapes the entire design.

2. Design Upload Flow

Propose a chunked, resumable upload protocol. Use pre-signed URLs so clients upload directly to object storage, bypassing the application servers.

3. Handle Metadata and Validation

Store file metadata in a database, validate file types and sizes, and compute checksums for integrity. Use asynchronous processing for virus scanning or content extraction.

4. Ensure Scalability and Reliability

Discuss horizontal scaling of upload services, retry mechanisms, and how to handle partial failures. Mention using a message queue for post-upload processing.

5. Address Security and Cost

Cover access control, encryption at rest and in transit, and cost optimization strategies like lifecycle policies for storage.

Key Points to Mention

  • Chunked and resumable uploads (e.g., tus protocol or custom implementation)
  • Pre-signed URLs for direct-to-storage uploads (e.g., AWS S3, GCS)
  • Asynchronous processing with message queues (e.g., SQS, RabbitMQ) for post-upload tasks
  • Checksums and validation to ensure data integrity
  • Horizontal scaling and load balancing for upload endpoints
  • Security considerations: access control, encryption, and virus scanning

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

Q3

For each chunk uploaded to object storage, how do you verify it actually belongs to the user who initiated the upload and hasn't been tampered with?

System DesignTechnical Trade-offs
Author's notes

This one tripped me up a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the threat model and trust boundaries, then describe a defense-in-depth strategy that ties each chunk to the authenticated user via signed upload tokens and per-chunk integrity checks. Emphasize server-side verification of ownership and cryptographic hashes, and discuss how to handle failures and trade-offs.

Pro tip: Mention that you would store the expected hash and owner metadata in a database at upload initiation, and verify them server-side after the chunk lands—never trust client-provided hashes alone. Also note that you'd use short-lived, scoped tokens to prevent replay and cross-user access.

1. Clarify the threat model

Identify who the adversaries are (malicious users, compromised clients, network attackers) and what they could attempt (chunk swapping, replay, tampering). This sets the scope for your verification mechanisms.

2. Bind chunks to the user and upload session

Use authenticated, short-lived upload tokens that encode the user ID and upload session ID. Require the client to present this token with each chunk, and validate it server-side before accepting the chunk.

3. Ensure integrity with cryptographic hashes

Compute a cryptographic hash (e.g., SHA-256) of each chunk on the client and send it with the chunk. On the server, recompute the hash and compare; also verify the chunk's hash against a pre-registered manifest if available.

4. Verify ownership and authorization server-side

After receiving the chunk, check that the upload session belongs to the authenticated user and that the chunk index is expected. Reject any chunk that doesn't match the session's owner or expected sequence.

5. Handle failures and discuss trade-offs

Describe how to respond to verification failures (e.g., reject chunk, log incident, invalidate session) and discuss trade-offs like performance overhead of hashing, token expiration, and the need for idempotency.

Key Points to Mention

  • Use of signed, short-lived upload tokens (e.g., JWT or pre-signed URLs) that include user ID and upload session ID.
  • Per-chunk cryptographic hashing (e.g., SHA-256) with server-side recomputation and comparison.
  • Server-side validation of ownership: check that the upload session belongs to the authenticated user.
  • Protection against replay attacks: include nonces or timestamps in tokens and enforce one-time use.
  • Storage of expected chunk metadata (hash, size, index) in a database at upload initiation for later verification.
  • Handling of verification failures: reject chunk, log for audit, and potentially invalidate the entire upload session.

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