Version Matrix

ItemVerifiedNote
Apache Druid 30.0.0YesThree roles: master/data/query
Dependency: ZooKeeper three-nodeYesFirst start zkServer.sh start
Dependency: Hadoop/HDFSYesstart-all.sh or start-dfs.sh
Historical: -Xmx512m / Direct 1gYesSync processing.buffer.sizeBytes≈50 MiB
Broker: -Xmx512m / Direct 512mYesSync processing.buffer.sizeBytes≈50 MiB
Router: -Xmx128m / Direct 128mYesLightweight routing, only forwards queries
Timezone parameter -Duser.timezone=UTC+8YesCan run

Configuration Summary

  • coordinator-overlord: 512M
  • historical: 512M, off-heap 1G
  • middleManager: 128M
  • broker: 512M, off-heap 512M
  • router: 128M, off-heap 128M

Key Formula

maxDirectMemory = druid.processing.buffer.sizeBytes × (druid.processing.numMergeBuffers + druid.processing.numThreads + 1)

If processing.buffer.sizeBytes is too large, need to increase maxDirectMemory, otherwise service cannot start.

Startup Commands

Query Node (h121):

cd /opt/servers/apache-druid-30.0.0
nohup start-cluster-query-server &

Data Node (h122):

cd /opt/servers/apache-druid-30.0.0
nup start-cluster-data-server &

Master Node (h123):

cd /opt/servers/apache-druid-30.0.0
nohup start-cluster-master-no-zk-server &

Error Quick Reference

SymptomRoot CauseFix
Historical won’t start, logs contain Direct buffer OOMprocessing.buffer.sizeBytes doesn’t match MaxDirectMemorySizeIncrease MaxDirectMemorySize or lower buffer
Broker crashes after query, OutOfMemoryErrorBroker off-heap too small and concurrency slightly highTemporarily lower concurrency; or increase DirectMemory to 1g
Query reports Cannot acquire enough memoryBuffer too small or too many thread/merge buffersLower numThreads/numMergeBuffers or raise buffer

WebUI Access

http://h121.wzk.icu:8888