Understanding YARN Architecture

Apache Hadoop is a widely-used open-source framework for processing large datasets in a distributed computing environment. One of the key components of Hadoop is YARN (Yet Another Resource Negotiator), which is responsible for managing resources and scheduling tasks on a Hadoop cluster.

Introduction to YARN

YARN serves as the central brain of a Hadoop cluster, coordinating the allocation of resources and managing the execution of tasks. It allows multiple data processing engines, such as MapReduce and Apache Spark, to run concurrently on the same cluster, enabling efficient resource utilization.

Components of YARN

Resource Manager

The Resource Manager (RM) is the master component of YARN, responsible for managing resources across the entire cluster. It keeps track of available resources, allocates resources to various applications, and enforces resource limits to prevent any single application from monopolizing the cluster.

Node Manager

Each slave machine in a Hadoop cluster runs a Node Manager (NM) which is responsible for monitoring the resource utilization on that machine. Node Managers track CPU and memory usage, manage containers (execution environments for tasks), and report resource usage and availability back to the Resource Manager.

Application Manager

For every application submitted to the cluster, YARN creates an Application Manager (AM) that runs on one of the nodes. The Application Manager is responsible for negotiating resources for the application, managing the application's execution, and monitoring its progress. It interacts directly with the Resource Manager to request and release resources.


A container is an encapsulated execution environment where a specific task can run. Each container is allocated a specific amount of memory and CPU resources by the Resource Manager, based on the application's request and the cluster's available resources. The Node Manager is responsible for launching and monitoring the containers on its machine.

Workflow of YARN

  1. An application is submitted to the YARN cluster, potentially consisting of multiple tasks.

  2. The Resource Manager receives the application and negotiates resources with the Application Manager, allocating containers across the cluster.

  3. The Application Manager launches containers on specific nodes, and the associated tasks start running within these containers.

  4. The Node Manager monitors the resource utilization and reports it back to the Resource Manager.

  5. Upon task completion, the Node Manager informs the Application Manager, which in turn informs the Resource Manager about the freed-up resources.

  6. The Resource Manager can then allocate the released resources to other applications requiring them.

Benefits of YARN Architecture

YARN offers several advantages in managing resources and executing tasks in a Hadoop cluster:

  • Scalability: YARN can handle large-scale clusters with thousands of nodes and applications, making it highly scalable.

  • Flexibility: It allows multiple processing engines to coexist in the same cluster, enabling users to choose the right tool for their specific requirements.

  • Efficient Resource Utilization: YARN optimizes resource allocation, preventing resource wastage and ensuring fair sharing among applications.

  • Fault-tolerance: The architecture of YARN ensures high-availability even in the presence of node failures, as it can transparently reroute tasks to healthy nodes.


Understanding the YARN architecture is essential for effectively utilizing the capabilities of Apache Hadoop. YARN's resource management capabilities, scalable design, and support for multiple processing engines make it a critical component for managing big data workloads.

noob to master © copyleft