Apache Pulsar on dedicated servers

Pulsar separates serving from storage: brokers handle clients while BookKeeper bookies store the data. That split maps neatly onto machines with fast NVMe for journals and large drives for ledgers.

How is a Pulsar cluster built?

From three roles. Brokers accept producers and consumers and hold no data of their own, so they scale and restart freely. Bookies, the Apache BookKeeper storage nodes, write every message to a journal and then to ledger storage, replicated across several bookies. A metadata store, traditionally ZooKeeper, keeps track of topics, ledgers and ownership. Small clusters run all three roles on each of three machines; larger ones split them.

Why do bookies want two kinds of disk?

Because the journal and the ledgers have opposite needs. The journal is a sequential write-ahead log that must be fsynced for every acknowledged message, so its latency decides publish latency: put it on NVMe. Ledger storage receives the same data in bulk, is read by catching-up consumers, and grows with retention: large drives work well there. The Storage line pairs NVMe and hard drives in one machine, which fits this layout exactly.

# conf/bookkeeper.conf
journalDirectories=/nvme/bk-journal
ledgerDirectories=/hdd1/bk-ledgers,/hdd2/bk-ledgers
journalSyncData=true
dbStorage_writeCacheMaxSizeMb=4096
dbStorage_readAheadCacheMaxSizeMb=4096

Which ports does it use?

PortComponentWho connects
6650 (6651 TLS)Broker binary protocolProducers and consumers
8080 (8443 TLS)Broker HTTP admin APIOperators and tools only
3181BookieBrokers
2181ZooKeeper clientsBrokers and bookies

Only 6651 needs to face remote applications. Keep everything else on a WireGuard mesh between the cluster machines, because servers here talk over their public ports rather than a private network.

How do I try it before building a cluster?

With standalone mode, which runs a broker, a bookie and a metadata store in one process. It is fine for development and testing on one machine.

bin/pulsar standalone
bin/pulsar-admin tenants create shop
bin/pulsar-admin namespaces create shop/orders
bin/pulsar-client produce persistent://shop/orders/created -m '{"id":"A-1007"}' -n 1

How do tenants, namespaces and retention work?

Topics live under a tenant and a namespace, such as persistent://shop/orders/created. Policies attach at the namespace: retention time and size, message time to live, backlog quotas, replication clusters and per-topic limits. Messages acknowledged by every subscription are deleted unless retention keeps them, so a replayable history is a deliberate setting, sized on the bookies' ledger disks.

bin/pulsar-admin namespaces set-retention shop/orders --time 7d --size 2T
bin/pulsar-admin namespaces set-persistence shop/orders --bookkeeper-ensemble 3 --bookkeeper-write-quorum 3 --bookkeeper-ack-quorum 2

What is tiered storage?

A way to move older ledger segments out of BookKeeper into an object store, so bookies keep recent data and history costs less. Offloaders support S3-compatible stores; a self-hosted S3-compatible service on a Storage server works as the target. Consumers reading old data fetch it transparently from the offloaded copy.

Which machines fit?

Brokers need cores and memory for many connections; bookies need NVMe for journals and capacity for ledgers.

RoleMachineWhy
All-in-one node, three of themSTORAGE-2 20242x 960 GB SSD NVMe (system) + 2x 22 TB HDD SAS, Soft RAID
Bookie with long retentionSTORAGE-3 2024529.92 TB raw on hard drives plus NVMe
Dedicated brokerBUSINESS-3 202412 cores, DDR5

STORAGE-2 2024 costs $187.80 a month and gives each node NVMe for the journal and two large drives for ledgers. Ports in Europe and Canada are unmetered, so replication traffic between bookies adds no cost. The Apache Kafka clusters page covers the other large log-based system, and Storage line lists every machine with hard drives.

Machines for Apache Pulsar

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
BUSINESS-3 2024AMD EPYC 4464P1264 GB2x 960 GB SSD NVMe3 Gbps unmetered$141.60
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-2 2026AMD EPYC 4345P832 GB2x 960 GB SSD NVMe + 2x 24 TB HDD SAS3 Gbps unmetered$273.00
STORAGE-3 2024Intel Xeon Gold 6554S36128 GB2x 960 GB SSD NVMe + 24x 22 TB HDD SAS10 Gbps unmetered$1,037.40

Storage models pair NVMe journals with large ledger drives in one machine.

See all servers and prices

Related pages

Apache Kafka clusters

Run Apache Kafka in KRaft mode on bare metal: controllers and brokers, log directories on many drives, replication settings, page cache and retention sizing.

Read more

RabbitMQ servers

Run RabbitMQ brokers on bare metal: quorum queues and streams, the ports a node uses, memory and disk alarms, three-node clusters over WireGuard.

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

What does BookKeeper do in Apache Pulsar?

BookKeeper bookies store the messages. Brokers serve clients and hold no data, so storage and serving scale separately.

Why should the BookKeeper journal be on NVMe?

Every acknowledged message is fsynced to the journal, so its write latency sets publish latency. Ledger data can sit on larger drives.

Which port do Pulsar clients use?

6650 for the binary protocol, or 6651 with TLS. The HTTP admin API on 8080 or 8443 should stay private.

Can I test Pulsar on one server?

Yes. bin/pulsar standalone runs a broker, a bookie and a metadata store in one process for development.

What is Pulsar tiered storage?

It offloads older ledger segments to an S3-compatible object store, keeping recent data on bookies and history on cheaper capacity.