Design cloud storage with quotas and compression
InstacartSoftware Engineer · Online AssessmentLast updated
This question evaluates a candidate's ability to design a multi-tenant cloud storage system, testing competencies in API design, quota accounting, compression strategies, distributed storage architecture (partitioning, replication/erasure coding), consistency models, security, versioning, and observability.
Design a multi-tenant cloud storage service. Requirements:
- Support adding (uploading) new files, retrieving files, and copying files; define APIs and copy semantics (server-side copy, deep copy, copy-on-write) and how metadata and permissions propagate.
- Support adding users with per-user capacity limits and tiers; describe quota accounting, enforcement at upload time, and how copies and compression count toward quotas.
- Support compressing files on upload and decompressing on download; choose algorithms, placement in the data path, metadata storage, and trade-offs between CPU cost, latency, and storage savings.
- Ensure durability, availability, scalability, and consistency; detail components (object store, metadata service, index), partitioning, replication, background tasks, and failure recovery.
- Cover security (authentication, authorization/ACLs), auditing, versioning, and monitoring; propose APIs/methods for each feature and outline tests.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.