← Google Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

System design round at Google for a software engineer role. The problem was meaty enough that I kept second-guessing whether I was going too deep on certain parts or not deep enough on others.

Questions Asked (1)

Q1

Design a multi-tenant file storage service that supports upload, retrieval, and deletion, with deduplication of identical files, strict user isolation, no database allowed (filesystem APIs only), content-addressed storage, reference counting, garbage collection, and support for scaling across multiple storage nodes.

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This is a beast of a question and I did not pace myself well.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a content-addressed storage design using filesystem APIs for metadata and data. Explain how deduplication, reference counting, and garbage collection work together to ensure isolation and scalability across nodes.

Pro tip: Emphasize that deduplication must be scoped per tenant to prevent cross-tenant information leakage, and discuss how to handle concurrent uploads and deletions safely with filesystem primitives like atomic renames and lock files.

1. Clarify Requirements and Constraints

Ask questions to confirm scale, consistency needs, and isolation requirements. Highlight that no database means metadata must be stored in files, and design must handle multi-node coordination.

2. Design Content-Addressed Storage Layout

Propose storing files by their hash (e.g., SHA-256) in a directory structure, with per-tenant namespaces to ensure isolation. Explain how uploads compute hash, check existence, and store only if new.

3. Implement Reference Counting and Metadata

Use filesystem-based reference counts (e.g., a file per hash containing count and tenant references) to track deduplication. Ensure atomic updates using file locks or atomic operations.

4. Handle Deletion and Garbage Collection

On delete, decrement reference count; when zero, mark for deletion. Implement a garbage collector that scans for unreferenced files and removes them, handling race conditions with locking.

5. Scale Across Multiple Storage Nodes

Discuss sharding by hash or tenant, using consistent hashing for node assignment. Explain how nodes coordinate via a shared filesystem or distributed protocol, and how to handle failures.

Key Points to Mention

  • Content-addressed storage using cryptographic hashes for deduplication
  • Per-tenant isolation via separate namespaces or access controls
  • Reference counting to manage deduplicated file lifecycle
  • Garbage collection strategies for unreferenced files
  • Filesystem-based metadata storage and atomic operations
  • Scaling with consistent hashing and node coordination

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