Katkat

Design cloud storage system

CoinbaseSoftware Engineer · Online Assessment

Last updated

Design cloud storage system evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.

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