One big file system spread over many machines (HDFS, GFS).
A distributed file system (DFS) makes many machines look like one huge file system. Big files are cut into chunks, and each chunk is stored on several machines.
One disk can hold a few terabytes. A data set can be petabytes. And one machine can be read at only a few hundred MB per second. To handle more data and more speed, we need many machines working together.
A distributed file system hides this. You write a file in a path like /logs/2026/12/01.log. Behind the scenes the system splits it into big pieces (chunks in GFS, blocks in HDFS, 64 MB in the GFS paper and 128 MB by default in modern HDFS), spreads them over many servers, and keeps extra copies.
With so many cheap machines, failure is normal. Disks break, servers crash, racks lose power. So the design assumes failure and repairs itself.
| Part | Job | Notes |
|---|---|---|
| Name node / master | Keeps the file tree and the map from each file to its chunks and their locations | Metadata is held in memory for speed. It is a single point of failure unless you add a standby. |
| Chunk server / data node | Stores chunks as ordinary files on its local disks, serves reads and writes | Sends heartbeats and block reports to the master. |
| Client library | Asks the master for locations, then reads and writes directly with chunk servers | Can cache locations. |
| Edit log + checkpoint | A saved log of changes to the file tree, plus snapshots of it | Lets the master restart after a crash. |
| Standby / HA name node | A hot backup of the master (HDFS HA with a quorum journal) | Takes over in seconds if the active one dies. |
| Step | What happens |
|---|---|
| 1. Heartbeats | Every chunk server tells the master it is alive every few seconds (3 s in HDFS by default). |
| 2. Failure noticed | No heartbeat for a long time (about 10 minutes by default in HDFS) and the server is marked dead. |
| 3. Find the damage | The master looks up every chunk that server held and finds those below the target number of copies. |
| 4. Re-replicate | The most endangered chunks are copied first, from a surviving copy to a healthy server, at a limited rate. |
| 5. Back to normal | Every chunk again has its full number of copies. |
A simplified model of HDFS or GFS. The name node keeps the map from chunk to servers. Chunk servers store the data and send heartbeats. Placement is rack aware: one copy in one rack and two in the other, so losing a whole rack still leaves a copy. Real clusters wait for a heartbeat timeout (about 10 minutes in HDFS by default) and then copy at a limited rate. Try 1 copy and crash a server: data is lost for good. Try 3 copies and crash two servers one after the other, giving it time to re-replicate in between.
| Term | Meaning in easy words |
|---|---|
| Chunk / block | A big fixed-size piece of a file (64 MB in GFS paper, 128 MB by default in HDFS) |
| Name node / master | The machine that stores the file tree and the location of every chunk |
| Chunk server / data node | A machine that stores chunks on its disks |
| Metadata | Information about the data: names, sizes, chunk locations, permissions |
| Replication factor | How many copies of every chunk exist (default 3 in HDFS) |
| Heartbeat | A small regular message that says 'I am alive' |
| Under-replicated | A chunk with fewer live copies than the target |
| Re-replication | Making new copies of chunks after a failure |
| Rack awareness | Placing copies in different racks so one rack failure cannot kill them all |
| Checksum | A number that detects damaged data, checked on every read |
| Edit log / checkpoint | The saved changes and snapshots of the metadata, used to restart the master |
| Data locality | Running the work on the machine that already holds the data |
| Choice | We gain | We lose |
|---|---|---|
| More copies | Safer data and more read options | More disk space and write traffic |
| Fewer copies | Cheap storage | A single failure can lose data |
| Large chunks | Small metadata, fast streaming | Waste for small files, less parallelism for small jobs |
| Small chunks | More parallelism, finer balance | A bigger map in the master |
| Single master | Simple, consistent view of the file tree | A scaling limit and a failure risk |
| Replication vs erasure coding | Replication: simple and fast reads | Replication costs 3x. Erasure coding costs about 1.5x but repair is heavier. |