---
title: "HBase architecture"
subject: "Big Data Technologies"
chapter: 4
key: "semester_8/big_data_technologies:hbase-architecture"
source: https://www.bctengineer.com/q/semester_8/big_data_technologies/hbase-architecture
site: BCT Engineering
---

# HBase architecture

Big Data Technologies · Chapter 4: NoSQL

- Asked in: 2074 Bhadra, 5 marks; 2073 Bhadra, 5 marks (asked 2 times)
- Video: [Introducing HBase: a NoSQL Database for Hadoop | What is HBase? | HBase Architecture](https://www.youtube.com/watch?v=l3j6jvHVPak) — AmpCode
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/big_data_technologies/hbase-architecture
- Whole chapter: https://www.bctengineer.com/md/semester_8/big_data_technologies/chapter-4

## Question

Explain the architecture of Hbase.

## Short answer

HBase architecture comprises HMaster for region assignment and schema changes, Region Servers hosting table regions, each with MemStore and HFiles. WAL ensures durability, ZooKeeper coordinates, and HDFS provides underlying storage for real-time read/write access.

## Answer

**HBase** is an open-source, distributed, column-oriented NoSQL database built on top of HDFS, modelled on Google's BigTable. It stores huge tables (billions of rows, millions of columns) and gives random, real-time read/write access.

#### Data model

A table has rows identified by a sorted **row key**. Columns are grouped into **column families**; each cell is versioned by a timestamp. Tables are split horizontally into **regions** (ranges of row keys).

#### Architecture components

```text
        Client  <----->  ZooKeeper
          |                 |
          v                 v
      HMaster  <-- assigns regions -->
          |
   +------+-------+---------------+
   |              |               |
RegionServer1  RegionServer2  RegionServer3
 [Region][Region] ...
   |  WAL | MemStore | HFiles
   +--------------+---------------+
                  v
            HDFS (DataNodes)
```

1. **HMaster:** the master server. It assigns regions to region servers, handles load balancing, region splits/merges, and schema operations (create, delete, alter tables). It monitors region servers. It does not serve data reads and writes.
2. **Region Server (HRegionServer):** runs on the HDFS DataNodes. It hosts many regions, serves client read/write requests directly, and splits regions when they grow large.
3. **Region:** a contiguous range of rows of a table. Each region has one **Store** per column family. A Store consists of:
   - **MemStore:** in-memory write buffer; data is sorted and flushed to disk when full.
   - **HFiles:** immutable sorted files on HDFS. Several HFiles are merged by compaction.
4. **WAL (Write-Ahead Log / HLog):** every write is first appended to the WAL on HDFS, so data can be recovered if the region server crashes before MemStore is flushed.
5. **ZooKeeper:** coordination service. It keeps track of live servers, elects the active HMaster, and stores the location of the `hbase:meta` table.
6. **META table:** a special catalog table listing which region server holds which region. The client finds it via ZooKeeper, caches the location, then talks directly to the region server.
7. **HDFS:** the underlying storage that provides replication and fault tolerance.

#### Write path

Client -> Region Server -> append to WAL -> write to MemStore -> acknowledge -> flush to HFile later.

#### Read path

Client -> ZooKeeper -> META -> Region Server -> check MemStore and block cache, then HFiles -> return result.

## Check yourself

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

1. What does the HMaster do?
   A. Serves all client reads and writes
   B. Assigns regions, balances load and handles schema operations, but does not serve data
   C. Stores HFiles
   D. Replaces ZooKeeper
   Answer: B. HMaster manages regions and schema; region servers serve data directly to clients. (Key point: HMaster role)

2. Why is every write first appended to the WAL?
   A. To speed up reads
   B. To compress data
   C. To sort rows
   D. To recover data if the region server crashes before MemStore is flushed
   Answer: D. The WAL on HDFS lets lost MemStore contents be replayed after a crash. (Key point: WAL purpose)

3. What is the correct write path in HBase?
   A. WAL, then MemStore, acknowledge, flush to HFile later
   B. HFile, then WAL, then MemStore
   C. MemStore, then HMaster, then HFile
   D. ZooKeeper, then HFile
   Answer: A. The write is logged in WAL, put in MemStore, acknowledged, and flushed to an HFile later. (Key point: Write path)

4. How does a client find the right region server?
   A. Asks HMaster for each read
   B. Scans all region servers
   C. Uses ZooKeeper to find the META table, then caches the region location
   D. Reads HDFS directly
   Answer: C. ZooKeeper stores hbase:meta location; META maps regions to servers, and the client then contacts the region server directly. (Key point: Locating a region)
