The document speaks of caching on Historicals and ...
# general
d
The document speaks of caching on Historicals and on Brokers and how these are kept in the heap. Easy enough, since it's the process heap. However, when doing streaming ingestion on Middle Managers, I'm a bit confused on where it logically resides. Does the realtime cache exist: 1. On the central process heap (one cache per node, requiring
cacheSize
space) 2. On the task heap (one cache per task, requiring
cacheSize * tasks
space) I suspect it's on the task heap, but I want to double check with someone more familiar before diving into the source code for a verdict.
k
You can enable caching on tasks, it uses memory from the heap of each task. See the
Peons can cache
section at the bottom of https://imply.io/developer/lessons/how-to-tune-apache-druid-for-speed-and-concurrency/ 🙂
h
The alternative (which I am using in production) is routing your realtime tasks (and only those) to an https://druid.apache.org/docs/latest/design/indexer - that's essentially a middle manager where all tasks are in-process. In my experience this scales much better for realtime, as you can share the query engine and cache.
👀 1
hint: you need a
equalDistributionWithCategorySpec
for the task routing