0
0
Hadoopdata~10 mins

HDFS high availability in Hadoop - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - HDFS high availability
Start HDFS Cluster
Configure Two NameNodes
One Active, One Standby
Shared Storage or Quorum Journal
Failover Triggered?
NoContinue Normal Operation
Yes
Standby Becomes Active
Clients Redirected to New Active
Cluster Continues Without Downtime
HDFS high availability uses two NameNodes where one is active and the other standby. If the active fails, the standby takes over seamlessly.
Execution Sample
Hadoop
1. Start two NameNodes
2. Active NameNode serves clients
3. Standby monitors active
4. On failure, standby becomes active
5. Clients connect to new active
This sequence shows how HDFS switches between active and standby NameNodes to keep the system running.
Execution Table
StepActionActive NameNode StateStandby NameNode StateClient ConnectionResult
1Start both NameNodesActive and servingStandby and monitoringConnected to activeNormal operation
2Active NameNode runningServing client requestsReady to take overConnected to activeNormal operation
3Active NameNode failsDownDetects failureConnection lostFailover triggered
4Standby becomes activeDown or standbyBecomes active and servesReconnects to new activeService restored
5Old active recoversDown or standbyActive serving clientsConnected to activeHigh availability maintained
6Normal operation continuesActive servingStandby monitoringConnected to activeCluster stable
💡 Execution stops as cluster stabilizes with one active and one standby NameNode.
Variable Tracker
VariableStartAfter Step 2After Step 3After Step 4After Step 5Final
Active NameNodeRunningServing clientsFailedDown or standbyDown or standbyActive serving
Standby NameNodeMonitoringReady to take overDetects failureBecomes activeActive servingMonitoring standby
Client ConnectionConnected to activeConnected to activeLost connectionReconnected to new activeConnected to activeConnected to active
Key Moments - 3 Insights
Why does the standby NameNode not serve clients until failover?
The standby NameNode stays in monitoring mode to avoid split-brain issues. It only becomes active after detecting failure, as shown in execution_table step 3 and 4.
How do clients know to connect to the new active NameNode after failover?
Clients use a virtual IP or a failover controller that redirects them to the active NameNode, demonstrated by client reconnection in execution_table step 4.
What happens if the old active NameNode recovers after failover?
It either stays down or becomes the standby to avoid conflicts, ensuring only one active NameNode, as seen in execution_table step 5.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, at which step does the standby NameNode become active?
AStep 2
BStep 3
CStep 4
DStep 5
💡 Hint
Check the 'Standby NameNode State' column in execution_table rows.
According to variable_tracker, what is the client connection state after the active NameNode fails?
ALost connection
BConnected to active
CReconnected to new active
DDisconnected permanently
💡 Hint
Look at 'Client Connection' variable after Step 3 in variable_tracker.
If the failover did not happen, what would be the client connection state at Step 4?
AConnected to active
BLost connection
CReconnected to new active
DConnected to standby
💡 Hint
Refer to execution_table Step 3 and 4 client connection states.
Concept Snapshot
HDFS High Availability:
- Two NameNodes: one active, one standby
- Standby monitors active, no client serving
- On active failure, standby takes over
- Clients reconnect via virtual IP
- Ensures no downtime in NameNode failure
Full Transcript
HDFS high availability uses two NameNodes to avoid downtime. One NameNode is active and serves clients. The other is standby and monitors the active. If the active fails, the standby detects this and becomes active. Clients then reconnect to the new active NameNode. This failover process keeps the HDFS cluster running without interruption. The old active either stays down or becomes standby after recovery. This setup prevents split-brain and ensures continuous service.