Senior LevelSystem Design & Architecture
How do you design a Distributed File System (like Google File System / HDFS)?
β Interview Prompt: Explain Distributed File Systems (GFS / HDFS), Master/NameNode metadata, Chunkservers/DataNodes, 64MB chunk sizes, and rack-aware replication.
Designing a large-scale Distributed File System (Google File System / HDFS):
Architecture:
1
Single Master Node (NameNode): Stores directory namespace metadata and chunk locations in memory.
2
Chunkservers (DataNodes): Store large fixed-size file chunks (64MB) on local commodity disk drives.
3
Rack-Aware 3x Replication: Every chunk is replicated 3 times (2 chunks on the same rack, 1 chunk on a distinct rack for disaster recovery).
Code Implementation Example
markdown
Distributed File System (GFS/HDFS) Architecture:
[Master / NameNode (Metadata in RAM)]
β
(Directs Client to Chunk Locations)
β
βΌ
[Client] ββ(Read 64MB Chunk)ββ> [Chunkserver 1 (Rack A)]
β (Rack-Aware Sync)
βΌ
[Chunkserver 2 (Rack B)]π‘Distributed File System architecture with Master and Chunkserver replication.
π― Interview Key Takeaway
Design distributed file systems using centralized metadata masters and chunkservers with rack-aware replication.
#System Design#DFS#GFS#HDFS#Senior
Back to all System Design & Architecture Questionsβ