Apache Druid is a distributed, column-oriented, real-time analytics database purpose-built for sub-second OLAP queries on large-scale event-driven data. It sits at the intersection of data warehouses, timeseries databases, and search systems β combining columnar storage, bitmap indexes, and time-based partitioning with native streaming ingestion from Kafka and Kinesis. The core architectural insight that makes Druid fast is that data is always partitioned by time first, stored in immutable, pre-indexed segment files in deep storage, and optionally pre-aggregated using rollup β meaning query work is minimized before the query even arrives.
What This Cheat Sheet Covers
This topic spans 15 focused tables and 113 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: Core Architecture β Services and Their Roles
Every Druid service has a distinct, well-separated responsibility; understanding which service does what is the prerequisite for sizing, tuning, and troubleshooting any cluster.
| Role | Example | Description | |
|---|---|---|---|
druid.service=druid/broker | Query gateway β receives queries from clients, fans them out to Historicals and MiddleManagers, then merges partial results and returns a single response. | ||
druid.service=druid/historical | β’ Stores and serves immutable segments downloaded from deep storage β’ the primary query compute node for finalized data | ||
druid.service=druid/coordinator | Segment lifecycle manager β balances segments across Historicals, enforces load/drop retention rules, and triggers compaction. | ||
druid.service=druid/overlord | Ingestion controller β accepts ingestion tasks, assigns them to MiddleManagers, creates task locks, and coordinates segment publishing. | ||
druid.service=druid/middleManager | Ingestion worker β spawns Peon child processes (one JVM per task) that read from sources and write new segments. | ||
Spawned per ingestion task | β’ Single-task JVM child of a MiddleManager β’ executes exactly one ingestion task (streaming or batch) in isolation | ||
druid.service=druid/router | β’ Unified API gateway in front of Brokers, Overlord, and Coordinator β’ also hosts the web console UI β’ Routes queries to the appropriate Broker tier based on data retention rules | ||
druid.service=druid/indexer | β’ Alternative to MiddleManager + Peon β runs tasks as threads in a single JVM instead of forking per-task, enabling better resource sharing across streaming tasks β’ Currently experimental |