Use Observer NameNode

Overview

Traditionally, a pair of NameNodes (Active and Standby) manage all client interactions: the Active handles all namespace operations and metadata requests, while the Standby remains synchronized but does not serve clients. In an ADH cluster with high availability (HA) enabled, the introduction of the Observer NameNode role addresses read-scalability and consistent metadata-read challenges.

In large clusters with heavy metadata demands (listing directories, fetching block locations, concurrent reads), the Active NameNode often becomes a performance bottleneck. The Observer NameNode is implemented to offload read-only operations onto an additional node, allowing read traffic to be balanced away from the Active NameNode.

At the same time it preserves consistency by tailing edit logs and rejects or forwards any accidental write requests to the Active NameNode. This architecture supports consistent reads, better load distribution, and reduced latency for high-volume metadata workloads.

By deploying the Observer role, HDFS clusters gain the ability to route large numbers of metadata-read requests (for example, from BI tools, directory listing, web interfaces) away from the Active NameNode, improving throughput and resilience.

Start an Observer NameNode

Convert one of the Standby NameNodes to observer state by following the instructions below.

IMPORTANT

Before converting one of the NameNodes to observer state, check that your ADH cluster has at least three NameNodes. This ensures cluster health in case of failures with Active NameNode.

Update HDFS configuration

To start using Observer NameNode in ADH, update the HDFS configuration via ADCM:

  1. On the Clusters page, select the desired cluster.

  2. Go to the Services tab and click on HDFS.

  3. In hdfs-site.xml section, set the dfs.namenode.state.context.enabled and dfs.ha.tail-edits.in-progress options to true.

  4. Confirm changes by clicking Save.

  5. In the Actions drop-down menu, select Restart, make sure the Apply configs from ADCM option is set to true, and click Run.

Switch a NameNode to observer state

To switch the observer state for a NameNode:

  1. On the host with the required NameNode, check its state by running:

    $ hdfs haadmin -getAllServiceState

    Example output:

    elenas-adh-4-2.ru-central1.internal:8020 active
    elenas-adh-4-1.ru-central1.internal:8020 standby
    elenas-adh-4-3.ru-central1.internal:8020 standby
  2. Set the state of any non-active node to Observer using the command:

    $ sudo -u hdfs hdfs haadmin -transitionToObserver <service_id> --forcemanual

    where <service_id> is the ID of a Standby NameNode. You can find this ID in the HDFS UI.

    Example output:

2025-10-21 08:30:33,203 WARN ha.HAAdmin: Proceeding with manual HA state management even though
automatic failover is enabled for NameNode at elenas-adh-4-1.ru-central1.internal/10.92.43.218:8020

Check Observer NameNode status

To check if the Standby NameNode status has changed, run:

$ hdfs haadmin -getAllServiceState

Example output:

elenas-adh-4-2.ru-central1.internal:8020 active
elenas-adh-4-1.ru-central1.internal:8020 observer
elenas-adh-4-3.ru-central1.internal:8020 standby
TIP
You can also check the status of a NameNode via HDFS UI.
Found a mistake? Seleсt text and press Ctrl+Enter to report it