Google File System (GFS)
Google File System (GFS)
Chunk
● Similar to block in file systems
● Size is always 64 MB
● Less fragmentation
● Eases management
● Sent directly to clients
Master Servers
Master Server
● Coordinates cluster
● Updates operation log
● Stores meta-data
Master Server – Chunk Server Communication
State updates
● Is a chunk server down?
● Are there disk failures on a chunk server?
● Are any replicas corrupted?
● Which chunk replicas does a chunk server store?
Instructions
● Create new chunk
● Delete existing chunks
GFS Architecture
Read operation
Write operation (1/2)
Write operation (2/2)
Record Append
● Record append allows multiple clients to append data to the same file concurrently while guaranteeing atomicity
Algorithm
● Application originates record append request.
● GFS client translates request and sends it to master.
● Master responds with chunk handle and (primary + secondary) replica locations.
● Client pushes write data to all locations.
● Primary check if record fits in specified chunk.
● If record does not fit, then the primary:
● Pads the chunk.
● Tells secondaries to do the same.
● Informs the client.
● Client retries append with the next chunk.
● If records fits, then the primary:
● Appends the record.
● Tells secondaries to do the same.
● Receives responses from secondaries.
● Send final response to the client.
Fault Tolerance
● GFS has
● Performance
● Scalability
● Fault-tolerance
● GFS is
● Easy to maintain
● Cheapest solution for Google