KatInterview

Build a Multi-Region Distributed Storage Platform

System DesignModel answer
HardModel answerSystem Designdistributed-systemsstoragereplication

Last updated

Design a cloud storage system handling file uploads, synchronization, and sharing with strong durability, partition tolerance, and global availability.

You're tasked with architecting a distributed storage platform similar to enterprise file-sharing services. Users should be able to upload files, organize them in folders, keep them synchronized across multiple devices, share with collaborators, and access version history.

Your design should address:

  1. Requirements clarification: Define functional capabilities and quantify non-functional targets (durability SLAs, latency percentiles, availability zones, throughput expectations, and consistency guarantees).

  2. Component architecture: Identify the major services, data stores, message buses, and client responsibilities. Explain how they communicate.

  3. API contracts and data schemas: Specify the key endpoints and how you model files, revisions, namespaces, and access control.

  4. Data distribution: Describe your sharding strategy, replication topology, and consistency model. Address transactions, preventing duplicate processing, and handling schema changes over time.

  5. Performance layers: Explain where and how you cache data at the client, edge network, and application tiers.

  6. Traffic management: Cover load distribution, request routing across regions, and horizontal scaling policies.

  7. Resilience patterns: Detail timeout policies, retry strategies with backoff, cascading failure prevention, graceful degradation, and disaster recovery targets (recovery point and time objectives).

  8. Operations and security: Outline monitoring, logging, tracing, request throttling, authentication, authorization, and encryption approaches.

  9. Growth planning: Estimate capacity needs from user and traffic assumptions, identify cost optimization opportunities, and sketch a phased scaling approach.

  10. Risk assessment: Call out the most likely bottlenecks, failure modes, and how you'd mitigate them.

Throughout, justify your choices and discuss the trade-offs between alternatives.

Hints

Hint 1

Choose a specific problem domain immediately—generic designs without concrete use cases rarely succeed

Hint 2

Separate metadata operations from content operations; they have different consistency, durability, and throughput characteristics

Hint 3

Content-addressed storage enables deduplication, resumable uploads, and simplified caching

Hint 4

Sharding by user namespace allows single-shard transactions and avoids distributed coordination on the critical path