← Harvey Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

System design round at HarveyAI focused almost entirely on building a Google Drive-like service, with a heavy lean toward the access control layer. Solid depth required, and the permission propagation piece in particular took more time than I expected.

Questions Asked (6)

Q1

Design the file and folder data model for a cloud storage service, including how parent-child hierarchy works and how permissions are inherited down the tree.

System DesignData Modeling
Author's notes

I started with a basic node table with a parent_id pointer and felt pretty good about it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a core schema for files and folders with a parent-child relationship, and finally explain how permissions are stored and inherited down the tree. Use a concrete example to illustrate traversal and inheritance, and discuss trade-offs of your design.

Pro tip: Mention that permission inheritance can be optimized by storing only explicit permissions and computing effective permissions via ancestor traversal, or by denormalizing with materialized paths or closure tables for faster reads. Also note the importance of handling moves and deletes without breaking inheritance.

1. Clarify requirements and scale

Ask about expected scale (number of files, depth of hierarchy), consistency needs, and permission model complexity (e.g., role-based, user-based). This shows you avoid over-engineering and focus on relevant constraints.

2. Design core entities and relationships

Define a Node table (or separate File and Folder tables) with id, name, type, parent_id, owner_id, and timestamps. Use a self-referencing foreign key for parent-child hierarchy, and consider indexing parent_id for efficient child lookups.

3. Model permissions and inheritance

Create a Permission table linking nodes to users/groups with a role (e.g., read, write, admin). Explain that permissions are inherited from ancestors unless overridden, and describe how to compute effective permissions by traversing up the tree or using precomputed paths.

4. Address traversal and performance

Discuss strategies for efficient ancestor/descendant queries: recursive CTEs, closure tables, or materialized paths. Mention trade-offs between write complexity and read performance, especially for permission checks.

5. Handle edge cases and operations

Cover moving nodes (updating parent_id and ensuring no cycles), deleting nodes (cascading or soft delete), and how permission inheritance is affected. Also mention sharing links and public access.

Key Points to Mention

  • Self-referencing parent_id for hierarchy; consider closure table or materialized path for efficient ancestor queries.
  • Permissions stored as explicit grants on nodes; effective permissions computed by traversing ancestors and applying overrides.
  • Indexing strategy: index parent_id for child retrieval, and consider composite indexes for permission lookups.
  • Handling moves: prevent cycles, update paths/closure entries, and ensure inherited permissions are recalculated.
  • Caching effective permissions to avoid repeated tree traversals, with invalidation on permission changes.
  • Trade-offs: normalization vs denormalization for read-heavy permission checks; eventual consistency vs strong consistency.

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

Q2

Walk through the sharing model: what permission roles exist (owner, editor, commenter, viewer), and how do you support sharing by user, group, link, and domain?

System DesignTechnical Trade-offs
Author's notes

Felt like a warmup but the group expansion question caught me mid-sentence.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the permission roles and their capabilities, then explain how sharing works for each principal type (user, group, link, domain). Emphasize the data model, inheritance, and trade-offs around access control and performance.

Pro tip: Mention that you would implement an access control list (ACL) with role-based permissions and consider using a graph-based model for efficient permission checks, especially for nested groups. Also highlight the importance of audit logs and revocation for security.

1. Define Permission Roles

Clearly outline the four roles: owner (full control, can transfer ownership), editor (can modify content), commenter (can add comments but not edit), viewer (read-only). Mention that roles are hierarchical and can be customized.

2. Describe Sharing Mechanisms

Explain how sharing works for each principal: user (direct assignment), group (inherited permissions), link (anyone with link, optionally password-protected or expiring), and domain (restricted to organization's domain).

3. Explain Data Model and Storage

Describe how permissions are stored, e.g., a permissions table with resource ID, principal ID, principal type, role, and expiration. Mention indexing for fast lookups and caching for performance.

4. Discuss Inheritance and Conflict Resolution

Cover how permissions are inherited from parent folders or groups, and how conflicts are resolved (e.g., most permissive wins, or explicit deny overrides). Mention the need for efficient traversal.

5. Address Trade-offs and Edge Cases

Talk about trade-offs: simplicity vs. flexibility, performance vs. granularity, and security vs. usability. Mention edge cases like link revocation, group membership changes, and domain-wide sharing risks.

Key Points to Mention

  • Role hierarchy and capabilities (owner, editor, commenter, viewer)
  • Sharing by user, group, link, and domain with specific considerations for each
  • Data model: ACLs, permission tables, and efficient indexing
  • Inheritance and conflict resolution strategies (e.g., most permissive, explicit deny)
  • Performance optimizations: caching, precomputed permissions, and graph traversal
  • Security and auditability: logging, revocation, and expiration

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

Q3

How do you handle permission propagation when a parent folder's ACL changes? What happens to children that have explicit permission overrides?

System DesignTechnical Trade-offs
Author's notes

This is where the interview got interesting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining the permission model (e.g., ACL inheritance with explicit overrides) and then walk through the propagation logic step-by-step, covering both inherited and explicit permissions. Emphasize how you handle conflicts, performance, and consistency, and discuss trade-offs between immediate propagation and lazy evaluation.

Pro tip: Mention that explicit overrides should always take precedence, but also highlight the importance of auditing and versioning to avoid orphaned permissions when parent ACLs change. This shows you consider real-world maintainability, not just the happy path.

1. Clarify the permission model

State assumptions about how permissions work: inheritance from parent, explicit overrides on children, and whether permissions are additive or replaceable. This sets the foundation for your answer.

2. Describe propagation on parent ACL change

Explain that when a parent's ACL changes, inherited permissions on children are updated, but explicit overrides remain unchanged. Mention that this can be done eagerly (immediate update) or lazily (on access).

3. Address explicit overrides

Detail that children with explicit permissions are not affected by parent changes for those specific permissions. Discuss how to merge inherited and explicit permissions, and how to resolve conflicts (e.g., explicit wins).

4. Discuss implementation and trade-offs

Compare eager vs. lazy propagation: eager ensures consistency but may be expensive for large trees; lazy is efficient but can lead to stale permissions. Mention caching, versioning, and background jobs.

5. Cover edge cases and consistency

Talk about handling cycles, orphaned permissions, and ensuring atomicity. Suggest using a versioned ACL model or a permission resolution service to centralize logic.

Key Points to Mention

  • Inheritance vs. explicit permissions: explicit overrides take precedence.
  • Propagation strategies: eager (immediate) vs. lazy (on-demand) updates.
  • Performance considerations: large folder trees, caching, and batch updates.
  • Consistency and atomicity: ensuring no partial updates during propagation.
  • Conflict resolution: how to merge inherited and explicit permissions (e.g., union, intersection, or override).
  • Auditing and versioning: tracking changes and enabling rollback or debugging.

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

Q4

How would you design the access check system to work at low latency and scale? Think about denormalized caches and relationship-tuple approaches.

System DesignAPI & Integrations
Author's notes

I'd read a bit about Zanzibar-style systems before this and it showed, maybe too much.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what types of resources, relationships, and scale are we dealing with? Then propose a hybrid architecture that combines a denormalized cache for fast reads with a relationship-tuple store (like Zanzibar) for correctness and flexibility, and discuss how to keep them in sync.

Pro tip: Emphasize that the cache should be treated as a performance optimization, not the source of truth, and always have a fallback to the authoritative store. Also, mention that you'd measure and monitor cache hit rates and latency to ensure the system meets SLAs.

1. Clarify Requirements

Ask about the scale (number of users, resources, relationships), latency targets, consistency requirements, and the types of access checks needed.

2. Design the Core Data Model

Propose a relationship-tuple store (e.g., Zanzibar-style) as the source of truth, where each tuple represents a relation between a user and a resource. Discuss how to model hierarchical relationships and groups.

3. Introduce Denormalized Caches

Design a cache layer that stores precomputed access decisions or flattened relationship data for fast lookups. Consider using an in-memory store like Redis with appropriate TTLs and invalidation strategies.

4. Ensure Consistency and Invalidation

Describe how to keep the cache in sync with the source of truth: use write-through or change data capture (CDC) to invalidate or update cache entries when relationships change.

5. Address Scalability and Latency

Discuss sharding, replication, and caching strategies to handle high throughput and low latency. Mention monitoring, metrics, and fallback mechanisms.

Key Points to Mention

  • Relationship tuples (e.g., Zanzibar model) for flexible and correct access control
  • Denormalized cache for fast reads, with TTL and invalidation strategies
  • Consistency trade-offs: eventual consistency vs. strong consistency
  • Sharding and replication for scalability
  • Monitoring cache hit rates and latency to ensure performance
  • Fallback to authoritative store on cache miss or inconsistency

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

Q5

What would an audit logging system look like for this service? What events do you capture, and how do you store and query them?

System DesignData Modeling
Author's notes

Honestly the part I gave the least thought to beforehand.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the service's purpose and compliance requirements, then propose a structured audit logging system that captures key events with sufficient context. Focus on a scalable storage and querying strategy that balances performance, cost, and security.

Pro tip: Emphasize immutability and tamper-evidence (e.g., append-only logs, cryptographic hashing) to ensure audit integrity, and discuss how to handle sensitive data with encryption and access controls.

1. Clarify Requirements and Scope

Ask about the service's domain, regulatory needs (e.g., SOC2, GDPR), and what actions are considered auditable. Determine retention periods and query patterns.

2. Define Events to Capture

List critical events such as authentication, authorization changes, data access/modification, configuration changes, and admin actions. Include metadata like actor, timestamp, IP, and resource.

3. Design Storage Architecture

Choose a storage solution (e.g., append-only log, time-series DB, or data lake) that ensures durability, scalability, and cost-efficiency. Consider partitioning by time and using cold storage for older logs.

4. Plan Query and Analysis

Define indexing strategies (e.g., by actor, event type, time) to support fast queries. Provide APIs or tools for searching, filtering, and generating reports.

5. Address Security and Compliance

Implement encryption at rest and in transit, access controls, and audit log integrity checks. Ensure logs are immutable and retained per policy.

Key Points to Mention

  • Event schema: include who, what, when, where, and outcome (success/failure).
  • Storage: use append-only, immutable storage like Amazon S3 with object lock or a write-ahead log.
  • Querying: index key fields and support time-range queries; consider using Elasticsearch for full-text search.
  • Retention and lifecycle: tiered storage (hot/warm/cold) and automated deletion after retention period.
  • Security: encrypt logs, restrict access via IAM, and use cryptographic hashing for tamper detection.
  • Scalability: handle high write throughput with partitioning and asynchronous logging to avoid impacting service performance.

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

Q6

Briefly cover how you'd handle file storage, client sync, and conflict resolution.

System DesignTechnical Trade-offs
Author's notes

They flagged this as a 'quick pass' topic so I kept it tight.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints (e.g., file types, scale, offline support, consistency needs) before diving into the design. Then propose a high-level architecture that covers storage, sync, and conflict resolution, and discuss trade-offs for each component. Keep the answer structured and focused on the most critical decisions.

Pro tip: Demonstrate awareness of real-world constraints by mentioning how you'd handle edge cases like large files, intermittent connectivity, and security/compliance (especially relevant for legal AI). Also, tie your choices to business needs like cost, latency, and user experience.

1. Clarify Requirements

Ask questions to understand the scope: file sizes, number of users, devices, offline support, consistency vs. availability, security/compliance needs. This shows you can tailor the design to the problem.

2. Design File Storage

Propose a storage solution (e.g., object storage like S3 for blobs, metadata in a database). Discuss chunking, deduplication, encryption, and access control. Mention trade-offs between cost, durability, and performance.

3. Design Client Sync

Outline a sync protocol: how clients detect changes (e.g., polling, WebSockets, delta sync), handle offline edits, and manage bandwidth. Consider using a sync engine or building custom with version vectors.

4. Handle Conflict Resolution

Explain strategies: last-write-wins, operational transformation, CRDTs, or manual merge. Discuss when to use each and how to surface conflicts to users. Emphasize data integrity and user experience.

5. Summarize Trade-offs

Wrap up by highlighting key trade-offs (e.g., consistency vs. availability, complexity vs. scalability) and how your choices align with the company's needs. Mention potential future improvements.

Key Points to Mention

  • Object storage (e.g., S3) for blobs with metadata in a relational or NoSQL database
  • Chunking and deduplication to optimize storage and transfer
  • Delta sync and version vectors to minimize data transfer and track changes
  • Conflict resolution strategies: last-write-wins, CRDTs, operational transformation, and when to use each
  • Offline support and eventual consistency models
  • Security: encryption at rest and in transit, access control, and compliance (e.g., GDPR, HIPAA)

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