Apache HBase on dedicated servers

HBase stores billions of rows across a cluster on top of HDFS, with fast random reads and writes by row key. Storage servers with many drives make natural combined DataNodes and RegionServers.

How is an HBase cluster laid out?

As a wide-column store on top of Hadoop's distributed file system. Tables are split into regions by row key range, and RegionServers serve them, writing to a write-ahead log and memstores, then flushing to HFiles in HDFS. An HMaster assigns regions and handles schema changes, with a standby for failover. ZooKeeper coordinates the cluster. On each worker machine, a DataNode and a RegionServer run side by side so most reads find their blocks on local disks.

ProcessWherePort
HMasterTwo small nodes, active and standby16000, UI 16010
RegionServerEvery worker16020, UI 16030
HDFS NameNodeWith the masters8020, UI 9870
HDFS DataNodeEvery worker9866, UI 9864
ZooKeeperThree nodes2181

All of these ports belong on a WireGuard mesh between cluster machines; only gateways or application servers should reach the RegionServers from outside.

How should the drives be used?

As separate HDFS data directories, one per drive, without RAID. HDFS keeps three replicas of each block on different machines, so a failed drive is re-replicated from elsewhere. The NVMe drives in each Storage model are ideal for the operating system, the HBase write-ahead logs if you place them on a separate HDFS storage policy, and BucketCache files.

<property>
  <name>dfs.datanode.data.dir</name>
  <value>/hdd01/dfs,/hdd02/dfs,/hdd03/dfs,/hdd04/dfs</value>
</property>

How much memory should a RegionServer have?

A heap of 16 to 31 GB, with an off-heap BucketCache for reads. Large heaps above about 31 GB lose compressed pointers and lengthen garbage collection pauses; the BucketCache sidesteps that by caching data blocks outside the heap, in memory or on an NVMe file.

# hbase-env.sh
export HBASE_REGIONSERVER_OPTS="-Xms24g -Xmx24g -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:MaxDirectMemorySize=40g"
# hbase-site.xml: hbase.bucketcache.ioengine=offheap, hbase.bucketcache.size=36864

On a machine with 128 GB, that leaves room for the DataNode, the operating system and the page cache.

Why does row key design matter so much?

Because rows are sorted by key and regions split by key range. Keys that increase over time, such as timestamps, send every write to the last region on one server, creating a hotspot. Salt or hash a prefix to spread writes, put the entity first and the time second, and keep keys short since they are stored with every cell. Pre-split new tables so the first day of load is spread across all RegionServers.

create 'events', {NAME => 'd', COMPRESSION => 'ZSTD', BLOOMFILTER => 'ROW'}, {NUMREGIONS => 48, SPLITALGO => 'HexStringSplit'}

What about compactions?

Minor compactions merge small HFiles continuously; major compactions rewrite all files of a region and can saturate disks. Many clusters disable time-based major compactions and run them per table in quiet hours. Watch compaction queue length and store file counts per region, and add RegionServers before either grows without bound.

Which machines fit?

RoleMachineNotes
Masters, NameNode, ZooKeeperESSENTIAL-464 GB DDR4, three of them
Worker, moderate dataSTORAGE-12x 480 GB SSD SATA (system) + 4x 14 TB HDD SAS, Soft RAID
Worker, large dataSTORAGE-3 2024529.92 TB raw, 128 GB DDR5

A starter cluster of three ESSENTIAL-4 masters and five STORAGE-1 workers costs $106.20 and $109.80 a month per machine, with every node in one data centre to keep latency low. Our Apache Hadoop clusters page covers HDFS and YARN in more depth, and Apache Cassandra clusters covers a wide-column store without HDFS.

Machines for HBase clusters

Lowest monthly price of each model across its data centres; the model page shows the price in every location.

ModelProcessorCoresMemoryDrivesPortPer month
ESSENTIAL-4AMD EPYC 73131664 GB2x 960 GB SSD NVMe1 Gbps unmetered$106.20
ESSENTIAL-5AMD EPYC 741324128 GB2x 960 GB SSD NVMe1 Gbps unmetered$120.00
STORAGE-1AMD Ryzen 7 Pro 3700832 GB2x 480 GB SSD SATA + 4x 14 TB HDD SAS1 Gbps unmetered$109.80
STORAGE-2 2024AMD EPYC 4344P832 GB2x 960 GB SSD NVMe + 2x 22 TB HDD SAS3 Gbps unmetered$187.80
STORAGE-3 2024Intel Xeon Gold 6554S36128 GB2x 960 GB SSD NVMe + 24x 22 TB HDD SAS10 Gbps unmetered$1,037.40
STORAGE-3 2026AMD EPYC 913516128 GB2x 1 TB SSD NVMe + 16x 24 TB HDD SAS10 Gbps unmetered$1,468.80

Storage models make combined DataNodes and RegionServers; small Essential models run the masters.

See all servers and prices

Related pages

Apache Hadoop clusters

Build a Hadoop cluster on Storage servers: HDFS NameNode and DataNodes, YARN, erasure coding to save space, small-file limits and sizing by data.

Read more

Apache Cassandra clusters

Run Apache Cassandra across data centres: Cassandra 5 features, snitch and replication per site, internode TLS over public ports, compaction and repairs.

Read more

Storage servers

High capacity hard disk servers from 44 TB to 576 TB raw.

from $109.80 a monthRead more

Big data and analytics

High core EPYC machines and dense disk chassis for Spark, ClickHouse and data lake clusters.

Read more

Questions and answers

Does HBase need HDFS?

In a production cluster, yes. HBase stores its files in HDFS, which replicates blocks across DataNodes.

How much heap should an HBase RegionServer have?

16 to 31 GB, with an off-heap BucketCache for reads, so garbage collection pauses stay short.

Should HBase worker drives use RAID?

No. List each drive as an HDFS data directory; HDFS keeps three replicas of every block on different machines.

What causes hotspots in HBase?

Row keys that increase over time, such as timestamps, send all writes to one region. Salt or hash a key prefix to spread them.

Which ports does HBase use?

16000 and 16010 for the HMaster, 16020 and 16030 for RegionServers, plus HDFS and ZooKeeper ports.