PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Coinbase

Design cloud storage system

Last updated: Mar 29, 2026

Quick Overview

This question evaluates competence in system design, in-memory data structures, multi-tenant state management, API design, and operational semantics (capacity enforcement, merge/rename rules, and versioned backups) and is classified in the System Design domain; it probes both conceptual understanding and practical application.

  • medium
  • Coinbase
  • System Design
  • Software Engineer

Design cloud storage system

Company: Coinbase

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Take-home Project

##### Question Design and implement an in-memory cloud storage system that maps files to their metadata and supports: add_file(name, size) / get_file_size(name) / delete_file(name) get_n_largest(prefix, n) to return the n largest files with a given name prefix multi-user support with add_user(user_id, capacity) and add_file_by(user_id, name, size) enforcing per-user capacity limits merge_user(user_id1, user_id 2) combining users and their files backup_user(user_id) and restore_user(user_id) for versioned backups that do not affect other users’ files or capacities

Quick Answer: This question evaluates competence in system design, in-memory data structures, multi-tenant state management, API design, and operational semantics (capacity enforcement, merge/rename rules, and versioned backups) and is classified in the System Design domain; it probes both conceptual understanding and practical application.

Related Interview Questions

  • Design Crypto Order Routing - Coinbase (hard)
  • Design a crypto trading web frontend - Coinbase (hard)
  • Design query pagination for large datasets - Coinbase (medium)
  • Design a food delivery system - Coinbase (medium)
  • Design real-time crypto prices homepage - Coinbase (hard)
Coinbase logo
Coinbase
Jul 29, 2025, 8:05 AM
Software Engineer
Take-home Project
System Design
58
0

In-Memory Cloud Storage: Design and Implement

You are asked to design and implement an in-memory cloud storage system that maintains a mapping from file names to their metadata (size) and supports both single-user and multi-user operations.

Assumptions to make explicit:

  • File names are unique per user. The early single-user functions operate in a special default user namespace.
  • Sizes are non-negative integers (bytes). Capacity is the maximum total size (sum of file sizes) allowed per user.
  • For get_n_largest(prefix, n), return the n largest files across all users whose names start with prefix. Each result should identify the user.
  • merge_user(u1, u2) combines user2 into user1; user1 remains, user2 is deleted. Capacity becomes the sum of both users' capacities.
  • If file name collisions occur during merge, rename the incoming conflicting file(s) from user2 by appending a suffix to ensure uniqueness (e.g., "name (merged 2)").
  • backup_user and restore_user operate per user and do not affect other users' files or capacities.

Required API

Single-user (default namespace):

  1. add_file(name, size)
  2. get_file_size(name) → size or None
  3. delete_file(name)
  4. get_n_largest(prefix, n) → list of (user_id, name, size)

Multi-user:

  1. add_user(user_id, capacity)
  2. add_file_by(user_id, name, size) // enforce per-user capacity limits
  3. merge_user(user_id1, user_id2) // combine users and their files; capacity sums; rename on conflicts
  4. backup_user(user_id) → version_id // versioned backups per user
  5. restore_user(user_id, version_id=None) // restore to a saved version (latest if None)

Deliverables

  • Data structures and algorithms to support the operations.
  • Clear semantics for edge cases (e.g., capacity enforcement, file collisions on merge, restore behavior).
  • Time/space complexity discussion and potential optimizations for prefix queries.
  • A working in-memory implementation (any mainstream language) with small usage examples/tests.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Coinbase•More Software Engineer•Coinbase Software Engineer•Coinbase 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.