- 2073 Magh · 5 marks
Short note: Shadow Master and Cluak
Short answer
A shadow master is a read-only replica of the GFS master that applies the replicated operation log and serves slightly stale metadata during primary downtime. Chunkservers store 64 MB chunks, serve read and write requests directly, send heartbeats to the master, and verify checksums.
Write a short note on Shadow Master and Chunk services.
Shadow Master
The GFS master is a single point of failure, so its state is replicated.
- The operation log and checkpoints are replicated on several machines. If the master fails, an external monitor starts a new master process quickly.
- Shadow masters are additional replicas of the master that provide read-only access to the file system even when the primary master is down.
- They are "shadows", not mirrors: they may lag the primary slightly (fractions of a second), so clients can see slightly stale metadata.
- A shadow master reads the replicated operation log and applies the changes to its own data structures in the same order as the master. It polls chunkservers at start-up to find chunk locations and exchanges handshakes with them.
- Benefit: improves availability for reads, and reduces load on the master for applications that can tolerate slightly stale data.
Chunkserver services
Chunkservers are the worker nodes that store data.
- Store chunks (64 MB, each with a 64-bit handle) as Linux files on local disks and serve read and write requests from clients directly.
- Each chunk is replicated on three servers; one acts as primary holding a lease to order mutations.
- Send HeartBeat messages to the master to report their state and the chunks they hold, and receive instructions in reply (e.g. delete a chunk, copy a chunk).
- Maintain checksums for each 64 KB block to detect corruption and verify data before returning it.
- Perform chunk replication to other chunkservers when asked by the master.
Primary master --log--> Shadow masters (read-only)
| heartbeat
+-----v-----+ +-----------+ +-----------+
|Chunkserver| |Chunkserver| |Chunkserver|
+-----------+ +-----------+ +-----------+
✓ Answer checked by Claude Opus 5.5 (high effort)