Skip to the content.

πŸ“ What is HDFS Architecture?

HDFS (Hadoop Distributed File System) is the storage layer of the Hadoop ecosystem. It is designed to store very large files reliably across a cluster of machines and provide high throughput access to application data.


πŸ—οΈ High-Level Architecture of HDFS

HDFS follows a Master-Slave architecture, and consists of three main components:

Component Role
NameNode 🧠 The master that manages the file system namespace and metadata
DataNode πŸ’Ύ The workers/slaves that store actual data blocks
Secondary NameNode πŸ› οΈ Performs periodic checkpointing of NameNode metadata (⚠️ not a backup or standby NameNode)

πŸ” Key Concepts

1. NameNode (Master)

2. DataNode (Slave)

3. Secondary NameNode


πŸ“¦ HDFS File Storage Strategy


🧭 Workflow: How HDFS Works

πŸ“ Writing a File

  1. Client contacts NameNode for metadata (e.g., block locations).
  2. NameNode provides list of DataNodes for each block.
  3. Client writes data directly to DataNodes (not through NameNode).
  4. Data is replicated as per the replication factor.

πŸ“– Reading a File

  1. Client contacts NameNode for block locations.
  2. Client reads directly from DataNodes that have the required blocks.

βœ… Key Features of HDFS

Feature Description
Fault Tolerant Uses replication to handle node failures
High Throughput Optimized for large datasets and streaming reads
Scalable Easily add more nodes for storage and throughput
Write Once, Read Many Optimized for batch processing, not random writes
Rack Awareness Smart placement of replicas for fault isolation

πŸ“Š Summary

β€œHDFS is a distributed file system that stores data across a cluster in a fault-tolerant and scalable way. It uses a master-slave architecture with a NameNode for metadata and DataNodes for actual storage. Files are split into blocks and replicated across nodes to ensure availability and durability. HDFS is optimized for high throughput, large-scale data processing, and forms the storage backbone of the Hadoop ecosystem.”