Google File System (original) (raw)

Last Updated : 13 Mar, 2026

The Google File System (GFS) is a scalable, fault tolerant distributed file system developed by Google. It is designed to store and process massive datasets for applications like web search and data analytics. GFS prioritizes reliability and scalability over specialized hardware by using software based fault tolerance.

Architecture of the Google File System (GFS)

The architecture of the Google File System (GFS) is designed to support massive scale data storage across thousands of commodity machines while maintaining high availability and fault tolerance. GFS follows a master worker model with centralized metadata management and distributed data storage.

At its core, GFS separates:

This separation allows GFS to scale efficiently while minimizing bottlenecks.

A GFS cluster consists of three primary components, GFS Master, GFS Chunk Servers and GFS Clients. All components run on commodity Linux machines connected through a high-speed network.

gfs master

1. Master Server Architecture

The GFS Master is the central coordinator of the file system. There is typically one active master per cluster.

Responsibilities of the Master

The master manages all metadata, including:

To achieve high performance:

This design ensures:

Master Communication

The master communicates with chunk servers using:

The master does not handle actual file data, preventing it from becoming a throughput bottleneck.

2. Chunk Servers Architecture

Chunk servers are the data storage nodes in GFS.

Storage Model

Replication Strategy

Each chunk is replicated (default: **3 replicas):

If a replica is lost due to server failure, the master automatically schedules re-replication.

Data Integrity

Chunk servers maintain:

If corruption is detected:

3. Client Architecture

Clients are applications or processes that interact with GFS.

Client Interaction Flow

Clients communicate:

This design reduces load on the master and increases throughput.

Clients cache metadata to:

Fault Tolerance Mechanisms

GFS assumes failures are common and handles them automatically.

1. Master Failure

2. Chunk Server Failure

3. Data Corruption

Namespace and Locking

The master manages:

Locks are:

Scalability Characteristics

GFS scales by:

Large chunk size reduces:

Clusters may include:

Why 64 MB Chunk Size?

The large chunk size:

However, this makes GFS less suitable for small files.

Rack Awareness and Network Efficiency

GFS considers network topology:

This improves both reliability and bandwidth efficiency.

Architectural Limitations

Despite its strengths:

This design reduces load on the master and increases throughput.

Clients cache metadata to:

Data Flow in GFS

1. Read Operation

  1. Client sends file request to master.
  2. Master responds with Chunk handle and Locations of chunk replicas.
  3. Client selects the closest chunk server.
  4. Client reads data directly from the chunk server.

The master is not involved in the actual data transfer.

2. Write Operation

Write operations use a primary-replica model:

  1. Client asks master for chunk metadata.
  2. Master designates one replica as the primary.
  3. Client pushes data to all replicas.
  4. Primary replica determines write order and coordinates with secondary replicas
  5. All replicas apply the write.
  6. Client receives acknowledgment.

This ensures:

Lease Mechanism for Consistency

To coordinate writes:

This prevents conflicting writes and ensures consistency across replicas.

Key Features of Google File System