PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Meta

Design an in-memory cloud storage system

Last updated: Mar 29, 2026

Quick Overview

This question evaluates system design competencies including API design, in-memory data modeling, efficient data structures for top-k queries, quota and merge semantics, snapshot and restore strategies, and time/space complexity analysis.

  • hard
  • Meta
  • System Design
  • Software Engineer

Design an in-memory cloud storage system

Company: Meta

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Take-home Project

Design and implement an in-memory cloud storage service that maps files to their metadata. Level 1: Provide APIs to add a file, retrieve a file, and delete a file by identifier; store at least name, size, and arbitrary metadata; specify return values and error handling. Level 2: Support querying the k largest files globally and, if applicable, per user; define tie-breakers for equal sizes. Level 3: Add users with storage capacity limits; enforce quotas on adds; implement merging of two users’ accounts and define how to resolve duplicate file identifiers or names. Level 4: Support backing up and restoring a user’s files; define snapshot semantics (point-in-time vs. rolling), storage overhead, and restore conflict policy. State and justify data structures, provide time/space complexities for each operation, and implement core methods. Persistence to a real filesystem is not required.

Quick Answer: This question evaluates system design competencies including API design, in-memory data modeling, efficient data structures for top-k queries, quota and merge semantics, snapshot and restore strategies, and time/space complexity analysis.

Related Interview Questions

  • Design an Online Game Leaderboard - Meta (hard)
  • Design an Instagram-like Media Feed - Meta (medium)
  • Design an Online Judge and Live Comments - Meta (medium)
  • Design an Instagram-like platform - Meta (medium)
  • Design a Coding Contest Platform - Meta (medium)
Meta logo
Meta
Sep 6, 2025, 12:00 AM
Software Engineer
Take-home Project
System Design
11
0

In-Memory Cloud Storage Service (Take-home)

Design and implement an in-memory cloud storage service that maps files to their metadata. The project is staged in levels; deliverables at each level should build on prior levels.

Assume a single process, in-memory store (no persistence to disk). Focus on clear APIs, correctness, complexity, and clean core implementations.

Level 1 — Core CRUD

Provide APIs to:

  1. Add a file (store at least: name, size, and arbitrary metadata)
  2. Retrieve a file by identifier
  3. Delete a file by identifier

Requirements:

  • Define request/response schemas (what arguments each API accepts and returns). Return created identifiers where applicable.
  • Define error handling: how not-found, invalid input, and other conflicts are surfaced.
  • Specify time and space complexities for each operation.

Level 2 — Top-k Largest Files

Add APIs to query:

  1. The k largest files globally
  2. The k largest files per user (if users exist in your model at this point; otherwise introduce them here)

Requirements:

  • Define tie-breakers when sizes are equal (e.g., by file name, then by identifier).
  • Provide complexity and data structure choices.

Level 3 — Users and Quotas; Account Merge

Add users and enforce storage capacity limits (quotas):

  • Users have a capacity limit (bytes). Adding files must respect the user’s quota.
  • Implement merging two users’ accounts.

Requirements:

  • Define how to resolve conflicts during merge, including duplicate file identifiers or names.
  • Define whether merge is all-or-nothing or best-effort and justify your choice.
  • Provide complexities.

Level 4 — Backup and Restore

Support backing up and restoring a user’s files.

Requirements:

  • Define snapshot semantics: point-in-time vs. rolling/incremental.
  • Describe storage overhead trade-offs for your snapshot design (e.g., deep copy vs. copy-on-write).
  • Define restore policy: replace vs. merge behavior, conflict handling, and quota enforcement.
  • Provide complexities.

Deliverables

  • State and justify your data structures and invariants.
  • Provide time/space complexity for each operation.
  • Implement core methods covering all levels. Pseudocode or real code is acceptable; clarity and correctness matter more than language choice.
  • Persistence to a real filesystem is NOT required.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Meta•More Software Engineer•Meta Software Engineer•Meta System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.