Table of Contents

What Is HDFS Storage? Architecture & Examples

Hao Wu
Software Engineer
|
September 3, 2026

HDFS is built for large files, high-throughput access, and automatic recovery from individual disk or server failures on DataNodes. Those priorities suit batch analytics and established on-premises data platforms, but they fit transaction-heavy applications and large collections of small files poorly. NameNode service continuity separately requires an HA configuration.

This guide follows a file from ingestion through storage and retrieval. It explains the roles of the NameNode, DataNodes, clients, blocks, and replicas, then places HDFS alongside YARN, MapReduce, Hive, Spark, and graph analytics in the broader Hadoop ecosystem.

What is HDFS storage?

Hadoop Distributed File System, or HDFS, is the distributed storage layer in Apache Hadoop. Users see a hierarchical namespace of files and directories. Internally, HDFS splits each file into large blocks, distributes those blocks across DataNodes, and usually stores redundant copies so the file remains available when hardware fails. A central NameNode maintains the namespace and records which DataNodes hold each block.

The system separates metadata from file data. The NameNode handles operations such as opening, closing, renaming, and locating files. DataNodes store the block contents and serve reads and writes. An HDFS client contacts the NameNode for metadata, then transfers bytes directly to or from DataNodes. Bulk data does not pass through the NameNode.

HDFS storage provides filesystem operations over byte sequences rather than database or table-format semantics. A CSV, JSON, Avro, ORC, or Parquet file can live in HDFS, but HDFS itself does not interpret rows, columns, or schemas. Engines such as Hive and Spark add those higher-level abstractions.

The design favors a write-once-read-many model. HDFS supports appending and truncating files, but it does not provide arbitrary in-place updates. It also permits only one writer for a file at a time. These choices simplify consistency and support long sequential reads over large datasets.

Why HDFS storage matters

HDFS distributes storage capacity and failure handling across a cluster. Files can span the disks of multiple machines, while redundant blocks allow access to continue through ordinary DataNode failures.

Capacity scales across machines. A file's blocks can reside on several DataNodes, so the file can be larger than any one disk. Adding nodes expands aggregate storage and I/O capacity, subject to operational constraints such as balancing, network topology, and NameNode metadata capacity.

Failure is part of normal operation. DataNodes send heartbeats and block reports to the NameNode. Missing heartbeats cause the NameNode to mark a DataNode as unavailable and stop directing new I/O to it, while block reports describe the blocks each DataNode holds. The NameNode arranges replacement copies for blocks that have fallen below their configured replication level. Applications do not need to reconstruct every file manually after an ordinary DataNode failure.

Computation can run near data. Hadoop schedulers and processing frameworks can place tasks on, or close to, machines that store the input blocks. This reduces network transfer for large scans. The benefit is strongest when storage and compute share cluster nodes, the traditional HDFS deployment model.

These properties made HDFS central to the original Hadoop architecture. They still matter in self-managed environments that need durable distributed storage on local cluster disks. Cloud object storage addresses many of the same data-lake requirements through a different operational and scaling model.

How HDFS storage works

HDFS coordinates each operation through a control path and a data path. The NameNode is on the control path. It authorizes namespace operations and returns block locations. DataNodes and clients form the data path, moving file contents without routing them through the metadata service.

For a new file, the client asks the NameNode to create an entry in the namespace. The NameNode checks permissions and namespace constraints, then returns pipeline targets selected under the replication and placement policies. The client sends packets to the first DataNode, which forwards them down the pipeline. As the file grows beyond one block, the client requests another set of targets and continues.

For an existing file, the client asks the NameNode for block locations. It selects a nearby replica, connects to that DataNode, and reads the bytes. If the replica is unavailable or fails a checksum check, the client can try another copy.

Meanwhile, DataNodes send periodic heartbeats and reports of the blocks they hold. The NameNode uses that information to maintain its block map, identify unavailable nodes, schedule re-replication, and direct block deletion. The NameNode decides what should happen, while DataNodes perform the storage work.

This division is the central HDFS mechanism. It lets clients transfer large volumes of data in parallel while one metadata authority preserves a coherent filesystem namespace.

HDFS architecture explained

Four roles define the common HDFS architecture.

NameNode. The NameNode owns the filesystem namespace. It tracks directories, permissions, file-to-block mappings, replication settings, and the DataNodes that report each block. It keeps the working namespace and block map in memory for fast metadata access. Namespace state is persisted through an FsImage checkpoint and an EditLog of subsequent changes.

DataNodes. DataNodes manage storage attached to worker machines. A DataNode stores each HDFS block as a file in its local filesystem, serves checksummed data to clients, and creates, deletes, or copies blocks when instructed. It reports its block inventory to the NameNode at startup and periodically afterward.

HDFS clients. The client library presents filesystem operations to applications and command-line tools. It communicates with the NameNode for metadata and with DataNodes for actual data. This client-side coordination is what allows a normal file operation to span several machines.

Checkpoint and high-availability services. A checkpoint process periodically merges EditLog transactions into a new FsImage so recovery does not require replaying an indefinitely growing log. The checkpoint process is not a hot backup. Production clusters can instead use HDFS high availability, commonly with active and standby NameNodes plus JournalNodes that maintain a shared edit log. The standby keeps its namespace current and can take over after a failure.

Figure: HDFS keeps metadata coordination separate from bulk file transfer: the NameNodes maintain a shared namespace view, while clients and DataNodes move and replicate blocks directly.

High availability and HDFS Federation solve different problems. High availability provides another NameNode for the same namespace so the service can survive a NameNode failure. Federation uses multiple independent NameNodes and namespaces, each with its own block pool, to scale namespace throughput and isolate workloads. A large deployment may use both.

How data is stored in HDFS

An HDFS file is stored as an ordered sequence of blocks. The block size is configurable per file, and HDFS typically uses large blocks. Every block except the final block usually reaches the configured size. Large blocks reduce the amount of metadata the NameNode must track and give processing engines substantial sequential ranges to scan.

HDFS normally protects blocks with replication. The replication factor is set when a file is created and can be changed later. The NameNode selects targets based on node health, available storage, rack topology, and the file's storage policy. Rack-aware placement spreads risk beyond a single machine and can preserve access through a rack-level failure while limiting unnecessary cross-rack traffic.

Replication consumes additional raw capacity. For colder or less frequently accessed data, HDFS erasure coding offers another durability mechanism. It divides data into cells, calculates parity cells, and distributes a block group across DataNodes. This can reduce storage overhead relative to multiple full replicas, but reconstruction adds CPU and network work when data is missing. Replication remains useful for hot data and small files, while erasure coding fits large datasets whose access and recovery trade-offs justify it.

The NameNode does not permanently store every block location in the FsImage. DataNodes reconstruct that operational view by submitting block reports. The persistent namespace records which blocks belong to which files; the live DataNodes report where those blocks currently reside.

Storage layout therefore has two levels. Users organize named files and directories in HDFS. DataNodes organize opaque block files on their local volumes. The NameNode connects those views without handling the bytes itself.

HDFS read and write process

The write path uses a pipeline so one client stream can create several replicas efficiently.

  1. The client requests file creation from the NameNode.
  2. The NameNode validates the request and returns an ordered set of DataNodes for the first block.
  3. The client sends packets to the first DataNode. That DataNode writes each packet locally and forwards it to the next DataNode, which repeats the process down the pipeline.
  4. Acknowledgments return through the pipeline after the replicas accept the packet.
  5. When a block fills, the client asks the NameNode for targets for the next block.
  6. The client closes the file after all blocks are written and acknowledged.

If a DataNode fails during the write, the pipeline can be rebuilt without that node. The NameNode can later arrange another replica to restore the configured redundancy.

The read path is more direct.

  1. The client asks the NameNode for the file's block locations.
  2. The client chooses a suitable replica, usually preferring one close to the reader.
  3. It streams the block directly from the selected DataNode and verifies checksums.
  4. It connects to replicas for later blocks as it advances through the file.
  5. If a read fails or data is corrupt, the client can use another replica and report the bad copy.

Neither path sends file contents through the NameNode. The metadata service coordinates placement and lookup, while clients and DataNodes carry the data-plane load. That separation supports parallel throughput, but it also makes NameNode sizing and availability essential to the whole cluster.

Benefits of using HDFS storage

Some benefits follow from how HDFS moves and places data across a cluster.

High-throughput access. HDFS is designed for streaming large datasets rather than minimizing the latency of individual file operations. Large blocks and parallel DataNode I/O suit batch scans, transformations, and analytical reads.

Horizontal growth. Teams can add DataNodes to expand aggregate storage and bandwidth. The balancer can redistribute blocks when utilization becomes uneven, although expansion still requires capacity planning and operational work.

Data locality. Processing frameworks can schedule work near HDFS replicas. This reduces network traffic for workloads that scan large inputs and is one reason HDFS has historically paired well with MapReduce and YARN.

Other benefits concern resilience and control over the storage environment.

Fault tolerance. Replication or erasure coding protects data from common storage failures. Heartbeats, block reports, checksum verification, and automatic re-replication turn failure detection and recovery into filesystem responsibilities.

Familiar filesystem model. Directories, paths, permissions, and quotas, along with command-line tools, Java APIs, and WebHDFS, give applications recognizable filesystem abstractions. Multiple engines can use the same stored files without requiring HDFS to understand their schemas.

Deployment control. HDFS gives an organization direct control over storage hardware, network placement, authentication, encryption, retention, and data location. That can be important for established on-premises environments or infrastructure with specific residency constraints.

These strengths cluster around one workload profile: large datasets, long sequential operations, distributed processing, and acceptance of a self-managed storage fleet.

Challenges and limitations of HDFS

Some limitations follow directly from the workload model.

Small files consume disproportionate metadata. The NameNode keeps the namespace and block information in memory. Millions of tiny files create many metadata objects while storing little data per object. Compaction into larger files and deliberate partition design can matter more than raw disk capacity.

Random updates and transactions are not its model. HDFS allows one writer at a time and supports append and truncate rather than arbitrary in-place changes. It does not supply indexes, row-level transactions, or low-latency point lookup. HBase, a relational database, or another serving store is a better match for those requirements.

Replication has a capacity cost. Full block copies improve availability and read options, but use raw disk space. Erasure coding reduces that overhead for suitable datasets while introducing encoding and recovery work.

Other limitations come from operating HDFS as a distributed service.

Operations require cluster expertise. The HDFS administration surface includes NameNodes, DataNodes, disks, capacity, under-replicated blocks, network topology, security, upgrades, and decommissioning. A resilient deployment also needs tested NameNode high availability, metadata backups, and recovery procedures.

Storage and compute are often coupled. Traditional HDFS clusters place storage and compute services on the same machines. Data locality can improve scans, but independent elasticity becomes harder. Adding compute without storage, or storage without compute, is less natural than with cloud object storage and ephemeral compute fleets.

The NameNode remains a critical service. High availability removes a single point of service failure, but it does not make metadata architecture irrelevant. Namespace growth, failover configuration, JournalNode health, and client failover behavior still need attention. Federation can distribute namespace load, at the cost of more control-plane components.

HDFS is therefore strongest when its workload assumptions and operational model are intentional choices. Using it as a generic replacement for every filesystem or database ignores the trade-offs that enable its throughput.

HDFS storage examples

The Hadoop filesystem shell exposes commands that resemble familiar Unix operations. The following example creates an input directory, uploads a local log file, lists the result, prints the file's final kilobyte, downloads it, and reports the logical and replica-inclusive sizes of entries in the directory:

hdfs dfs -mkdir -p /data/application-logs/2026/09/01
hdfs dfs -put ./api.log /data/application-logs/2026/09/01/
hdfs dfs -ls /data/application-logs/2026/09/01
hdfs dfs -tail /data/application-logs/2026/09/01/api.log
hdfs dfs -get /data/application-logs/2026/09/01/api.log ./api-copy.log
hdfs dfs -du -h /data/application-logs/2026/09/01

The path appears as one file even when HDFS stores it as several blocks across different machines. Applications use the path, while the client and NameNode resolve its physical block locations.

Operationally, an administrator can inspect overall capacity, DataNode status, and block health with separate tools:

hdfs dfsadmin -report
hdfs fsck /data/application-logs/2026/09/01/api.log -files -blocks -locations

Common storage patterns include raw logs partitioned by date, Parquet files organized by business domain and time, batch job outputs written to new directories, and archived datasets protected with erasure coding. A sound layout avoids excessive small-file metadata without making partitions too coarse for downstream pruning.

HDFS in the Hadoop ecosystem

HDFS is one module in Hadoop, not the whole platform. Apache lists four core modules: Hadoop Common supplies shared libraries and utilities, HDFS provides distributed storage, YARN manages cluster resources, and MapReduce provides a YARN-based batch-processing framework.

Processing engines sit above the storage layer. MapReduce commonly reads HDFS-backed input splits and writes final output to a configured filesystem. Spark can use HDFS while running through YARN or another supported cluster manager. Hive maps table metadata onto files and lets a distributed execution engine query them with SQL. HBase uses HDFS as durable distributed storage while adding a database layer for indexed, mutable records.

File formats add another layer. Parquet and ORC define columnar organization, encoding, and statistics within files. HDFS stores those files but does not interpret their columns. A metastore such as the Hive Metastore records table schemas, partitions, and file locations so query engines can agree on how to read them.

This layered view prevents a common category error. HDFS answers where distributed files live and how they survive failures. YARN answers how cluster resources are allocated. Formats answer how bytes represent records. Query and processing engines answer how those records are transformed, aggregated, or traversed.

Relationship-heavy analysis can also operate over HDFS-backed tables. PuppyGraph can connect through the Hive Metastore to table data stored in HDFS, use a user-defined graph schema to map rows to nodes and edges, and run openCypher or Gremlin traversals without exporting the data into a separate graph database. The Hive connection documentation requires both the metastore and HDFS to be network-accessible from the PuppyGraph instance. HDFS remains the storage layer, while the graph schema and query engine provide the relationship model and traversal execution.

Conclusion

HDFS stores large files by dividing them into blocks and distributing those blocks across DataNodes. The NameNode preserves the filesystem namespace and block mappings, while clients transfer data directly through the worker nodes. Replication, erasure coding, checksums, heartbeats, and re-replication address hardware failures within that architecture.

The same design establishes HDFS's boundaries. It favors high-throughput sequential access, large files, and batch-oriented processing. It does not provide database transactions, efficient arbitrary updates, or the independent storage elasticity of cloud object stores. HDFS remains a strong fit when teams need self-managed distributed storage and the workload aligns with those assumptions.

Try the forever-free PuppyGraph Developer Edition and book a demo with the team to see how openCypher and Gremlin queries traverse relationships across warehouse and lakehouse tables, with no graph-specific ETL, including tables cataloged through Hive and stored in HDFS.

Hao Wu
Software Engineer

Hao Wu is a Software Engineer with a strong foundation in computer science and algorithms. He earned his Bachelor’s degree in Computer Science from Fudan University and a Master’s degree from George Washington University, where he focused on graph databases.

Get started with PuppyGraph!

PuppyGraph empowers you to seamlessly query one or multiple data stores as a unified graph model.

Dev Edition

Free Download

Enterprise Edition

Developer

$0
/month
  • Forever free
  • Single node
  • Designed for proving your ideas
  • Available via Docker install

Enterprise

$
Based on the Memory and CPU of the server that runs PuppyGraph.
  • 30 day free trial with full features
  • Everything in Developer + Enterprise features
  • Designed for production
  • Available via AWS AMI & Docker install
* No payment required

Developer Edition

  • Forever free
  • Single noded
  • Designed for proving your ideas
  • Available via Docker install

Enterprise Edition

  • 30-day free trial with full features
  • Everything in developer edition & enterprise features
  • Designed for production
  • Available via AWS AMI & Docker install
* No payment required