Develop a file system that manages files across multiple machines, providing users and applications with concurrent access to data stored on a network of servers. This system should ensure data integrity, reliability, and high availability, supporting features like replication, fault tolerance, and distributed locking. The design must accommodate large data volumes, provide mechanisms for efficient data distribution and retrieval, and maintain performance and scalability as the system grows. Examples include, Goolge filesystem, Hadoop Distributed File System (HDFS), Amazon S3 and Microsoft Azure Blob Storage.
Suggested time: 45 minutes
Loading the workspace...
A distributed file system looks like a simple file API (read, write, delete) but hides three real engineering challenges. First, chunking at scale: splitting petabytes into 64MB blocks across thousands of commodity nodes, while tracking 1.6 billion chunk locations in memory. Second, pipeline replication: every chunk is copied 3x across different racks using a chain pipeline (not fan-out) to minimize client bandwidth. Third, consensus for metadata: the metadata service is the brain of the entire system, and Raft consensus with leader election and log replication ensures it survives any single failure.
The building blocks this design relies on, each explained in its own lesson.
Design a Key Value Store (hard)
Design a Distributed Locking System (medium)
Design a Container Orchestration System (advanced)