---
title: "Short note: Shadow Master and Cluak"
subject: "Big Data Technologies"
chapter: 2
key: "semester_8/big_data_technologies:short-note-shadow-master-cluak"
source: https://www.bctengineer.com/q/semester_8/big_data_technologies/short-note-shadow-master-cluak
site: BCT Engineering
---

# Short note: Shadow Master and Cluak

Big Data Technologies · Chapter 2: Google File System

- Asked in: 2073 Magh, 5 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/big_data_technologies/short-note-shadow-master-cluak
- Whole chapter: https://www.bctengineer.com/md/semester_8/big_data_technologies/chapter-2

## Question

Write a short note on Shadow Master and Chunk services.

## 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.

## Answer

#### 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.

```text
 Primary master --log--> Shadow masters (read-only)
       |  heartbeat
 +-----v-----+ +-----------+ +-----------+
 |Chunkserver| |Chunkserver| |Chunkserver|
 +-----------+ +-----------+ +-----------+
```

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What access does a shadow master provide?
   A. Read-write access replacing the master permanently
   B. Read-only access to the file system even when the primary master is down
   C. Direct storage of chunk data
   D. Only backups of chunk data
   Answer: B. Shadow masters give read-only service, improving read availability when the primary is down. (Key point: Role of shadow master)

2. Why are shadow masters called 'shadows' rather than mirrors?
   A. They store no metadata
   B. They are identical in real time
   C. They may lag the primary slightly, so clients can see slightly stale metadata
   D. They only serve writes
   Answer: C. They apply the replicated operation log a fraction of a second behind the primary, so data can be slightly stale. (Key point: Shadow vs mirror)

3. What is the purpose of HeartBeat messages from chunkservers?
   A. To transfer file data to clients
   B. To report state and held chunks to the master and receive instructions
   C. To elect a new client
   D. To compute checksums
   Answer: B. Heartbeats report chunkserver state and chunks, and the master replies with instructions like delete or copy a chunk. (Key point: Heartbeat)

4. How do chunkservers detect data corruption?
   A. By comparing with the master's copy
   B. By checksum of each 64 KB block verified before returning data
   C. By rebooting
   D. By asking the client
   Answer: B. Each 64 KB block has a checksum that is verified before data is returned to a reader. (Key point: Checksums)
