blob: 33ece3c4937ae47499ae4e18aca427abc62da4f6 [file] [log] [blame]
<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-configuration/index">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.4.1">
<title data-rh="true">Configuration reference | Apache® Druid</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://druid.apache.org/img/druid_nav.png"><meta data-rh="true" name="twitter:image" content="https://druid.apache.org/img/druid_nav.png"><meta data-rh="true" property="og:url" content="https://druid.apache.org/docs/28.0.0/configuration/"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Configuration reference | Apache® Druid"><meta data-rh="true" name="description" content="&lt;!--"><meta data-rh="true" property="og:description" content="&lt;!--"><link data-rh="true" rel="icon" href="/img/favicon.png"><link data-rh="true" rel="canonical" href="https://druid.apache.org/docs/28.0.0/configuration/"><link data-rh="true" rel="alternate" href="https://druid.apache.org/docs/28.0.0/configuration/" hreflang="en"><link data-rh="true" rel="alternate" href="https://druid.apache.org/docs/28.0.0/configuration/" hreflang="x-default"><link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-131010415-1"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-131010415-1",{})</script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script><link rel="stylesheet" href="/assets/css/styles.546f39eb.css">
<link rel="preload" href="/assets/js/runtime~main.0dcbfdea.js" as="script">
<link rel="preload" href="/assets/js/main.7f6fdf81.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}return t}()||function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top navbar--dark"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/druid_nav.png" alt="Apache® Druid" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/druid_nav.png" alt="Apache® Druid" class="themedImage_ToTc themedImage--dark_i4oU"></div></a></div><div class="navbar__items navbar__items--right"><a class="navbar__item navbar__link" href="/technology">Technology</a><a class="navbar__item navbar__link" href="/use-cases">Use Cases</a><a class="navbar__item navbar__link" href="/druid-powered">Powered By</a><a class="navbar__item navbar__link" href="/docs/28.0.0/design/">Docs</a><a class="navbar__item navbar__link" href="/community/">Community</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Apache®</a><ul class="dropdown__menu"><li><a href="https://www.apache.org/" target="_blank" rel="noopener noreferrer" class="dropdown__link">Foundation<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://apachecon.com/?ref=druid.apache.org" target="_blank" rel="noopener noreferrer" class="dropdown__link">Events<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/licenses/" target="_blank" rel="noopener noreferrer" class="dropdown__link">License<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Thanks<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/security/" target="_blank" rel="noopener noreferrer" class="dropdown__link">Security<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Sponsorship<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><a class="navbar__item navbar__link" href="/downloads/">Download</a><div class="searchBox_ZlJk"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Loading..." aria-label="Search" class="navbar__search-input search-bar" disabled=""></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/design/">Getting started</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/tutorials/tutorial-msq-extern">Tutorials</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/design/architecture">Design</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/ingestion/">Ingestion</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/data-management/">Data management</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/querying/sql">Querying</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/api-reference/">API reference</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/docs/28.0.0/configuration/">Configuration</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/28.0.0/configuration/">Configuration reference</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/28.0.0/configuration/extensions">Extensions</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/28.0.0/configuration/logging">Logging</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/operations/web-console">Operations</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/development/overview">Development</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/28.0.0/misc/papers-and-talks">Misc</a></div></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Configuration</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Configuration reference</span><meta itemprop="position" content="2"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Configuration reference</h1></header><p>This page documents all of the configuration properties for each Druid service type.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="recommended-configuration-file-organization">Recommended Configuration File Organization<a href="#recommended-configuration-file-organization" class="hash-link" aria-label="Direct link to Recommended Configuration File Organization" title="Direct link to Recommended Configuration File Organization"></a></h2><p>A recommended way of organizing Druid configuration files can be seen in the <code>conf</code> directory in the Druid package root, shown below:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ ls -R conf</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">conf/druid:</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">_common broker coordinator historical middleManager overlord</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">conf/druid/_common:</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">common.runtime.properties log4j2.xml</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">conf/druid/broker:</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">jvm.config runtime.properties</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">conf/druid/coordinator:</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">jvm.config runtime.properties</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">conf/druid/historical:</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">jvm.config runtime.properties</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">conf/druid/middleManager:</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">jvm.config runtime.properties</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">conf/druid/overlord:</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">jvm.config runtime.properties</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Each directory has a <code>runtime.properties</code> file containing configuration properties for the specific Druid process corresponding to the directory (e.g., <code>historical</code>).</p><p>The <code>jvm.config</code> files contain JVM flags such as heap sizing properties for each service.</p><p>Common properties shared by all services are placed in <code>_common/common.runtime.properties</code>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="configuration-interpolation">Configuration Interpolation<a href="#configuration-interpolation" class="hash-link" aria-label="Direct link to Configuration Interpolation" title="Direct link to Configuration Interpolation"></a></h2><p>Configuration values can be interpolated from System Properties, Environment Variables, or local files. Below is an example of how this can be used:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.metadata.storage.type=${env:METADATA_STORAGE_TYPE}</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.processing.tmpDir=${sys:java.io.tmpdir}</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.segmentCache.locations=${file:UTF-8:/config/segment-cache-def.json}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Interpolation is also recursive so you can do:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.segmentCache.locations=${file:UTF-8:${env:SEGMENT_DEF_LOCATION}}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>If the property is not set an exception will be thrown on startup, but a default can be provided if desired. Setting a default value will not work with file interpolation as an exception will be thrown if the file does not exist.</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.metadata.storage.type=${env:METADATA_STORAGE_TYPE:-mysql}</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.processing.tmpDir=${sys:java.io.tmpdir:-/tmp}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>If you need to set a variable that is wrapped by <code>${...}</code> but do not want it to be interpolated you can escape it by adding another <code>$</code>. For example:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">config.name=$${value}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="common-configurations">Common Configurations<a href="#common-configurations" class="hash-link" aria-label="Direct link to Common Configurations" title="Direct link to Common Configurations"></a></h2><p>The properties under this section are common configurations that should be shared across all Druid services in a cluster.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="jvm-configuration-best-practices">JVM Configuration Best Practices<a href="#jvm-configuration-best-practices" class="hash-link" aria-label="Direct link to JVM Configuration Best Practices" title="Direct link to JVM Configuration Best Practices"></a></h3><p>There are four JVM parameters that we set on all of our processes:</p><ul><li><p><code>-Duser.timezone=UTC</code>: This sets the default timezone of the JVM to UTC. We always set this and do not test with other default timezones, so local timezones might work, but they also might uncover weird and interesting bugs. To issue queries in a non-UTC timezone, see <a href="/docs/28.0.0/querying/granularities#period-granularities">query granularities</a></p></li><li><p><code>-Dfile.encoding=UTF-8</code> This is similar to timezone, we test assuming UTF-8. Local encodings might work, but they also might result in weird and interesting bugs.</p></li><li><p><code>-Djava.io.tmpdir=&lt;a path&gt;</code> Various parts of Druid use temporary files to interact with the file system. These files can become quite large. This means that systems that have small <code>/tmp</code> directories can cause problems for Druid. Therefore, set the JVM tmp directory to a location with ample space.</p><p> Also consider the following when configuring the JVM tmp directory:</p><ul><li>The temp directory should not be volatile tmpfs.</li><li>This directory should also have good read and write speed.</li><li>Avoid NFS mount.</li><li>The <code>org.apache.druid.java.util.metrics.SysMonitor</code> requires execute privileges on files in <code>java.io.tmpdir</code>. If you are using the system monitor, do not set <code>java.io.tmpdir</code> to <code>noexec</code>.</li></ul></li><li><p><code>-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager</code> This allows log4j2 to handle logs for non-log4j2 components (like jetty) which use standard java logging.</p></li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="extensions">Extensions<a href="#extensions" class="hash-link" aria-label="Direct link to Extensions" title="Direct link to Extensions"></a></h3><p>Many of Druid&#x27;s external dependencies can be plugged in as modules. Extensions can be provided using the following configs:</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.extensions.directory</code></td><td>The root extension directory where user can put extensions related files. Druid will load extensions stored under this directory.</td><td><code>extensions</code> (This is a relative path to Druid&#x27;s working directory)</td></tr><tr><td><code>druid.extensions.hadoopDependenciesDir</code></td><td>The root hadoop dependencies directory where user can put hadoop related dependencies files. Druid will load the dependencies based on the hadoop coordinate specified in the hadoop index task.</td><td><code>hadoop-dependencies</code> (This is a relative path to Druid&#x27;s working directory</td></tr><tr><td><code>druid.extensions.loadList</code></td><td>A JSON array of extensions to load from extension directories by Druid. If it is not specified, its value will be <code>null</code> and Druid will load all the extensions under <code>druid.extensions.directory</code>. If its value is empty list <code>[]</code>, then no extensions will be loaded at all. It is also allowed to specify absolute path of other custom extensions not stored in the common extensions directory.</td><td>null</td></tr><tr><td><code>druid.extensions.searchCurrentClassloader</code></td><td>This is a boolean flag that determines if Druid will search the main classloader for extensions. It defaults to true but can be turned off if you have reason to not automatically add all modules on the classpath.</td><td>true</td></tr><tr><td><code>druid.extensions.useExtensionClassloaderFirst</code></td><td>This is a boolean flag that determines if Druid extensions should prefer loading classes from their own jars rather than jars bundled with Druid. If false, extensions must be compatible with classes provided by any jars bundled with Druid. If true, extensions may depend on conflicting versions.</td><td>false</td></tr><tr><td><code>druid.extensions.hadoopContainerDruidClasspath</code></td><td>Hadoop Indexing launches hadoop jobs and this configuration provides way to explicitly set the user classpath for the hadoop job. By default this is computed automatically by druid based on the druid process classpath and set of extensions. However, sometimes you might want to be explicit to resolve dependency conflicts between druid and hadoop.</td><td>null</td></tr><tr><td><code>druid.extensions.addExtensionsToHadoopContainer</code></td><td>Only applicable if <code>druid.extensions.hadoopContainerDruidClasspath</code> is provided. If set to true, then extensions specified in the loadList are added to hadoop container classpath. Note that when <code>druid.extensions.hadoopContainerDruidClasspath</code> is not provided then extensions are always added to hadoop container classpath.</td><td>false</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="modules">Modules<a href="#modules" class="hash-link" aria-label="Direct link to Modules" title="Direct link to Modules"></a></h3><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.modules.excludeList</code></td><td>A JSON array of canonical class names (e.g., <code>&quot;org.apache.druid.somepackage.SomeModule&quot;</code>) of module classes which shouldn&#x27;t be loaded, even if they are found in extensions specified by <code>druid.extensions.loadList</code>, or in the list of core modules specified to be loaded on a particular Druid process type. Useful when some useful extension contains some module, which shouldn&#x27;t be loaded on some Druid process type because some dependencies of that module couldn&#x27;t be satisfied.</td><td>[]</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="zookeeper">ZooKeeper<a href="#zookeeper" class="hash-link" aria-label="Direct link to ZooKeeper" title="Direct link to ZooKeeper"></a></h3><p>We recommend just setting the base ZK path and the ZK service host, but all ZK paths that Druid uses can be overwritten to absolute paths.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.zk.paths.base</code></td><td>Base ZooKeeper path.</td><td><code>/druid</code></td></tr><tr><td><code>druid.zk.service.host</code></td><td>The ZooKeeper hosts to connect to. This is a REQUIRED property and therefore a host address must be supplied.</td><td>none</td></tr><tr><td><code>druid.zk.service.user</code></td><td>The username to authenticate with ZooKeeper. This is an optional property.</td><td>none</td></tr><tr><td><code>druid.zk.service.pwd</code></td><td>The <a href="/docs/28.0.0/operations/password-provider">Password Provider</a> or the string password to authenticate with ZooKeeper. This is an optional property.</td><td>none</td></tr><tr><td><code>druid.zk.service.authScheme</code></td><td>digest is the only authentication scheme supported.</td><td>digest</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="zookeeper-behavior">ZooKeeper Behavior<a href="#zookeeper-behavior" class="hash-link" aria-label="Direct link to ZooKeeper Behavior" title="Direct link to ZooKeeper Behavior"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.zk.service.sessionTimeoutMs</code></td><td>ZooKeeper session timeout, in milliseconds.</td><td><code>30000</code></td></tr><tr><td><code>druid.zk.service.connectionTimeoutMs</code></td><td>ZooKeeper connection timeout, in milliseconds.</td><td><code>15000</code></td></tr><tr><td><code>druid.zk.service.compress</code></td><td>Boolean flag for whether or not created Znodes should be compressed.</td><td><code>true</code></td></tr><tr><td><code>druid.zk.service.acl</code></td><td>Boolean flag for whether or not to enable ACL security for ZooKeeper. If ACL is enabled, zNode creators will have all permissions.</td><td><code>false</code></td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="path-configuration">Path Configuration<a href="#path-configuration" class="hash-link" aria-label="Direct link to Path Configuration" title="Direct link to Path Configuration"></a></h4><p>Druid interacts with ZK through a set of standard path configurations. We recommend just setting the base ZK path, but all ZK paths that Druid uses can be overwritten to absolute paths.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.zk.paths.base</code></td><td>Base ZooKeeper path.</td><td><code>/druid</code></td></tr><tr><td><code>druid.zk.paths.propertiesPath</code></td><td>ZooKeeper properties path.</td><td><code>${druid.zk.paths.base}/properties</code></td></tr><tr><td><code>druid.zk.paths.announcementsPath</code></td><td>Druid process announcement path.</td><td><code>${druid.zk.paths.base}/announcements</code></td></tr><tr><td><code>druid.zk.paths.liveSegmentsPath</code></td><td>Current path for where Druid processes announce their segments.</td><td><code>${druid.zk.paths.base}/segments</code></td></tr><tr><td><code>druid.zk.paths.loadQueuePath</code></td><td>Entries here cause Historical processes to load and drop segments.</td><td><code>${druid.zk.paths.base}/loadQueue</code></td></tr><tr><td><code>druid.zk.paths.coordinatorPath</code></td><td>Used by the Coordinator for leader election.</td><td><code>${druid.zk.paths.base}/coordinator</code></td></tr><tr><td><code>druid.zk.paths.servedSegmentsPath</code></td><td>Deprecated. Legacy path for where Druid processes announce their segments.</td><td><code>${druid.zk.paths.base}/servedSegments</code></td></tr></tbody></table><p>The indexing service also uses its own set of paths. These configs can be included in the common configuration.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.zk.paths.indexer.base</code></td><td>Base ZooKeeper path for</td><td><code>${druid.zk.paths.base}/indexer</code></td></tr><tr><td><code>druid.zk.paths.indexer.announcementsPath</code></td><td>Middle managers announce themselves here.</td><td><code>${druid.zk.paths.indexer.base}/announcements</code></td></tr><tr><td><code>druid.zk.paths.indexer.tasksPath</code></td><td>Used to assign tasks to MiddleManagers.</td><td><code>${druid.zk.paths.indexer.base}/tasks</code></td></tr><tr><td><code>druid.zk.paths.indexer.statusPath</code></td><td>Parent path for announcement of task statuses.</td><td><code>${druid.zk.paths.indexer.base}/status</code></td></tr></tbody></table><p>If <code>druid.zk.paths.base</code> and <code>druid.zk.paths.indexer.base</code> are both set, and none of the other <code>druid.zk.paths.*</code> or <code>druid.zk.paths.indexer.*</code> values are set, then the other properties will be evaluated relative to their respective <code>base</code>.
For example, if <code>druid.zk.paths.base</code> is set to <code>/druid1</code> and <code>druid.zk.paths.indexer.base</code> is set to <code>/druid2</code> then <code>druid.zk.paths.announcementsPath</code> will default to <code>/druid1/announcements</code> while <code>druid.zk.paths.indexer.announcementsPath</code> will default to <code>/druid2/announcements</code>.</p><p>The following path is used for service discovery. It is <strong>not</strong> affected by <code>druid.zk.paths.base</code> and <strong>must</strong> be specified separately.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.discovery.curator.path</code></td><td>Services announce themselves under this ZooKeeper path.</td><td><code>/druid/discovery</code></td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="tls">TLS<a href="#tls" class="hash-link" aria-label="Direct link to TLS" title="Direct link to TLS"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="general-configuration">General Configuration<a href="#general-configuration" class="hash-link" aria-label="Direct link to General Configuration" title="Direct link to General Configuration"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.enablePlaintextPort</code></td><td>Enable/Disable HTTP connector.</td><td><code>true</code></td></tr><tr><td><code>druid.enableTlsPort</code></td><td>Enable/Disable HTTPS connector.</td><td><code>false</code></td></tr></tbody></table><p>Although not recommended but both HTTP and HTTPS connectors can be enabled at a time and respective ports are configurable using <code>druid.plaintextPort</code>
and <code>druid.tlsPort</code> properties on each process. Please see <code>Configuration</code> section of individual processes to check the valid and default values for these ports.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="jetty-server-tls-configuration">Jetty Server TLS Configuration<a href="#jetty-server-tls-configuration" class="hash-link" aria-label="Direct link to Jetty Server TLS Configuration" title="Direct link to Jetty Server TLS Configuration"></a></h4><p>Druid uses Jetty as an embedded web server. To learn more about TLS/SSL, certificates, and related concepts in Jetty, including explanations of the configuration settings below, see &quot;Configuring SSL/TLS KeyStores&quot; in the <a href="https://www.eclipse.org/jetty/documentation.php" target="_blank" rel="noopener noreferrer">Jetty Operations Guide</a>.</p><p>For information about TLS/SSL support in Java in general, see the <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html" target="_blank" rel="noopener noreferrer">Java Secure Socket Extension (JSSE) Reference Guide</a>.
The <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html" target="_blank" rel="noopener noreferrer">Java Cryptography Architecture
Standard Algorithm Name Documentation for JDK 8</a> lists all possible
values for the following properties, among others provided by the Java implementation.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>druid.server.https.keyStorePath</code></td><td>The file path or URL of the TLS/SSL Key store.</td><td>none</td><td>yes</td></tr><tr><td><code>druid.server.https.keyStoreType</code></td><td>The type of the key store.</td><td>none</td><td>yes</td></tr><tr><td><code>druid.server.https.certAlias</code></td><td>Alias of TLS/SSL certificate for the connector.</td><td>none</td><td>yes</td></tr><tr><td><code>druid.server.https.keyStorePassword</code></td><td>The <a href="/docs/28.0.0/operations/password-provider">Password Provider</a> or String password for the Key Store.</td><td>none</td><td>yes</td></tr></tbody></table><p>Following table contains non-mandatory advanced configuration options, use caution.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>druid.server.https.keyManagerFactoryAlgorithm</code></td><td>Algorithm to use for creating KeyManager, more details <a href="https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#KeyManager" target="_blank" rel="noopener noreferrer">here</a>.</td><td><code>javax.net.ssl.KeyManagerFactory.getDefaultAlgorithm()</code></td><td>no</td></tr><tr><td><code>druid.server.https.keyManagerPassword</code></td><td>The <a href="/docs/28.0.0/operations/password-provider">Password Provider</a> or String password for the Key Manager.</td><td>none</td><td>no</td></tr><tr><td><code>druid.server.https.includeCipherSuites</code></td><td>List of cipher suite names to include. You can either use the exact cipher suite name or a regular expression.</td><td>Jetty&#x27;s default include cipher list</td><td>no</td></tr><tr><td><code>druid.server.https.excludeCipherSuites</code></td><td>List of cipher suite names to exclude. You can either use the exact cipher suite name or a regular expression.</td><td>Jetty&#x27;s default exclude cipher list</td><td>no</td></tr><tr><td><code>druid.server.https.includeProtocols</code></td><td>List of exact protocols names to include.</td><td>Jetty&#x27;s default include protocol list</td><td>no</td></tr><tr><td><code>druid.server.https.excludeProtocols</code></td><td>List of exact protocols names to exclude.</td><td>Jetty&#x27;s default exclude protocol list</td><td>no</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="internal-client-tls-configuration-requires-simple-client-sslcontext-extension">Internal Client TLS Configuration (requires <code>simple-client-sslcontext</code> extension)<a href="#internal-client-tls-configuration-requires-simple-client-sslcontext-extension" class="hash-link" aria-label="Direct link to internal-client-tls-configuration-requires-simple-client-sslcontext-extension" title="Direct link to internal-client-tls-configuration-requires-simple-client-sslcontext-extension"></a></h4><p>These properties apply to the SSLContext that will be provided to the internal HTTP client that Druid services use to communicate with each other. These properties require the <code>simple-client-sslcontext</code> extension to be loaded. Without it, Druid services will be unable to communicate with each other when TLS is enabled.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>druid.client.https.protocol</code></td><td>SSL protocol to use.</td><td><code>TLSv1.2</code></td><td>no</td></tr><tr><td><code>druid.client.https.trustStoreType</code></td><td>The type of the key store where trusted root certificates are stored.</td><td><code>java.security.KeyStore.getDefaultType()</code></td><td>no</td></tr><tr><td><code>druid.client.https.trustStorePath</code></td><td>The file path or URL of the TLS/SSL Key store where trusted root certificates are stored.</td><td>none</td><td>yes</td></tr><tr><td><code>druid.client.https.trustStoreAlgorithm</code></td><td>Algorithm to be used by TrustManager to validate certificate chains</td><td><code>javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm()</code></td><td>no</td></tr><tr><td><code>druid.client.https.trustStorePassword</code></td><td>The <a href="/docs/28.0.0/operations/password-provider">Password Provider</a> or String password for the Trust Store.</td><td>none</td><td>yes</td></tr></tbody></table><p>This <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html" target="_blank" rel="noopener noreferrer">document</a> lists all the possible
values for the above mentioned configs among others provided by Java implementation.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="authentication-and-authorization">Authentication and Authorization<a href="#authentication-and-authorization" class="hash-link" aria-label="Direct link to Authentication and Authorization" title="Direct link to Authentication and Authorization"></a></h3><table><thead><tr><th>Property</th><th>Type</th><th>Description</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>druid.auth.authenticatorChain</code></td><td>JSON List of Strings</td><td>List of Authenticator type names</td><td>[&quot;allowAll&quot;]</td><td>no</td></tr><tr><td><code>druid.escalator.type</code></td><td>String</td><td>Type of the Escalator that should be used for internal Druid communications. This Escalator must use an authentication scheme that is supported by an Authenticator in <code>druid.auth.authenticatorChain</code>.</td><td>&quot;noop&quot;</td><td>no</td></tr><tr><td><code>druid.auth.authorizers</code></td><td>JSON List of Strings</td><td>List of Authorizer type names</td><td>[&quot;allowAll&quot;]</td><td>no</td></tr><tr><td><code>druid.auth.unsecuredPaths</code></td><td>List of Strings</td><td>List of paths for which security checks will not be performed. All requests to these paths will be allowed.</td><td>[]</td><td>no</td></tr><tr><td><code>druid.auth.allowUnauthenticatedHttpOptions</code></td><td>Boolean</td><td>If true, skip authentication checks for HTTP OPTIONS requests. This is needed for certain use cases, such as supporting CORS pre-flight requests. Note that disabling authentication checks for OPTIONS requests will allow unauthenticated users to determine what Druid endpoints are valid (by checking if the OPTIONS request returns a 200 instead of 404), so enabling this option may reveal information about server configuration, including information about what extensions are loaded (if those extensions add endpoints).</td><td>false</td><td>no</td></tr></tbody></table><p>For more information, please see <a href="/docs/28.0.0/operations/auth">Authentication and Authorization</a>.</p><p>For configuration options for specific auth extensions, please refer to the extension documentation.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="startup-logging">Startup Logging<a href="#startup-logging" class="hash-link" aria-label="Direct link to Startup Logging" title="Direct link to Startup Logging"></a></h3><p>All processes can log debugging information on startup.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.startup.logging.logProperties</code></td><td>Log all properties on startup (from common.runtime.properties, runtime.properties, and the JVM command line).</td><td>false</td></tr><tr><td><code>druid.startup.logging.maskProperties</code></td><td>Masks sensitive properties (passwords, for example) containing theses words.</td><td>[&quot;password&quot;]</td></tr></tbody></table><p>Note that some sensitive information may be logged if these settings are enabled.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="request-logging">Request Logging<a href="#request-logging" class="hash-link" aria-label="Direct link to Request Logging" title="Direct link to Request Logging"></a></h3><p>All processes that can serve queries can also log the query requests they see. Broker processes can additionally log the SQL requests (both from HTTP and JDBC) they see.
For an example of setting up request logging, see <a href="/docs/28.0.0/operations/request-logging">Request logging</a>.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.request.logging.type</code></td><td>How to log every query request. Choices: <code>noop</code>, <a href="#file-request-logging"><code>file</code></a>, <a href="#emitter-request-logging"><code>emitter</code></a>, <a href="#slf4j-request-logging"><code>slf4j</code></a>, <a href="#filtered-request-logging"><code>filtered</code></a>, <a href="#composing-request-logging"><code>composing</code></a>, <a href="#switching-request-logging"><code>switching</code></a></td><td><code>noop</code> (request logging disabled by default)</td></tr></tbody></table><p>Note that you can enable sending all the HTTP requests to log by setting <code>org.apache.druid.jetty.RequestLog</code> to the <code>DEBUG</code> level. See <a href="/docs/28.0.0/configuration/logging">Logging</a> for more information.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="file-request-logging">File request logging<a href="#file-request-logging" class="hash-link" aria-label="Direct link to File request logging" title="Direct link to File request logging"></a></h4><p>The <code>file</code> request logger stores daily request logs on disk.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.request.logging.dir</code></td><td>Historical, Realtime and Broker processes maintain request logs of all of the requests they get (interaction is via POST, so normal request logs don’t generally capture information about the actual query), this specifies the directory to store the request logs in</td><td>none</td></tr><tr><td><code>druid.request.logging.filePattern</code></td><td><a href="http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html" target="_blank" rel="noopener noreferrer">Joda datetime format</a> for each file</td><td>&quot;yyyy-MM-dd&#x27;.log&#x27;&quot;</td></tr><tr><td><code>druid.request.logging.durationToRetain</code></td><td>Period to retain the request logs on disk. The period should be at least longer than <code>P1D</code>.</td><td>none</td></tr></tbody></table><p>The format of request logs is TSV, one line per requests, with five fields: timestamp, remote<!-- -->_<!-- -->addr, native<!-- -->_<!-- -->query, query<!-- -->_<!-- -->context, sql<!-- -->_<!-- -->query.</p><p>For native JSON request, the <code>sql_query</code> field is empty. Example</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">2019-01-14T10:00:00.000Z 127.0.0.1 {&quot;queryType&quot;:&quot;topN&quot;,&quot;dataSource&quot;:{&quot;type&quot;:&quot;table&quot;,&quot;name&quot;:&quot;wikiticker&quot;},&quot;virtualColumns&quot;:[],&quot;dimension&quot;:{&quot;type&quot;:&quot;LegacyDimensionSpec&quot;,&quot;dimension&quot;:&quot;page&quot;,&quot;outputName&quot;:&quot;page&quot;,&quot;outputType&quot;:&quot;STRING&quot;},&quot;metric&quot;:{&quot;type&quot;:&quot;LegacyTopNMetricSpec&quot;,&quot;metric&quot;:&quot;count&quot;},&quot;threshold&quot;:10,&quot;intervals&quot;:{&quot;type&quot;:&quot;LegacySegmentSpec&quot;,&quot;intervals&quot;:[&quot;2015-09-12T00:00:00.000Z/2015-09-13T00:00:00.000Z&quot;]},&quot;filter&quot;:null,&quot;granularity&quot;:{&quot;type&quot;:&quot;all&quot;},&quot;aggregations&quot;:[{&quot;type&quot;:&quot;count&quot;,&quot;name&quot;:&quot;count&quot;}],&quot;postAggregations&quot;:[],&quot;context&quot;:{&quot;queryId&quot;:&quot;74c2d540-d700-4ebd-b4a9-3d02397976aa&quot;},&quot;descending&quot;:false} {&quot;query/time&quot;:100,&quot;query/bytes&quot;:800,&quot;success&quot;:true,&quot;identity&quot;:&quot;user1&quot;}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>For SQL query request, the <code>native_query</code> field is empty. Example</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">2019-01-14T10:00:00.000Z 127.0.0.1 {&quot;sqlQuery/time&quot;:100, &quot;sqlQuery/planningTimeMs&quot;:10, &quot;sqlQuery/bytes&quot;:600, &quot;success&quot;:true, &quot;identity&quot;:&quot;user1&quot;} {&quot;query&quot;:&quot;SELECT page, COUNT(*) AS Edits FROM wikiticker WHERE TIME_IN_INTERVAL(\&quot;__time\&quot;, &#x27;2015-09-12/2015-09-13&#x27;) GROUP BY page ORDER BY Edits DESC LIMIT 10&quot;,&quot;context&quot;:{&quot;sqlQueryId&quot;:&quot;c9d035a0-5ffd-4a79-a865-3ffdadbb5fdd&quot;,&quot;nativeQueryIds&quot;:&quot;[490978e4-f5c7-4cf6-b174-346e63cf8863]&quot;}}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h4 class="anchor anchorWithStickyNavbar_LWe7" id="emitter-request-logging">Emitter request logging<a href="#emitter-request-logging" class="hash-link" aria-label="Direct link to Emitter request logging" title="Direct link to Emitter request logging"></a></h4><p>The <code>emitter</code> request logger emits every request to the external location specified in the <a href="#enabling-metrics">emitter</a> configuration.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.request.logging.feed</code></td><td>Feed name for requests.</td><td>none</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="slf4j-request-logging">SLF4J request logging<a href="#slf4j-request-logging" class="hash-link" aria-label="Direct link to SLF4J request logging" title="Direct link to SLF4J request logging"></a></h4><p>The <code>slf4j</code> request logger logs every request using SLF4J. It serializes native queries into JSON in the log message regardless of the SLF4J format specification. Requests are logged under the class <code>org.apache.druid.server.log.LoggingRequestLogger</code>.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.request.logging.setMDC</code></td><td>If you want to set MDC entries within the log entry, set this value to <code>true</code>. Your logging system must be configured to support MDC in order to format this data.</td><td>false</td></tr><tr><td><code>druid.request.logging.setContextMDC</code></td><td>Set to &quot;true&quot; to add the Druid query <code>context</code> to the MDC entries. Only applies when <code>setMDC</code> is <code>true</code>.</td><td>false</td></tr></tbody></table><p>For a native query, the following MDC fields are populated when <code>setMDC</code> is <code>true</code>:</p><table><thead><tr><th>MDC field</th><th>Description</th></tr></thead><tbody><tr><td><code>queryId</code></td><td>The query ID</td></tr><tr><td><code>sqlQueryId</code></td><td>The SQL query ID if this query is part of a SQL request</td></tr><tr><td><code>dataSource</code></td><td>The datasource the query was against</td></tr><tr><td><code>queryType</code></td><td>The type of the query</td></tr><tr><td><code>hasFilters</code></td><td>If the query has any filters</td></tr><tr><td><code>remoteAddr</code></td><td>The remote address of the requesting client</td></tr><tr><td><code>duration</code></td><td>The duration of the query interval</td></tr><tr><td><code>resultOrdering</code></td><td>The ordering of results</td></tr><tr><td><code>descending</code></td><td>If the query is a descending query</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="filtered-request-logging">Filtered request logging<a href="#filtered-request-logging" class="hash-link" aria-label="Direct link to Filtered request logging" title="Direct link to Filtered request logging"></a></h4><p>The <code>filtered</code> request logger filters requests based on the query type or how long a query takes to complete.
For native queries, the logger only logs requests when the <code>query/time</code> metric exceeds the threshold provided in <code>queryTimeThresholdMs</code>.
For SQL queries, it only logs requests when the <code>sqlQuery/time</code> metric exceeds threshold provided in <code>sqlQueryTimeThresholdMs</code>.
See <a href="/docs/28.0.0/operations/metrics">Metrics</a> for more details on query metrics.</p><p>Requests that meet the threshold are logged using the request logger type set in <code>druid.request.logging.delegate.type</code>.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.request.logging.queryTimeThresholdMs</code></td><td>Threshold value for the <code>query/time</code> metric in milliseconds.</td><td>0, i.e., no filtering</td></tr><tr><td><code>druid.request.logging.sqlQueryTimeThresholdMs</code></td><td>Threshold value for the <code>sqlQuery/time</code> metric in milliseconds.</td><td>0, i.e., no filtering</td></tr><tr><td><code>druid.request.logging.mutedQueryTypes</code></td><td>Query requests of these types are not logged. Query types are defined as string objects corresponding to the &quot;queryType&quot; value for the specified query in the Druid&#x27;s <a href="http://druid.apache.org/docs/latest/querying/querying" target="_blank" rel="noopener noreferrer">native JSON query API</a>. Misspelled query types will be ignored. Example to ignore scan and timeBoundary queries: <!-- -->[&quot;scan&quot;, &quot;timeBoundary&quot;]</td><td>[]</td></tr><tr><td><code>druid.request.logging.delegate.type</code></td><td>Type of delegate request logger to log requests.</td><td>none</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="composing-request-logging">Composing request logging<a href="#composing-request-logging" class="hash-link" aria-label="Direct link to Composing request logging" title="Direct link to Composing request logging"></a></h4><p>The <code>composing</code> request logger emits request logs to multiple request loggers.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.request.logging.loggerProviders</code></td><td>List of request loggers for emitting request logs.</td><td>none</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="switching-request-logging">Switching request logging<a href="#switching-request-logging" class="hash-link" aria-label="Direct link to Switching request logging" title="Direct link to Switching request logging"></a></h4><p>The <code>switching</code> request logger routes native query request logs to one request logger and SQL query request logs to another request logger.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.request.logging.nativeQueryLogger</code></td><td>Request logger for emitting native query request logs.</td><td>none</td></tr><tr><td><code>druid.request.logging.sqlQueryLogger</code></td><td>Request logger for emitting SQL query request logs.</td><td>none</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="audit-logging">Audit Logging<a href="#audit-logging" class="hash-link" aria-label="Direct link to Audit Logging" title="Direct link to Audit Logging"></a></h3><p>Coordinator and Overlord log changes to lookups, segment load/drop rules, dynamic configuration changes for auditing</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.audit.manager.auditHistoryMillis</code></td><td>Default duration for querying audit history.</td><td>1 week</td></tr><tr><td><code>druid.audit.manager.includePayloadAsDimensionInMetric</code></td><td>Boolean flag on whether to add <code>payload</code> column in service metric.</td><td>false</td></tr><tr><td><code>druid.audit.manager.maxPayloadSizeBytes</code></td><td>The maximum size of audit payload to store in Druid&#x27;s metadata store audit table. If the size of audit payload exceeds this value, the audit log would be stored with a message indicating that the payload was omitted instead. Setting <code>maxPayloadSizeBytes</code> to -1 (default value) disables this check, meaning Druid will always store audit payload regardless of it&#x27;s size. Setting to any negative number other than <code>-1</code> is invalid. Human-readable format is supported, see <a href="/docs/28.0.0/configuration/human-readable-byte">here</a>.</td><td>-1</td></tr><tr><td><code>druid.audit.manager.skipNullField</code></td><td>If true, the audit payload stored in metadata store will exclude any field with null value.</td><td>false</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="enabling-metrics">Enabling Metrics<a href="#enabling-metrics" class="hash-link" aria-label="Direct link to Enabling Metrics" title="Direct link to Enabling Metrics"></a></h3><p>You can configure Druid processes to emit <a href="/docs/28.0.0/operations/metrics">metrics</a> regularly from a number of <a href="#metrics-monitors">monitors</a> via <a href="#metrics-emitters">emitters</a>.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.monitoring.emissionPeriod</code></td><td>Frequency that Druid emits metrics.</td><td><code>PT1M</code></td></tr><tr><td><a href="#metrics-monitors"><code>druid.monitoring.monitors</code></a></td><td>Sets list of Druid monitors used by a process.</td><td>none (no monitors)</td></tr><tr><td><a href="#metrics-emitters"><code>druid.emitter</code></a></td><td>Setting this value initializes one of the emitter modules.</td><td><code>noop</code> (metric emission disabled by default)</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="metrics-monitors">Metrics monitors<a href="#metrics-monitors" class="hash-link" aria-label="Direct link to Metrics monitors" title="Direct link to Metrics monitors"></a></h4><p>Metric monitoring is an essential part of Druid operations. The following monitors are available:</p><table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>org.apache.druid.client.cache.CacheMonitor</code></td><td>Emits metrics (to logs) about the segment results cache for Historical and Broker processes. Reports typical cache statistics include hits, misses, rates, and size (bytes and number of entries), as well as timeouts and and errors.</td></tr><tr><td><code>org.apache.druid.java.util.metrics.SysMonitor</code></td><td>Reports on various system activities and statuses using the <a href="https://github.com/hyperic/sigar" target="_blank" rel="noopener noreferrer">SIGAR library</a>. Requires execute privileges on files in <code>java.io.tmpdir</code>. Do not set <code>java.io.tmpdir</code> to <code>noexec</code> when using <code>SysMonitor</code>.</td></tr><tr><td><code>org.apache.druid.java.util.metrics.JvmMonitor</code></td><td>Reports various JVM-related statistics.</td></tr><tr><td><code>org.apache.druid.java.util.metrics.JvmCpuMonitor</code></td><td>Reports statistics of CPU consumption by the JVM.</td></tr><tr><td><code>org.apache.druid.java.util.metrics.CpuAcctDeltaMonitor</code></td><td>Reports consumed CPU as per the cpuacct cgroup.</td></tr><tr><td><code>org.apache.druid.java.util.metrics.JvmThreadsMonitor</code></td><td>Reports Thread statistics in the JVM, like numbers of total, daemon, started, died threads.</td></tr><tr><td><code>org.apache.druid.java.util.metrics.CgroupCpuMonitor</code></td><td>Reports CPU shares and quotas as per the <code>cpu</code> cgroup.</td></tr><tr><td><code>org.apache.druid.java.util.metrics.CgroupCpuSetMonitor</code></td><td>Reports CPU core/HT and memory node allocations as per the <code>cpuset</code> cgroup.</td></tr><tr><td><code>org.apache.druid.java.util.metrics.CgroupMemoryMonitor</code></td><td>Reports memory statistic as per the memory cgroup.</td></tr><tr><td><code>org.apache.druid.server.metrics.EventReceiverFirehoseMonitor</code></td><td>Reports how many events have been queued in the EventReceiverFirehose.</td></tr><tr><td><code>org.apache.druid.server.metrics.HistoricalMetricsMonitor</code></td><td>Reports statistics on Historical processes. Available only on Historical processes.</td></tr><tr><td><code>org.apache.druid.server.metrics.SegmentStatsMonitor</code></td><td><strong>EXPERIMENTAL</strong> Reports statistics about segments on Historical processes. Available only on Historical processes. Not to be used when lazy loading is configured.</td></tr><tr><td><code>org.apache.druid.server.metrics.QueryCountStatsMonitor</code></td><td>Reports how many queries have been successful/failed/interrupted.</td></tr><tr><td><code>org.apache.druid.server.metrics.SubqueryCountStatsMonitor</code></td><td>Reports how many subqueries have been materialized as rows or bytes and various other statistics related to the subquery execution</td></tr><tr><td><code>org.apache.druid.server.emitter.HttpEmittingMonitor</code></td><td>Reports internal metrics of <code>http</code> or <code>parametrized</code> emitter (see below). Must not be used with another emitter type. See the description of the metrics here: <a href="https://github.com/apache/druid/pull/4973" target="_blank" rel="noopener noreferrer">https://github.com/apache/druid/pull/4973</a>.</td></tr><tr><td><code>org.apache.druid.server.metrics.TaskCountStatsMonitor</code></td><td>Reports how many ingestion tasks are currently running/pending/waiting and also the number of successful/failed tasks per emission period.</td></tr><tr><td><code>org.apache.druid.server.metrics.TaskSlotCountStatsMonitor</code></td><td>Reports metrics about task slot usage per emission period.</td></tr><tr><td><code>org.apache.druid.server.metrics.WorkerTaskCountStatsMonitor</code></td><td>Reports how many ingestion tasks are currently running/pending/waiting, the number of successful/failed tasks, and metrics about task slot usage for the reporting worker, per emission period. Only supported by middleManager node types.</td></tr><tr><td><code>org.apache.druid.server.metrics.ServiceStatusMonitor</code></td><td>Reports a heartbeat for the service.</td></tr></tbody></table><p>For example, you might configure monitors on all processes for system and JVM information within <code>common.runtime.properties</code> as follows:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.monitoring.monitors=[&quot;org.apache.druid.java.util.metrics.SysMonitor&quot;,&quot;org.apache.druid.java.util.metrics.JvmMonitor&quot;]</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>You can override cluster-wide configuration by amending the <code>runtime.properties</code> of individual processes.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="metrics-emitters">Metrics emitters<a href="#metrics-emitters" class="hash-link" aria-label="Direct link to Metrics emitters" title="Direct link to Metrics emitters"></a></h4><p>There are several emitters available:</p><ul><li><code>noop</code> (default) disables metric emission.</li><li><a href="#logging-emitter-module"><code>logging</code></a> emits logs using Log4j2.</li><li><a href="#http-emitter-module"><code>http</code></a> sends <code>POST</code> requests of JSON events.</li><li><a href="#parametrized-http-emitter-module"><code>parametrized</code></a> operates like the <code>http</code> emitter but fine-tunes the recipient URL based on the event feed.</li><li><a href="#composing-emitter-module"><code>composing</code></a> initializes multiple emitter modules.</li><li><a href="#graphite-emitter"><code>graphite</code></a> emits metrics to a <a href="https://graphiteapp.org/" target="_blank" rel="noopener noreferrer">Graphite</a> Carbon service.</li><li><a href="#switching-emitter"><code>switching</code></a> initializes and emits to multiple emitter modules based on the event feed.</li></ul><h5 class="anchor anchorWithStickyNavbar_LWe7" id="logging-emitter-module">Logging Emitter Module<a href="#logging-emitter-module" class="hash-link" aria-label="Direct link to Logging Emitter Module" title="Direct link to Logging Emitter Module"></a></h5><p>The use this emitter module, set <code>druid.emitter=logging</code>. The <code>logging</code> emitter uses a Log4j2 logger named
<code>druid.emitter.logging.loggerClass</code> to emit events. Each event is logged as a single <code>json</code> object with a
<a href="https://logging.apache.org/log4j/2.x/manual/markers.html" target="_blank" rel="noopener noreferrer">Marker</a> as the feed of the event. Users may wish to edit the
log4j config to route these logs to different sources based on the feed of the event.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.emitter.logging.loggerClass</code></td><td>The class used for logging.</td><td><code>org.apache.druid.java.util.emitter.core.LoggingEmitter</code></td></tr><tr><td><code>druid.emitter.logging.logLevel</code></td><td>Choices: debug, info, warn, error. The log level at which message are logged.</td><td>info</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="http-emitter-module">HTTP Emitter Module<a href="#http-emitter-module" class="hash-link" aria-label="Direct link to HTTP Emitter Module" title="Direct link to HTTP Emitter Module"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.emitter.http.flushMillis</code></td><td>How often the internal message buffer is flushed (data is sent).</td><td>60000</td></tr><tr><td><code>druid.emitter.http.flushCount</code></td><td>How many messages the internal message buffer can hold before flushing (sending).</td><td>500</td></tr><tr><td><code>druid.emitter.http.basicAuthentication</code></td><td><a href="/docs/28.0.0/operations/password-provider">Password Provider</a> for providing Login and password for authentication in &quot;login:password&quot; form, e.g., <code>druid.emitter.http.basicAuthentication=admin:adminpassword</code> uses Default Password Provider which allows plain text passwords.</td><td>not specified = no authentication</td></tr><tr><td><code>druid.emitter.http.flushTimeOut</code></td><td>The timeout after which an event should be sent to the endpoint, even if internal buffers are not filled, in milliseconds.</td><td>not specified = no timeout</td></tr><tr><td><code>druid.emitter.http.batchingStrategy</code></td><td>The strategy of how the batch is formatted. &quot;ARRAY&quot; means <code>[event1,event2]</code>, &quot;NEWLINES&quot; means <code>event1\nevent2</code>, ONLY_EVENTS means <code>event1event2</code>.</td><td>ARRAY</td></tr><tr><td><code>druid.emitter.http.maxBatchSize</code></td><td>The maximum batch size, in bytes.</td><td>the minimum of (10% of JVM heap size divided by 2) or (5242880 (i. e. 5 MiB))</td></tr><tr><td><code>druid.emitter.http.batchQueueSizeLimit</code></td><td>The maximum number of batches in emitter queue, if there are problems with emitting.</td><td>the maximum of (2) or (10% of the JVM heap size divided by 5MiB)</td></tr><tr><td><code>druid.emitter.http.minHttpTimeoutMillis</code></td><td>If the speed of filling batches imposes timeout smaller than that, not even trying to send batch to endpoint, because it will likely fail, not being able to send the data that fast. Configure this depending based on emitter/successfulSending/minTimeMs metric. Reasonable values are 10ms..100ms.</td><td>0</td></tr><tr><td><code>druid.emitter.http.recipientBaseUrl</code></td><td>The base URL to emit messages to. Druid will POST JSON to be consumed at the HTTP endpoint specified by this property.</td><td>none, required config</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="http-emitter-module-tls-overrides">HTTP Emitter Module TLS Overrides<a href="#http-emitter-module-tls-overrides" class="hash-link" aria-label="Direct link to HTTP Emitter Module TLS Overrides" title="Direct link to HTTP Emitter Module TLS Overrides"></a></h5><p>By default, when sending events to a TLS-enabled receiver, the HTTP Emitter uses an SSLContext obtained from the process described at <a href="/docs/28.0.0/operations/tls-support">Druid&#x27;s internal communication over TLS</a>, i.e., the same
SSLContext that would be used for internal communications between Druid processes.</p><p>In some use cases it may be desirable to have the HTTP Emitter use its own separate truststore configuration. For example, there may be organizational policies that prevent the TLS-enabled metrics receiver&#x27;s certificate from being added to the same truststore used by Druid&#x27;s internal HTTP client.</p><p>The following properties allow the HTTP Emitter to use its own truststore configuration when building its SSLContext.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.emitter.http.ssl.useDefaultJavaContext</code></td><td>If set to true, the HttpEmitter will use <code>SSLContext.getDefault()</code>, the default Java SSLContext, and all other properties below are ignored.</td><td>false</td></tr><tr><td><code>druid.emitter.http.ssl.trustStorePath</code></td><td>The file path or URL of the TLS/SSL Key store where trusted root certificates are stored. If this is unspecified, the HTTP Emitter will use the same SSLContext as Druid&#x27;s internal HTTP client, as described in the beginning of this section, and all other properties below are ignored.</td><td>null</td></tr><tr><td><code>druid.emitter.http.ssl.trustStoreType</code></td><td>The type of the key store where trusted root certificates are stored.</td><td><code>java.security.KeyStore.getDefaultType()</code></td></tr><tr><td><code>druid.emitter.http.ssl.trustStoreAlgorithm</code></td><td>Algorithm to be used by TrustManager to validate certificate chains</td><td><code>javax.net.ssl.TrustManagerFactory.getDefaultAlgorithm()</code></td></tr><tr><td><code>druid.emitter.http.ssl.trustStorePassword</code></td><td>The <a href="/docs/28.0.0/operations/password-provider">Password Provider</a> or String password for the Trust Store.</td><td>none</td></tr><tr><td><code>druid.emitter.http.ssl.protocol</code></td><td>TLS protocol to use.</td><td>&quot;TLSv1.2&quot;</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="parametrized-http-emitter-module">Parametrized HTTP Emitter Module<a href="#parametrized-http-emitter-module" class="hash-link" aria-label="Direct link to Parametrized HTTP Emitter Module" title="Direct link to Parametrized HTTP Emitter Module"></a></h5><p>The parametrized emitter takes the same configs as the <a href="#http-emitter-module"><code>http</code> emitter</a> using the prefix <code>druid.emitter.parametrized.httpEmitting.</code>.
For example:</p><ul><li><code>druid.emitter.parametrized.httpEmitting.flushMillis</code></li><li><code>druid.emitter.parametrized.httpEmitting.flushCount</code></li><li><code>druid.emitter.parametrized.httpEmitting.ssl.trustStorePath</code></li></ul><p>Do not specify <code>recipientBaseUrl</code> with the parametrized emitter.
Instead use <code>recipientBaseUrlPattern</code> described in the table below.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.emitter.parametrized.recipientBaseUrlPattern</code></td><td>The URL pattern to send an event to, based on the event&#x27;s feed. E.g., <code>http://foo.bar/{feed}</code>, that will send event to <code>http://foo.bar/metrics</code> if the event&#x27;s feed is &quot;metrics&quot;.</td><td>none, required config</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="composing-emitter-module">Composing Emitter Module<a href="#composing-emitter-module" class="hash-link" aria-label="Direct link to Composing Emitter Module" title="Direct link to Composing Emitter Module"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.emitter.composing.emitters</code></td><td>List of emitter modules to load, e.g., <!-- -->[&quot;logging&quot;,&quot;http&quot;]<!-- -->.</td><td>[]</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="graphite-emitter">Graphite Emitter<a href="#graphite-emitter" class="hash-link" aria-label="Direct link to Graphite Emitter" title="Direct link to Graphite Emitter"></a></h5><p>To use graphite as emitter set <code>druid.emitter=graphite</code>. For configuration details, see <a href="/docs/28.0.0/development/extensions-contrib/graphite">Graphite emitter</a> for the Graphite emitter Druid extension.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="switching-emitter">Switching Emitter<a href="#switching-emitter" class="hash-link" aria-label="Direct link to Switching Emitter" title="Direct link to Switching Emitter"></a></h5><p>To use switching as emitter set <code>druid.emitter=switching</code>. </p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.emitter.switching.emitters</code></td><td>JSON map of feed to list of emitter modules that will be used for the mapped feed, e.g., {&quot;metrics&quot;:<!-- -->[&quot;http&quot;]<!-- -->, &quot;alerts&quot;:<!-- -->[&quot;logging&quot;]<!-- -->}</td><td>{}</td></tr><tr><td><code>druid.emitter.switching.defaultEmitters</code></td><td>JSON list of emitter modules to load that will be used if there is no emitter specifically designated for that event&#x27;s feed, e.g., <!-- -->[&quot;logging&quot;,&quot;http&quot;]<!-- -->.</td><td>[]</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="metadata-storage">Metadata storage<a href="#metadata-storage" class="hash-link" aria-label="Direct link to Metadata storage" title="Direct link to Metadata storage"></a></h3><p>These properties specify the JDBC connection and other configuration around the metadata storage. The only processes that connect to the metadata storage with these properties are the <a href="/docs/28.0.0/design/coordinator">Coordinator</a> and <a href="/docs/28.0.0/design/overlord">Overlord</a>.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.metadata.storage.type</code></td><td>The type of metadata storage to use. Choose from &quot;mysql&quot;, &quot;postgresql&quot;, or &quot;derby&quot;.</td><td>derby</td></tr><tr><td><code>druid.metadata.storage.connector.connectURI</code></td><td>The JDBC URI for the database to connect to</td><td>none</td></tr><tr><td><code>druid.metadata.storage.connector.user</code></td><td>The username to connect with.</td><td>none</td></tr><tr><td><code>druid.metadata.storage.connector.password</code></td><td>The <a href="/docs/28.0.0/operations/password-provider">Password Provider</a> or String password used to connect with.</td><td>none</td></tr><tr><td><code>druid.metadata.storage.connector.createTables</code></td><td>If Druid requires a table and it doesn&#x27;t exist, create it?</td><td>true</td></tr><tr><td><code>druid.metadata.storage.tables.base</code></td><td>The base name for tables.</td><td>druid</td></tr><tr><td><code>druid.metadata.storage.tables.dataSource</code></td><td>The table to use to look for dataSources which created by <a href="/docs/28.0.0/development/extensions-core/kafka-ingestion">Kafka Indexing Service</a>.</td><td>druid_dataSource</td></tr><tr><td><code>druid.metadata.storage.tables.pendingSegments</code></td><td>The table to use to look for pending segments.</td><td>druid_pendingSegments</td></tr><tr><td><code>druid.metadata.storage.tables.segments</code></td><td>The table to use to look for segments.</td><td>druid_segments</td></tr><tr><td><code>druid.metadata.storage.tables.rules</code></td><td>The table to use to look for segment load/drop rules.</td><td>druid_rules</td></tr><tr><td><code>druid.metadata.storage.tables.config</code></td><td>The table to use to look for configs.</td><td>druid_config</td></tr><tr><td><code>druid.metadata.storage.tables.tasks</code></td><td>Used by the indexing service to store tasks.</td><td>druid_tasks</td></tr><tr><td><code>druid.metadata.storage.tables.taskLog</code></td><td>Used by the indexing service to store task logs.</td><td>druid_tasklogs</td></tr><tr><td><code>druid.metadata.storage.tables.taskLock</code></td><td>Used by the indexing service to store task locks.</td><td>druid_tasklocks</td></tr><tr><td><code>druid.metadata.storage.tables.supervisors</code></td><td>Used by the indexing service to store supervisor configurations.</td><td>druid_supervisors</td></tr><tr><td><code>druid.metadata.storage.tables.audit</code></td><td>The table to use for audit history of configuration changes, e.g., Coordinator rules.</td><td>druid_audit</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="deep-storage">Deep storage<a href="#deep-storage" class="hash-link" aria-label="Direct link to Deep storage" title="Direct link to Deep storage"></a></h3><p>The configurations concern how to push and pull <a href="/docs/28.0.0/design/segments">Segments</a> from deep storage.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.storage.type</code></td><td>Choices:local, noop, s3, hdfs, c*. The type of deep storage to use.</td><td>local</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="local-deep-storage">Local Deep Storage<a href="#local-deep-storage" class="hash-link" aria-label="Direct link to Local Deep Storage" title="Direct link to Local Deep Storage"></a></h4><p>Local deep storage uses the local filesystem.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.storage.storageDirectory</code></td><td>Directory on disk to use as deep storage.</td><td>/tmp/druid/localStorage</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="noop-deep-storage">Noop Deep Storage<a href="#noop-deep-storage" class="hash-link" aria-label="Direct link to Noop Deep Storage" title="Direct link to Noop Deep Storage"></a></h4><p>This deep storage doesn&#x27;t do anything. There are no configs.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="s3-deep-storage">S3 Deep Storage<a href="#s3-deep-storage" class="hash-link" aria-label="Direct link to S3 Deep Storage" title="Direct link to S3 Deep Storage"></a></h4><p>This deep storage is used to interface with Amazon&#x27;s S3. Note that the <code>druid-s3-extensions</code> extension must be loaded.
The below table shows some important configurations for S3. See <a href="/docs/28.0.0/development/extensions-core/s3">S3 Deep Storage</a> for full configurations.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.storage.bucket</code></td><td>S3 bucket name.</td><td>none</td></tr><tr><td><code>druid.storage.baseKey</code></td><td>S3 object key prefix for storage.</td><td>none</td></tr><tr><td><code>druid.storage.disableAcl</code></td><td>Boolean flag for ACL. If this is set to <code>false</code>, the full control would be granted to the bucket owner. This may require to set additional permissions. See <a href="/docs/28.0.0/development/extensions-core/s3#s3-permissions-settings">S3 permissions settings</a>.</td><td>false</td></tr><tr><td><code>druid.storage.archiveBucket</code></td><td>S3 bucket name for archiving when running the <em>archive task</em>.</td><td>none</td></tr><tr><td><code>druid.storage.archiveBaseKey</code></td><td>S3 object key prefix for archiving.</td><td>none</td></tr><tr><td><code>druid.storage.sse.type</code></td><td>Server-side encryption type. Should be one of <code>s3</code>, <code>kms</code>, and <code>custom</code>. See the below <a href="/docs/28.0.0/development/extensions-core/s3#server-side-encryption">Server-side encryption section</a> for more details.</td><td>None</td></tr><tr><td><code>druid.storage.sse.kms.keyId</code></td><td>AWS KMS key ID. This is used only when <code>druid.storage.sse.type</code> is <code>kms</code> and can be empty to use the default key ID.</td><td>None</td></tr><tr><td><code>druid.storage.sse.custom.base64EncodedKey</code></td><td>Base64-encoded key. Should be specified if <code>druid.storage.sse.type</code> is <code>custom</code>.</td><td>None</td></tr><tr><td><code>druid.storage.useS3aSchema</code></td><td>If true, use the &quot;s3a&quot; filesystem when using Hadoop-based ingestion. If false, the &quot;s3n&quot; filesystem will be used. Only affects Hadoop-based ingestion.</td><td>false</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="hdfs-deep-storage">HDFS Deep Storage<a href="#hdfs-deep-storage" class="hash-link" aria-label="Direct link to HDFS Deep Storage" title="Direct link to HDFS Deep Storage"></a></h4><p>This deep storage is used to interface with HDFS. Note that the <code>druid-hdfs-storage</code> extension must be loaded.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.storage.storageDirectory</code></td><td>HDFS directory to use as deep storage.</td><td>none</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="cassandra-deep-storage">Cassandra Deep Storage<a href="#cassandra-deep-storage" class="hash-link" aria-label="Direct link to Cassandra Deep Storage" title="Direct link to Cassandra Deep Storage"></a></h4><p>This deep storage is used to interface with Cassandra. Note that the <code>druid-cassandra-storage</code> extension must be loaded.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.storage.host</code></td><td>Cassandra host.</td><td>none</td></tr><tr><td><code>druid.storage.keyspace</code></td><td>Cassandra key space.</td><td>none</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="ingestion-security-configuration">Ingestion Security Configuration<a href="#ingestion-security-configuration" class="hash-link" aria-label="Direct link to Ingestion Security Configuration" title="Direct link to Ingestion Security Configuration"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="hdfs-input-source">HDFS input source<a href="#hdfs-input-source" class="hash-link" aria-label="Direct link to HDFS input source" title="Direct link to HDFS input source"></a></h4><p>You can set the following property to specify permissible protocols for
the <a href="/docs/28.0.0/ingestion/input-sources#hdfs-input-source">HDFS input source</a>.</p><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.ingestion.hdfs.allowedProtocols</code></td><td>List of protocols</td><td>Allowed protocols for the HDFS input source and HDFS firehose.</td><td>[&quot;hdfs&quot;]</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="http-input-source">HTTP input source<a href="#http-input-source" class="hash-link" aria-label="Direct link to HTTP input source" title="Direct link to HTTP input source"></a></h4><p>You can set the following property to specify permissible protocols for
the <a href="/docs/28.0.0/ingestion/input-sources#http-input-source">HTTP input source</a>.</p><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.ingestion.http.allowedProtocols</code></td><td>List of protocols</td><td>Allowed protocols for the HTTP input source and HTTP firehose.</td><td>[&quot;http&quot;, &quot;https&quot;]</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="external-data-access-security-configuration">External Data Access Security Configuration<a href="#external-data-access-security-configuration" class="hash-link" aria-label="Direct link to External Data Access Security Configuration" title="Direct link to External Data Access Security Configuration"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="jdbc-connections-to-external-databases">JDBC Connections to External Databases<a href="#jdbc-connections-to-external-databases" class="hash-link" aria-label="Direct link to JDBC Connections to External Databases" title="Direct link to JDBC Connections to External Databases"></a></h4><p>You can use the following properties to specify permissible JDBC options for:</p><ul><li><a href="/docs/28.0.0/ingestion/input-sources#sql-input-source">SQL input source</a></li><li><a href="/docs/28.0.0/development/extensions-core/lookups-cached-global#jdbc-lookup">globally cached JDBC lookups</a></li><li><a href="/docs/28.0.0/development/extensions-core/druid-lookups#data-fetcher-layer">JDBC Data Fetcher for per-lookup caching</a>.</li></ul><p>These properties do not apply to metadata storage connections.</p><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.access.jdbc.enforceAllowedProperties</code></td><td>Boolean</td><td>When true, Druid applies <code>druid.access.jdbc.allowedProperties</code> to JDBC connections starting with <code>jdbc:postgresql:</code>, <code>jdbc:mysql:</code>, or <code>jdbc:mariadb:</code>. When false, Druid allows any kind of JDBC connections without JDBC property validation. This config is for backward compatibility especially during upgrades since enforcing allow list can break existing ingestion jobs or lookups based on JDBC. This config is deprecated and will be removed in a future release.</td><td>true</td></tr><tr><td><code>druid.access.jdbc.allowedProperties</code></td><td>List of JDBC properties</td><td>Defines a list of allowed JDBC properties. Druid always enforces the list for all JDBC connections starting with <code>jdbc:postgresql:</code>, <code>jdbc:mysql:</code>, and <code>jdbc:mariadb:</code> if <code>druid.access.jdbc.enforceAllowedProperties</code> is set to true.<br><br>This option is tested against MySQL connector 5.1.49, MariaDB connector 2.7.4, and PostgreSQL connector 42.2.14. Other connector versions might not work.</td><td>[&quot;useSSL&quot;, &quot;requireSSL&quot;, &quot;ssl&quot;, &quot;sslmode&quot;]</td></tr><tr><td><code>druid.access.jdbc.allowUnknownJdbcUrlFormat</code></td><td>Boolean</td><td>When false, Druid only accepts JDBC connections starting with <code>jdbc:postgresql:</code> or <code>jdbc:mysql:</code>. When true, Druid allows JDBC connections to any kind of database, but only enforces <code>druid.access.jdbc.allowedProperties</code> for PostgreSQL and MySQL/MariaDB.</td><td>true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="task-logging">Task Logging<a href="#task-logging" class="hash-link" aria-label="Direct link to Task Logging" title="Direct link to Task Logging"></a></h3><p>You can use the <code>druid.indexer</code> configuration to set a <a href="#log-long-term-storage">long-term storage</a> location for task log files, and to set a <a href="#log-retention-policy">retention policy</a>.</p><p>For more information about ingestion tasks and the process of generating logs, see the <a href="/docs/28.0.0/ingestion/tasks">task reference</a>.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="log-long-term-storage">Log Long-term Storage<a href="#log-long-term-storage" class="hash-link" aria-label="Direct link to Log Long-term Storage" title="Direct link to Log Long-term Storage"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.logs.type</code></td><td>Where to store task logs. <code>noop</code>, <a href="#s3-task-logs"><code>s3</code></a>, <a href="#azure-blob-store-task-logs"><code>azure</code></a>, <a href="#google-cloud-storage-task-logs"><code>google</code></a>, <a href="#hdfs-task-logs"><code>hdfs</code></a>, <a href="#file-task-logs"><code>file</code></a></td><td><code>file</code></td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="file-task-logs">File Task Logs<a href="#file-task-logs" class="hash-link" aria-label="Direct link to File Task Logs" title="Direct link to File Task Logs"></a></h5><p>Store task logs in the local filesystem.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.logs.directory</code></td><td>Local filesystem path.</td><td>log</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="s3-task-logs">S3 Task Logs<a href="#s3-task-logs" class="hash-link" aria-label="Direct link to S3 Task Logs" title="Direct link to S3 Task Logs"></a></h5><p>Store task logs in S3. Note that the <code>druid-s3-extensions</code> extension must be loaded.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.logs.s3Bucket</code></td><td>S3 bucket name.</td><td>none</td></tr><tr><td><code>druid.indexer.logs.s3Prefix</code></td><td>S3 key prefix.</td><td>none</td></tr><tr><td><code>druid.indexer.logs.disableAcl</code></td><td>Boolean flag for ACL. If this is set to <code>false</code>, the full control would be granted to the bucket owner. If the task logs bucket is the same as the deep storage (S3) bucket, then the value of this property will need to be set to true if druid.storage.disableAcl has been set to true.</td><td>false</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="azure-blob-store-task-logs">Azure Blob Store Task Logs<a href="#azure-blob-store-task-logs" class="hash-link" aria-label="Direct link to Azure Blob Store Task Logs" title="Direct link to Azure Blob Store Task Logs"></a></h5><p>Store task logs in Azure Blob Store.</p><p>Note: The <code>druid-azure-extensions</code> extension must be loaded, and this uses the same storage account as the deep storage module for azure.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.logs.container</code></td><td>The Azure Blob Store container to write logs to</td><td>none</td></tr><tr><td><code>druid.indexer.logs.prefix</code></td><td>The path to prepend to logs</td><td>none</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="google-cloud-storage-task-logs">Google Cloud Storage Task Logs<a href="#google-cloud-storage-task-logs" class="hash-link" aria-label="Direct link to Google Cloud Storage Task Logs" title="Direct link to Google Cloud Storage Task Logs"></a></h5><p>Store task logs in Google Cloud Storage.</p><p>Note: The <code>druid-google-extensions</code> extension must be loaded, and this uses the same storage settings as the deep storage module for google.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.logs.bucket</code></td><td>The Google Cloud Storage bucket to write logs to</td><td>none</td></tr><tr><td><code>druid.indexer.logs.prefix</code></td><td>The path to prepend to logs</td><td>none</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="hdfs-task-logs">HDFS Task Logs<a href="#hdfs-task-logs" class="hash-link" aria-label="Direct link to HDFS Task Logs" title="Direct link to HDFS Task Logs"></a></h5><p>Store task logs in HDFS. Note that the <code>druid-hdfs-storage</code> extension must be loaded.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.logs.directory</code></td><td>The directory to store logs.</td><td>none</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="log-retention-policy">Log Retention Policy<a href="#log-retention-policy" class="hash-link" aria-label="Direct link to Log Retention Policy" title="Direct link to Log Retention Policy"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.logs.kill.enabled</code></td><td>Boolean value for whether to enable deletion of old task logs. If set to true, Overlord will submit kill tasks periodically based on <code>druid.indexer.logs.kill.delay</code> specified, which will delete task logs from the log directory as well as tasks and tasklogs table entries in metadata storage except for tasks created in the last <code>druid.indexer.logs.kill.durationToRetain</code> period.</td><td>false</td></tr><tr><td><code>druid.indexer.logs.kill.durationToRetain</code></td><td>Required if kill is enabled. In milliseconds, task logs and entries in task-related metadata storage tables to be retained created in last x milliseconds.</td><td>None</td></tr><tr><td><code>druid.indexer.logs.kill.initialDelay</code></td><td>Optional. Number of milliseconds after Overlord start when first auto kill is run.</td><td>random value less than 300000 (5 mins)</td></tr><tr><td><code>druid.indexer.logs.kill.delay</code></td><td>Optional. Number of milliseconds of delay between successive executions of auto kill run.</td><td>21600000 (6 hours)</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="api-error-response">API error response<a href="#api-error-response" class="hash-link" aria-label="Direct link to API error response" title="Direct link to API error response"></a></h3><p>You can configure Druid API error responses to hide internal information like the Druid class name, stack trace, thread name, servlet name, code, line/column number, host, or IP address.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.server.http.showDetailedJettyErrors</code></td><td>When set to true, any error from the Jetty layer / Jetty filter includes the following fields in the JSON response: <code>servlet</code>, <code>message</code>, <code>url</code>, <code>status</code>, and <code>cause</code>, if it exists. When set to false, the JSON response only includes <code>message</code>, <code>url</code>, and <code>status</code>. The field values remain unchanged.</td><td>true</td></tr><tr><td><code>druid.server.http.errorResponseTransform.strategy</code></td><td>Error response transform strategy. The strategy controls how Druid transforms error responses from Druid services. When unset or set to <code>none</code>, Druid leaves error responses unchanged.</td><td><code>none</code></td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="error-response-transform-strategy">Error response transform strategy<a href="#error-response-transform-strategy" class="hash-link" aria-label="Direct link to Error response transform strategy" title="Direct link to Error response transform strategy"></a></h5><p>You can use an error response transform strategy to transform error responses from within Druid services to hide internal information.
When you specify an error response transform strategy other than <code>none</code>, Druid transforms the error responses from Druid services as follows:</p><ul><li>For any query API that fails in the Router service, Druid sets the fields <code>errorClass</code> and <code>host</code> to null. Druid applies the transformation strategy to the <code>errorMessage</code> field.</li><li>For any SQL query API that fails, for example <code>POST /druid/v2/sql/...</code>, Druid sets the fields <code>errorClass</code> and <code>host</code> to null. Druid applies the transformation strategy to the <code>errorMessage</code> field.</li><li>For any JDBC related exceptions, Druid will turn all checked exceptions into <code>QueryInterruptedException</code> otherwise druid will attempt to keep the exception as the same type. For example if the original exception isn&#x27;t owned by Druid it will become <code>QueryInterruptedException</code>. Druid applies the transformation strategy to the <code>errorMessage</code> field.</li></ul><h6 class="anchor anchorWithStickyNavbar_LWe7" id="no-error-response-transform-strategy">No error response transform strategy<a href="#no-error-response-transform-strategy" class="hash-link" aria-label="Direct link to No error response transform strategy" title="Direct link to No error response transform strategy"></a></h6><p>In this mode, Druid leaves error responses from underlying services unchanged and returns the unchanged errors to the API client.
This is the default Druid error response mode. To explicitly enable this strategy, set <code>druid.server.http.errorResponseTransform.strategy</code> to &quot;none&quot;.</p><h6 class="anchor anchorWithStickyNavbar_LWe7" id="allowed-regular-expression-error-response-transform-strategy">Allowed regular expression error response transform strategy<a href="#allowed-regular-expression-error-response-transform-strategy" class="hash-link" aria-label="Direct link to Allowed regular expression error response transform strategy" title="Direct link to Allowed regular expression error response transform strategy"></a></h6><p>In this mode, Druid validates the error responses from underlying services against a list of regular expressions. Only error messages that match a configured regular expression are returned. To enable this strategy, set <code>druid.server.http.errorResponseTransform.strategy</code> to <code>allowedRegex</code>.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.server.http.errorResponseTransform.allowedRegex</code></td><td>The list of regular expressions Druid uses to validate error messages. If the error message matches any of the regular expressions, then Druid includes it in the response unchanged. If the error message does not match any of the regular expressions, Druid replaces the error message with null or with a default message depending on the type of underlying Exception.</td><td><code>[]</code></td></tr></tbody></table><p>For example, consider the following error response:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">{&quot;error&quot;:&quot;Plan validation failed&quot;,&quot;errorMessage&quot;:&quot;org.apache.calcite.runtime.CalciteContextException: From line 1, column 15 to line 1, column 38: Object &#x27;nonexistent-datasource&#x27; not found&quot;,&quot;errorClass&quot;:&quot;org.apache.calcite.tools.ValidationException&quot;,&quot;host&quot;:null}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>If <code>druid.server.http.errorResponseTransform.allowedRegex</code> is set to <code>[]</code>, Druid transforms the query error response to the following:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">{&quot;error&quot;:&quot;Plan validation failed&quot;,&quot;errorMessage&quot;:null,&quot;errorClass&quot;:null,&quot;host&quot;:null}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>On the other hand, if <code>druid.server.http.errorResponseTransform.allowedRegex</code> is set to <code>[&quot;.*CalciteContextException.*&quot;]</code> then Druid transforms the query error response to the following:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">{&quot;error&quot;:&quot;Plan validation failed&quot;,&quot;errorMessage&quot;:&quot;org.apache.calcite.runtime.CalciteContextException: From line 1, column 15 to line 1, column 38: Object &#x27;nonexistent-datasource&#x27; not found&quot;,&quot;errorClass&quot;:null,&quot;host&quot;:null}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="overlord-discovery">Overlord Discovery<a href="#overlord-discovery" class="hash-link" aria-label="Direct link to Overlord Discovery" title="Direct link to Overlord Discovery"></a></h3><p>This config is used to find the <a href="/docs/28.0.0/design/overlord">Overlord</a> using Curator service discovery. Only required if you are actually running an Overlord.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.selectors.indexing.serviceName</code></td><td>The druid.service name of the Overlord process. To start the Overlord with a different name, set it with this property.</td><td>druid/overlord</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="coordinator-discovery">Coordinator Discovery<a href="#coordinator-discovery" class="hash-link" aria-label="Direct link to Coordinator Discovery" title="Direct link to Coordinator Discovery"></a></h3><p>This config is used to find the <a href="/docs/28.0.0/design/coordinator">Coordinator</a> using Curator service discovery. This config is used by the realtime indexing processes to get information about the segments loaded in the cluster.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.selectors.coordinator.serviceName</code></td><td>The druid.service name of the Coordinator process. To start the Coordinator with a different name, set it with this property.</td><td>druid/coordinator</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="announcing-segments">Announcing Segments<a href="#announcing-segments" class="hash-link" aria-label="Direct link to Announcing Segments" title="Direct link to Announcing Segments"></a></h3><p>You can configure how to announce and unannounce Znodes in ZooKeeper (using Curator). For normal operations you do not need to override any of these configs.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="batch-data-segment-announcer">Batch Data Segment Announcer<a href="#batch-data-segment-announcer" class="hash-link" aria-label="Direct link to Batch Data Segment Announcer" title="Direct link to Batch Data Segment Announcer"></a></h5><p>In current Druid, multiple data segments may be announced under the same Znode.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.announcer.segmentsPerNode</code></td><td>Each Znode contains info for up to this many segments.</td><td>50</td></tr><tr><td><code>druid.announcer.maxBytesPerNode</code></td><td>Max byte size for Znode.</td><td>524288</td></tr><tr><td><code>druid.announcer.skipDimensionsAndMetrics</code></td><td>Skip Dimensions and Metrics list from segment announcements. NOTE: Enabling this will also remove the dimensions and metrics list from Coordinator and Broker endpoints.</td><td>false</td></tr><tr><td><code>druid.announcer.skipLoadSpec</code></td><td>Skip segment LoadSpec from segment announcements. NOTE: Enabling this will also remove the loadspec from Coordinator and Broker endpoints.</td><td>false</td></tr></tbody></table><p>If you want to turn off the batch data segment announcer, you can add a property to skip announcing segments. <strong>You do not want to enable this config if you have any services using <code>batch</code> for <code>druid.serverview.type</code></strong></p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.announcer.skipSegmentAnnouncementOnZk</code></td><td>Skip announcing segments to zookeeper. Note that the batch server view will not work if this is set to true.</td><td>false</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="javascript">JavaScript<a href="#javascript" class="hash-link" aria-label="Direct link to JavaScript" title="Direct link to JavaScript"></a></h3><p>Druid supports dynamic runtime extension through JavaScript functions. This functionality can be configured through
the following properties.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.javascript.enabled</code></td><td>Set to &quot;true&quot; to enable JavaScript functionality. This affects the JavaScript parser, filter, extractionFn, aggregator, post-aggregator, router strategy, and worker selection strategy.</td><td>false</td></tr></tbody></table><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p> JavaScript-based functionality is disabled by default. Please refer to the Druid <a href="/docs/28.0.0/development/javascript">JavaScript programming guide</a> for guidelines about using Druid&#x27;s JavaScript functionality, including instructions on how to enable it.</p></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="double-column-storage">Double Column storage<a href="#double-column-storage" class="hash-link" aria-label="Direct link to Double Column storage" title="Direct link to Double Column storage"></a></h3><p>Prior to version 0.13.0, Druid&#x27;s storage layer used a 32-bit float representation to store columns created by the
doubleSum, doubleMin, and doubleMax aggregators at indexing time.
Starting from version 0.13.0 the default will be 64-bit floats for Double columns.
Using 64-bit representation for double column will lead to avoid precision loss at the cost of doubling the storage size of such columns.
To keep the old format set the system-wide property <code>druid.indexing.doubleStorage=float</code>.
You can also use floatSum, floatMin and floatMax to use 32-bit float representation.
Support for 64-bit floating point columns was released in Druid 0.11.0, so if you use this feature then older versions of Druid will not be able to read your data segments.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexing.doubleStorage</code></td><td>Set to &quot;float&quot; to use 32-bit double representation for double columns.</td><td>double</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="sql-compatible-null-handling">SQL compatible null handling<a href="#sql-compatible-null-handling" class="hash-link" aria-label="Direct link to SQL compatible null handling" title="Direct link to SQL compatible null handling"></a></h3><p>Prior to version 0.13.0, Druid string columns treated <code>&#x27;&#x27;</code> and <code>null</code> values as interchangeable, and numeric columns were unable to represent <code>null</code> values, coercing <code>null</code> to <code>0</code>. Druid 0.13.0 introduced a mode which enabled SQL compatible null handling, allowing string columns to distinguish empty strings from nulls, and numeric columns to contain null rows.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.generic.useDefaultValueForNull</code></td><td>Set to <code>false</code> to store and query data in SQL compatible mode. When set to <code>true</code> (legacy mode), <code>null</code> values will be stored as <code>&#x27;&#x27;</code> for string columns and <code>0</code> for numeric columns.</td><td><code>false</code></td></tr><tr><td><code>druid.generic.useThreeValueLogicForNativeFilters</code></td><td>Set to <code>true</code> to use SQL compatible three-value logic when processing native Druid filters when <code>druid.generic.useDefaultValueForNull=false</code> and <code>druid.expressions.useStrictBooleans=true</code>. When set to <code>false</code> Druid uses 2 value logic for filter processing, even when <code>druid.generic.useDefaultValueForNull=false</code> and <code>druid.expressions.useStrictBooleans=true</code>. See <a href="/docs/28.0.0/querying/sql-data-types#boolean-logic">boolean handling</a> for more details</td><td><code>true</code></td></tr><tr><td><code>druid.generic.ignoreNullsForStringCardinality</code></td><td>When set to <code>true</code>, <code>null</code> values will be ignored for the built-in cardinality aggregator over string columns. Set to <code>false</code> to include <code>null</code> values while estimating cardinality of only string columns using the built-in cardinality aggregator. This setting takes effect only when <code>druid.generic.useDefaultValueForNull</code> is set to <code>true</code> and is ignored in SQL compatibility mode. Additionally, empty strings (equivalent to null) are not counted when this is set to <code>true</code>.</td><td><code>false</code></td></tr></tbody></table><p>This mode does have a storage size and query performance cost, see <a href="/docs/28.0.0/design/segments#handling-null-values">segment documentation</a> for more details.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="http-client">HTTP Client<a href="#http-client" class="hash-link" aria-label="Direct link to HTTP Client" title="Direct link to HTTP Client"></a></h3><p>All Druid components can communicate with each other over HTTP.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.global.http.numConnections</code></td><td>Size of connection pool per destination URL. If there are more HTTP requests than this number that all need to speak to the same URL, then they will queue up.</td><td><code>20</code></td></tr><tr><td><code>druid.global.http.eagerInitialization</code></td><td>Indicates that http connections should be eagerly initialized. If set to true, <code>numConnections</code> connections are created upon initialization</td><td><code>true</code></td></tr><tr><td><code>druid.global.http.compressionCodec</code></td><td>Compression codec to communicate with others. May be &quot;gzip&quot; or &quot;identity&quot;.</td><td><code>gzip</code></td></tr><tr><td><code>druid.global.http.readTimeout</code></td><td>The timeout for data reads.</td><td><code>PT15M</code></td></tr><tr><td><code>druid.global.http.unusedConnectionTimeout</code></td><td>The timeout for idle connections in connection pool. The connection in the pool will be closed after this timeout and a new one will be established. This timeout should be less than <code>druid.global.http.readTimeout</code>. Set this timeout = ~90% of <code>druid.global.http.readTimeout</code></td><td><code>PT4M</code></td></tr><tr><td><code>druid.global.http.numMaxThreads</code></td><td>Maximum number of I/O worker threads</td><td><code>max(10, ((number of cores * 17) / 16 + 2) + 30)</code></td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="common-endpoints-configuration">Common endpoints Configuration<a href="#common-endpoints-configuration" class="hash-link" aria-label="Direct link to Common endpoints Configuration" title="Direct link to Common endpoints Configuration"></a></h3><p>This section contains the configuration options for endpoints that are supported by all processes.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.server.hiddenProperties</code></td><td>If property names or substring of property names (case insensitive) is in this list, responses of the <code>/status/properties</code> endpoint do not show these properties</td><td><code>[&quot;druid.s3.accessKey&quot;,&quot;druid.s3.secretKey&quot;,&quot;druid.metadata.storage.connector.password&quot;, &quot;password&quot;, &quot;key&quot;, &quot;token&quot;, &quot;pwd&quot;]</code></td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_LWe7" id="master-server">Master Server<a href="#master-server" class="hash-link" aria-label="Direct link to Master Server" title="Direct link to Master Server"></a></h2><p>This section contains the configuration options for the processes that reside on Master servers (Coordinators and Overlords) in the suggested <a href="/docs/28.0.0/design/processes#server-types">three-server configuration</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="coordinator">Coordinator<a href="#coordinator" class="hash-link" aria-label="Direct link to Coordinator" title="Direct link to Coordinator"></a></h3><p>For general Coordinator Process information, see <a href="/docs/28.0.0/design/coordinator">here</a>.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="static-configuration">Static Configuration<a href="#static-configuration" class="hash-link" aria-label="Direct link to Static Configuration" title="Direct link to Static Configuration"></a></h4><p>These Coordinator static configurations can be defined in the <code>coordinator/runtime.properties</code> file.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="coordinator-process-config">Coordinator Process Config<a href="#coordinator-process-config" class="hash-link" aria-label="Direct link to Coordinator Process Config" title="Direct link to Coordinator Process Config"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.host</code></td><td>The host for the current process. This is used to advertise the current processes location as reachable from another process and should generally be specified such that <code>http://${druid.host}/</code> could actually talk to this process</td><td>InetAddress.getLocalHost().getCanonicalHostName()</td></tr><tr><td><code>druid.bindOnHost</code></td><td>Indicating whether the process&#x27;s internal jetty server bind on <code>druid.host</code>. Default is false, which means binding to all interfaces.</td><td>false</td></tr><tr><td><code>druid.plaintextPort</code></td><td>This is the port to actually listen on; unless port mapping is used, this will be the same port as is on <code>druid.host</code></td><td>8081</td></tr><tr><td><code>druid.tlsPort</code></td><td>TLS port for HTTPS connector, if <a href="/docs/28.0.0/operations/tls-support">druid.enableTlsPort</a> is set then this config will be used. If <code>druid.host</code> contains port then that port will be ignored. This should be a non-negative Integer.</td><td>8281</td></tr><tr><td><code>druid.service</code></td><td>The name of the service. This is used as a dimension when emitting metrics and alerts to differentiate between the various services</td><td>druid/coordinator</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="coordinator-operation">Coordinator Operation<a href="#coordinator-operation" class="hash-link" aria-label="Direct link to Coordinator Operation" title="Direct link to Coordinator Operation"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.coordinator.period</code></td><td>The run period for the Coordinator. The Coordinator operates by maintaining the current state of the world in memory and periodically looking at the set of &quot;used&quot; segments and segments being served to make decisions about whether any changes need to be made to the data topology. This property sets the delay between each of these runs.</td><td>PT60S</td></tr><tr><td><code>druid.coordinator.period.indexingPeriod</code></td><td>How often to send compact/merge/conversion tasks to the indexing service. It&#x27;s recommended to be longer than <code>druid.manager.segments.pollDuration</code></td><td>PT1800S (30 mins)</td></tr><tr><td><code>druid.coordinator.startDelay</code></td><td>The operation of the Coordinator works on the assumption that it has an up-to-date view of the state of the world when it runs, the current ZK interaction code, however, is written in a way that doesn’t allow the Coordinator to know for a fact that it’s done loading the current state of the world. This delay is a hack to give it enough time to believe that it has all the data.</td><td>PT300S</td></tr><tr><td><code>druid.coordinator.load.timeout</code></td><td>The timeout duration for when the Coordinator assigns a segment to a Historical process.</td><td>PT15M</td></tr><tr><td><code>druid.coordinator.kill.pendingSegments.on</code></td><td>Boolean flag for whether or not the Coordinator clean up old entries in the <code>pendingSegments</code> table of metadata store. If set to true, Coordinator will check the created time of most recently complete task. If it doesn&#x27;t exist, it finds the created time of the earliest running/pending/waiting tasks. Once the created time is found, then for all dataSources not in the <code>killPendingSegmentsSkipList</code> (see <a href="#dynamic-configuration">Dynamic configuration</a>), Coordinator will ask the Overlord to clean up the entries 1 day or more older than the found created time in the <code>pendingSegments</code> table. This will be done periodically based on <code>druid.coordinator.period.indexingPeriod</code> specified.</td><td>true</td></tr><tr><td><code>druid.coordinator.kill.on</code></td><td>Boolean flag for whether or not the Coordinator should submit kill task for unused segments, that is, permanently delete them from metadata store and deep storage. If set to true, then for all whitelisted dataSources (or optionally all), Coordinator will submit tasks periodically based on <code>period</code> specified. A whitelist can be set via dynamic configuration <code>killDataSourceWhitelist</code> described later.<br><br>When <code>druid.coordinator.kill.on</code> is true, segments are eligible for permanent deletion once their data intervals are older than <code>druid.coordinator.kill.durationToRetain</code> relative to the current time. If a segment&#x27;s data interval is older than this threshold at the time it is marked unused, it is eligible for permanent deletion immediately after being marked unused.</td><td>false</td></tr><tr><td><code>druid.coordinator.kill.period</code></td><td>The frequency of sending kill tasks to the indexing service. The value must be greater than or equal to <code>druid.coordinator.period.indexingPeriod</code>. Only applies if kill is turned on.</td><td>P1D (1 day)</td></tr><tr><td><code>druid.coordinator.kill.durationToRetain</code></td><td>Only applies if you set <code>druid.coordinator.kill.on</code> to <code>true</code>. This value is ignored if <code>druid.coordinator.kill.ignoreDurationToRetain</code> is <code>true</code>. Valid configurations must be a ISO8601 period. Druid will not kill unused segments whose interval end date is beyond <code>now - durationToRetain</code>. <code>durationToRetain</code> can be a negative ISO8601 period, which would result in <code>now - durationToRetain</code> to be in the future.<br><br>Note that the <code>durationToRetain</code> parameter applies to the segment interval, not the time that the segment was last marked unused. For example, if <code>durationToRetain</code> is set to <code>P90D</code>, then a segment for a time chunk 90 days in the past is eligible for permanent deletion immediately after being marked unused.</td><td><code>P90D</code></td></tr><tr><td><code>druid.coordinator.kill.ignoreDurationToRetain</code></td><td>A way to override <code>druid.coordinator.kill.durationToRetain</code> and tell the coordinator that you do not care about the end date of unused segment intervals when it comes to killing them. If true, the coordinator considers all unused segments as eligible to be killed.</td><td>false</td></tr><tr><td><code>druid.coordinator.kill.bufferPeriod</code></td><td>The amount of time that a segment must be unused before it is able to be permanently removed from metadata and deep storage. This can serve as a buffer period to prevent data loss if data ends up being needed after being marked unused.</td><td><code>P30D</code></td></tr><tr><td><code>druid.coordinator.kill.maxSegments</code></td><td>The number of unused segments to kill per kill task. This number must be greater than 0. This only applies when <code>druid.coordinator.kill.on=true</code>.</td><td>100</td></tr><tr><td><code>druid.coordinator.balancer.strategy</code></td><td>Specify the type of balancing strategy for the coordinator to use to distribute segments among the historicals. <code>cachingCost</code> is logically equivalent to <code>cost</code> but is more CPU-efficient on large clusters. <code>diskNormalized</code> weights the costs according to the servers&#x27; disk usage ratios - there are known issues with this strategy distributing segments unevenly across the cluster. <code>random</code> distributes segments among services randomly.</td><td><code>cost</code></td></tr><tr><td><code>druid.coordinator.balancer.cachingCost.awaitInitialization</code></td><td>Whether to wait for segment view initialization before creating the <code>cachingCost</code> balancing strategy. This property is enabled only when <code>druid.coordinator.balancer.strategy</code> is <code>cachingCost</code>. If set to &#x27;true&#x27;, the Coordinator will not start to assign segments, until the segment view is initialized. If set to &#x27;false&#x27;, the Coordinator will fallback to use the <code>cost</code> balancing strategy only if the segment view is not initialized yet. Notes, it may take much time to wait for the initialization since the <code>cachingCost</code> balancing strategy involves much computing to build itself.</td><td>false</td></tr><tr><td><code>druid.coordinator.loadqueuepeon.repeatDelay</code></td><td>The start and repeat delay for the loadqueuepeon, which manages the load and drop of segments.</td><td>PT0.050S (50 ms)</td></tr><tr><td><code>druid.coordinator.asOverlord.enabled</code></td><td>Boolean value for whether this Coordinator process should act like an Overlord as well. This configuration allows users to simplify a druid cluster by not having to deploy any standalone Overlord processes. If set to true, then Overlord console is available at <code>http://coordinator-host:port/console.html</code> and be sure to set <code>druid.coordinator.asOverlord.overlordService</code> also. See next.</td><td>false</td></tr><tr><td><code>druid.coordinator.asOverlord.overlordService</code></td><td>Required, if <code>druid.coordinator.asOverlord.enabled</code> is <code>true</code>. This must be same value as <code>druid.service</code> on standalone Overlord processes and <code>druid.selectors.indexing.serviceName</code> on Middle Managers.</td><td>NULL</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="metadata-management">Metadata Management<a href="#metadata-management" class="hash-link" aria-label="Direct link to Metadata Management" title="Direct link to Metadata Management"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Required</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.coordinator.period.metadataStoreManagementPeriod</code></td><td>How often to run metadata management tasks in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format.</td><td>No</td><td><code>PT1H</code></td></tr><tr><td><code>druid.coordinator.kill.supervisor.on</code></td><td>Boolean value for whether to enable automatic deletion of terminated supervisors. If set to true, Coordinator will periodically remove terminated supervisors from the supervisor table in metadata storage.</td><td>No</td><td>True</td></tr><tr><td><code>druid.coordinator.kill.supervisor.period</code></td><td>How often to do automatic deletion of terminated supervisor in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Value must be equal to or greater than <code>druid.coordinator.period.metadataStoreManagementPeriod</code>. Only applies if <code>druid.coordinator.kill.supervisor.on</code> is set to &quot;True&quot;.</td><td>No</td><td><code>P1D</code></td></tr><tr><td><code>druid.coordinator.kill.supervisor.durationToRetain</code></td><td>Duration of terminated supervisor to be retained from created time in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Only applies if <code>druid.coordinator.kill.supervisor.on</code> is set to &quot;True&quot;.</td><td>Yes if <code>druid.coordinator.kill.supervisor.on</code> is set to &quot;True&quot;.</td><td><code>P90D</code></td></tr><tr><td><code>druid.coordinator.kill.audit.on</code></td><td>Boolean value for whether to enable automatic deletion of audit logs. If set to true, Coordinator will periodically remove audit logs from the audit table entries in metadata storage.</td><td>No</td><td>True</td></tr><tr><td><code>druid.coordinator.kill.audit.period</code></td><td>How often to do automatic deletion of audit logs in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Value must be equal to or greater than <code>druid.coordinator.period.metadataStoreManagementPeriod</code>. Only applies if <code>druid.coordinator.kill.audit.on</code> is set to &quot;True&quot;.</td><td>No</td><td><code>P1D</code></td></tr><tr><td><code>druid.coordinator.kill.audit.durationToRetain</code></td><td>Duration of audit logs to be retained from created time in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Only applies if <code>druid.coordinator.kill.audit.on</code> is set to &quot;True&quot;.</td><td>Yes if <code>druid.coordinator.kill.audit.on</code> is set to &quot;True&quot;.</td><td><code>P90D</code></td></tr><tr><td><code>druid.coordinator.kill.compaction.on</code></td><td>Boolean value for whether to enable automatic deletion of compaction configurations. If set to true, Coordinator will periodically remove compaction configuration of inactive datasource (datasource with no used and unused segments) from the config table in metadata storage.</td><td>No</td><td>False</td></tr><tr><td><code>druid.coordinator.kill.compaction.period</code></td><td>How often to do automatic deletion of compaction configurations in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Value must be equal to or greater than <code>druid.coordinator.period.metadataStoreManagementPeriod</code>. Only applies if <code>druid.coordinator.kill.compaction.on</code> is set to &quot;True&quot;.</td><td>No</td><td><code>P1D</code></td></tr><tr><td><code>druid.coordinator.kill.rule.on</code></td><td>Boolean value for whether to enable automatic deletion of rules. If set to true, Coordinator will periodically remove rules of inactive datasource (datasource with no used and unused segments) from the rule table in metadata storage.</td><td>No</td><td>True</td></tr><tr><td><code>druid.coordinator.kill.rule.period</code></td><td>How often to do automatic deletion of rules in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Value must be equal to or greater than <code>druid.coordinator.period.metadataStoreManagementPeriod</code>. Only applies if <code>druid.coordinator.kill.rule.on</code> is set to &quot;True&quot;.</td><td>No</td><td><code>P1D</code></td></tr><tr><td><code>druid.coordinator.kill.rule.durationToRetain</code></td><td>Duration of rules to be retained from created time in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Only applies if <code>druid.coordinator.kill.rule.on</code> is set to &quot;True&quot;.</td><td>Yes if <code>druid.coordinator.kill.rule.on</code> is set to &quot;True&quot;.</td><td><code>P90D</code></td></tr><tr><td><code>druid.coordinator.kill.datasource.on</code></td><td>Boolean value for whether to enable automatic deletion of datasource metadata (Note: datasource metadata only exists for datasource created from supervisor). If set to true, Coordinator will periodically remove datasource metadata of terminated supervisor from the datasource table in metadata storage.</td><td>No</td><td>True</td></tr><tr><td><code>druid.coordinator.kill.datasource.period</code></td><td>How often to do automatic deletion of datasource metadata in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Value must be equal to or greater than <code>druid.coordinator.period.metadataStoreManagementPeriod</code>. Only applies if <code>druid.coordinator.kill.datasource.on</code> is set to &quot;True&quot;.</td><td>No</td><td><code>P1D</code></td></tr><tr><td><code>druid.coordinator.kill.datasource.durationToRetain</code></td><td>Duration of datasource metadata to be retained from created time in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Only applies if <code>druid.coordinator.kill.datasource.on</code> is set to &quot;True&quot;.</td><td>Yes if <code>druid.coordinator.kill.datasource.on</code> is set to &quot;True&quot;.</td><td><code>P90D</code></td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="segment-management">Segment Management<a href="#segment-management" class="hash-link" aria-label="Direct link to Segment Management" title="Direct link to Segment Management"></a></h5><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.serverview.type</code></td><td>batch or http</td><td>Segment discovery method to use. &quot;http&quot; enables discovering segments using HTTP instead of ZooKeeper.</td><td>http</td></tr><tr><td><code>druid.coordinator.loadqueuepeon.type</code></td><td>curator or http</td><td>Implementation to use to assign segment loads and drops to historicals. Curator-based implementation is now deprecated, so you should transition to using HTTP-based segment assignments.</td><td>http</td></tr><tr><td><code>druid.coordinator.segment.awaitInitializationOnStart</code></td><td>true or false</td><td>Whether the Coordinator will wait for its view of segments to fully initialize before starting up. If set to &#x27;true&#x27;, the Coordinator&#x27;s HTTP server will not start up, and the Coordinator will not announce itself as available, until the server view is initialized.</td><td>true</td></tr></tbody></table><h6 class="anchor anchorWithStickyNavbar_LWe7" id="additional-config-when-http-loadqueuepeon-is-used">Additional config when &quot;http&quot; loadqueuepeon is used<a href="#additional-config-when-http-loadqueuepeon-is-used" class="hash-link" aria-label="Direct link to Additional config when &quot;http&quot; loadqueuepeon is used" title="Direct link to Additional config when &quot;http&quot; loadqueuepeon is used"></a></h6><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.coordinator.loadqueuepeon.http.batchSize</code></td><td>Number of segment load/drop requests to batch in one HTTP request. Note that it must be smaller than <code>druid.segmentCache.numLoadingThreads</code> config on Historical process.</td><td>1</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="metadata-retrieval">Metadata Retrieval<a href="#metadata-retrieval" class="hash-link" aria-label="Direct link to Metadata Retrieval" title="Direct link to Metadata Retrieval"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.manager.config.pollDuration</code></td><td>How often the manager polls the config table for updates.</td><td>PT1M</td></tr><tr><td><code>druid.manager.segments.pollDuration</code></td><td>The duration between polls the Coordinator does for updates to the set of active segments. Generally defines the amount of lag time it can take for the Coordinator to notice new segments.</td><td>PT1M</td></tr><tr><td><code>druid.manager.rules.pollDuration</code></td><td>The duration between polls the Coordinator does for updates to the set of active rules. Generally defines the amount of lag time it can take for the Coordinator to notice rules.</td><td>PT1M</td></tr><tr><td><code>druid.manager.rules.defaultRule</code></td><td>The default rule for the cluster</td><td>_default</td></tr><tr><td><code>druid.manager.rules.alertThreshold</code></td><td>The duration after a failed poll upon which an alert should be emitted.</td><td>PT10M</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="dynamic-configuration">Dynamic Configuration<a href="#dynamic-configuration" class="hash-link" aria-label="Direct link to Dynamic Configuration" title="Direct link to Dynamic Configuration"></a></h4><p>The Coordinator has dynamic configurations to tune certain behavior on the fly, without requiring a service restart.</p><p>It is recommended that you use the <a href="/docs/28.0.0/operations/web-console">web console</a> to configure these parameters.
However, if you need to do it via HTTP, the JSON object can be submitted to the Coordinator via a POST request at:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">http://&lt;COORDINATOR_IP&gt;:&lt;PORT&gt;/druid/coordinator/v1/config</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Optional Header Parameters for auditing the config change can also be specified.</p><table><thead><tr><th>Header Param Name</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>X-Druid-Author</code></td><td>author making the config change</td><td>&quot;&quot;</td></tr><tr><td><code>X-Druid-Comment</code></td><td>comment describing the change being done</td><td>&quot;&quot;</td></tr></tbody></table><p>A sample Coordinator dynamic config JSON object is shown below:</p><div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;millisToWaitBeforeDeleting&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">900000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;mergeBytesLimit&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">100000000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;mergeSegmentsLimit&quot;</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">1000</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;maxSegmentsToMove&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">5</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;replicantLifetime&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">15</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;replicationThrottleLimit&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">10</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;killDataSourceWhitelist&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">&quot;wikipedia&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;testDatasource&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;killTaskSlotRatio&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">0.10</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;maxKillTaskSlots&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">5</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;decommissioningNodes&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">&quot;localhost:8182&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;localhost:8282&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;pauseCoordination&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;replicateAfterLoadTimeout&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Issuing a GET request at the same URL will return the spec that is currently in place. A description of the config setup spec is shown below.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>millisToWaitBeforeDeleting</code></td><td>How long does the Coordinator need to be a leader before it can start marking overshadowed segments as unused in metadata storage.</td><td>900000 (15 mins)</td></tr><tr><td><code>mergeBytesLimit</code></td><td>The maximum total uncompressed size in bytes of segments to merge.</td><td>524288000L</td></tr><tr><td><code>mergeSegmentsLimit</code></td><td>The maximum number of segments that can be in a single <a href="/docs/28.0.0/ingestion/tasks">append task</a>.</td><td>100</td></tr><tr><td><code>smartSegmentLoading</code></td><td>Enables <a href="#smart-segment-loading">&quot;smart&quot; segment loading mode</a> which dynamically computes the optimal values of several properties that maximize Coordinator performance.</td><td>true</td></tr><tr><td><code>maxSegmentsToMove</code></td><td>The maximum number of segments that can be moved in a Historical tier at any given time.</td><td>100</td></tr><tr><td><code>replicantLifetime</code></td><td>The maximum number of Coordinator runs for which a segment can wait in the load queue of a Historical before Druid raises an alert.</td><td>15</td></tr><tr><td><code>replicationThrottleLimit</code></td><td>The maximum number of segment replicas that can be assigned to a historical tier in a single Coordinator run. This property prevents historicals from becoming overwhelmed when loading extra replicas of segments that are already available in the cluster.</td><td>500</td></tr><tr><td><code>balancerComputeThreads</code></td><td>Thread pool size for computing moving cost of segments during segment balancing. Consider increasing this if you have a lot of segments and moving segments begins to stall.</td><td><code>num_cores</code> / 2</td></tr><tr><td><code>killDataSourceWhitelist</code></td><td>List of specific data sources for which kill tasks are sent if property <code>druid.coordinator.kill.on</code> is true. This can be a list of comma-separated data source names or a JSON array.</td><td>none</td></tr><tr><td><code>killTaskSlotRatio</code></td><td>Ratio of total available task slots, including autoscaling if applicable that will be allowed for kill tasks. This limit only applies for kill tasks that are spawned automatically by the coordinator&#x27;s auto kill duty, which is enabled when <code>druid.coordinator.kill.on</code> is true.</td><td>1 - all task slots can be used</td></tr><tr><td><code>maxKillTaskSlots</code></td><td>Maximum number of tasks that will be allowed for kill tasks. This limit only applies for kill tasks that are spawned automatically by the coordinator&#x27;s auto kill duty, which is enabled when <code>druid.coordinator.kill.on</code> is true.</td><td><code>Integer.MAX_VALUE</code> - no limit</td></tr><tr><td><code>killPendingSegmentsSkipList</code></td><td>List of data sources for which pendingSegments are <em>NOT</em> cleaned up if property <code>druid.coordinator.kill.pendingSegments.on</code> is true. This can be a list of comma-separated data sources or a JSON array.</td><td>none</td></tr><tr><td><code>maxSegmentsInNodeLoadingQueue</code></td><td>The maximum number of segments allowed in the load queue of any given server. Use this parameter to load segments faster if, for example, the cluster contains slow-loading nodes or if there are too many segments to be replicated to a particular node (when faster loading is preferred to better segments distribution). The optimal value depends on the loading speed of segments, acceptable replication time and number of nodes.</td><td>500</td></tr><tr><td><code>useRoundRobinSegmentAssignment</code></td><td>Boolean flag for whether segments should be assigned to historicals in a round robin fashion. When disabled, segment assignment is done using the chosen balancer strategy. When enabled, this can speed up segment assignments leaving balancing to move the segments to their optimal locations (based on the balancer strategy) lazily.</td><td>true</td></tr><tr><td><code>decommissioningNodes</code></td><td>List of historical servers to &#x27;decommission&#x27;. Coordinator will not assign new segments to &#x27;decommissioning&#x27; servers, and segments will be moved away from them to be placed on non-decommissioning servers at the maximum rate specified by <code>maxSegmentsToMove</code>.</td><td>none</td></tr><tr><td><code>pauseCoordination</code></td><td>Boolean flag for whether or not the coordinator should execute its various duties of coordinating the cluster. Setting this to true essentially pauses all coordination work while allowing the API to remain up. Duties that are paused include all classes that implement the <code>CoordinatorDuty</code> Interface. Such duties include: Segment balancing, Segment compaction, Submitting kill tasks for unused segments (if enabled), Logging of used segments in the cluster, Marking of newly unused or overshadowed segments, Matching and execution of load/drop rules for used segments, Unloading segments that are no longer marked as used from Historical servers. An example of when an admin may want to pause coordination would be if they are doing deep storage maintenance on HDFS Name Nodes with downtime and don&#x27;t want the coordinator to be directing Historical Nodes to hit the Name Node with API requests until maintenance is done and the deep store is declared healthy for use again.</td><td>false</td></tr><tr><td><code>replicateAfterLoadTimeout</code></td><td>Boolean flag for whether or not additional replication is needed for segments that have failed to load due to the expiry of <code>druid.coordinator.load.timeout</code>. If this is set to true, the coordinator will attempt to replicate the failed segment on a different historical server. This helps improve the segment availability if there are a few slow historicals in the cluster. However, the slow historical may still load the segment later and the coordinator may issue drop requests if the segment is over-replicated.</td><td>false</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="smart-segment-loading">Smart segment loading<a href="#smart-segment-loading" class="hash-link" aria-label="Direct link to Smart segment loading" title="Direct link to Smart segment loading"></a></h5><p>The <code>smartSegmentLoading</code> mode simplifies Coordinator configuration for segment loading and balancing.
If you enable this mode, do not provide values for the properties in the table below as the Coordinator computes them automatically.
Druid computes the values to optimize Coordinator performance, based on the current state of the cluster.</p><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p> If you enable <code>smartSegmentLoading</code> mode, Druid ignores any value you provide for the following properties.</p></div></div><table><thead><tr><th>Property</th><th>Computed value</th><th>Description</th></tr></thead><tbody><tr><td><code>useRoundRobinSegmentAssignment</code></td><td>true</td><td>Speeds up segment assignment.</td></tr><tr><td><code>maxSegmentsInNodeLoadingQueue</code></td><td>0</td><td>Removes the limit on load queue size.</td></tr><tr><td><code>replicationThrottleLimit</code></td><td>5% of used segments, minimum value 100</td><td>Prevents aggressive replication when a historical disappears only intermittently.</td></tr><tr><td><code>replicantLifetime</code></td><td>60</td><td>Allows segments to wait about an hour (assuming a Coordinator period of 1 minute) in the load queue before an alert is raised. In <code>smartSegmentLoading</code> mode, load queues are not limited by size. Segments might therefore assigned to a load queue even if the corresponding server is slow to load them.</td></tr><tr><td><code>maxSegmentsToMove</code></td><td>2% of used segments, minimum value 100, maximum value 1000</td><td>Ensures that some segments are always moving in the cluster to keep it well balanced. The maximum value keeps the Coordinator run times bounded.</td></tr><tr><td><code>balancerComputeThreads</code></td><td><code>num_cores</code> / 2</td><td>Ensures that there are enough threads to perform balancing computations without hogging all Coordinator resources.</td></tr></tbody></table><p>When <code>smartSegmentLoading</code> is disabled, Druid uses the configured values of these properties.
Disable <code>smartSegmentLoading</code> only if you want to explicitly set the values of any of the above properties.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="audit-history">Audit history<a href="#audit-history" class="hash-link" aria-label="Direct link to Audit history" title="Direct link to Audit history"></a></h5><p>To view the audit history of Coordinator dynamic config issue a GET request to the URL -</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">http://&lt;COORDINATOR_IP&gt;:&lt;PORT&gt;/druid/coordinator/v1/config/history?interval=&lt;interval&gt;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>default value of interval can be specified by setting <code>druid.audit.manager.auditHistoryMillis</code> (1 week if not configured) in Coordinator runtime.properties</p><p>To view last <code>n</code> entries of the audit history of Coordinator dynamic config issue a GET request to the URL -</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">http://&lt;COORDINATOR_IP&gt;:&lt;PORT&gt;/druid/coordinator/v1/config/history?count=&lt;n&gt;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h5 class="anchor anchorWithStickyNavbar_LWe7" id="lookups-dynamic-configuration">Lookups Dynamic Configuration<a href="#lookups-dynamic-configuration" class="hash-link" aria-label="Direct link to Lookups Dynamic Configuration" title="Direct link to Lookups Dynamic Configuration"></a></h5><p>These configuration options control Coordinator lookup management. See <a href="/docs/28.0.0/querying/lookups#dynamic-configuration">dynamic configuration for lookups</a> configurations that affect lookup propagation.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.manager.lookups.hostDeleteTimeout</code></td><td>How long to wait for a <code>DELETE</code> request to a particular process before considering the <code>DELETE</code> a failure</td><td>PT1S</td></tr><tr><td><code>druid.manager.lookups.hostUpdateTimeout</code></td><td>How long to wait for a <code>POST</code> request to a particular process before considering the <code>POST</code> a failure</td><td>PT10S</td></tr><tr><td><code>druid.manager.lookups.deleteAllTimeout</code></td><td>How long to wait for all <code>DELETE</code> requests to finish before considering the delete attempt a failure</td><td>PT10S</td></tr><tr><td><code>druid.manager.lookups.updateAllTimeout</code></td><td>How long to wait for all <code>POST</code> requests to finish before considering the attempt a failure</td><td>PT60S</td></tr><tr><td><code>druid.manager.lookups.threadPoolSize</code></td><td>How many processes can be managed concurrently (concurrent POST and DELETE requests). Requests this limit will wait in a queue until a slot becomes available.</td><td>10</td></tr><tr><td><code>druid.manager.lookups.period</code></td><td>Number of milliseconds between checks for configuration changes</td><td>120000 (2 minutes)</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="automatic-compaction-dynamic-configuration">Automatic compaction dynamic configuration<a href="#automatic-compaction-dynamic-configuration" class="hash-link" aria-label="Direct link to Automatic compaction dynamic configuration" title="Direct link to Automatic compaction dynamic configuration"></a></h5><p>You can set or update <a href="/docs/28.0.0/data-management/automatic-compaction">automatic compaction</a> properties dynamically using the
<a href="/docs/28.0.0/api-reference/automatic-compaction-api">Automatic compaction API</a> without restarting Coordinators.</p><p>For details about segment compaction, see <a href="/docs/28.0.0/operations/segment-optimization">Segment size optimization</a>.</p><p>You can configure automatic compaction through the following properties:</p><table><thead><tr><th>Property</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>dataSource</code></td><td>dataSource name to be compacted.</td><td>yes</td></tr><tr><td><code>taskPriority</code></td><td><a href="/docs/28.0.0/ingestion/tasks#priority">Priority</a> of compaction task.</td><td>no (default = 25)</td></tr><tr><td><code>inputSegmentSizeBytes</code></td><td>Maximum number of total segment bytes processed per compaction task. Since a time chunk must be processed in its entirety, if the segments for a particular time chunk have a total size in bytes greater than this parameter, compaction will not run for that time chunk.</td><td>no (default = 100,000,000,000,000 i.e. 100TB)</td></tr><tr><td><code>skipOffsetFromLatest</code></td><td>The offset for searching segments to be compacted in <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank" rel="noopener noreferrer">ISO 8601</a> duration format. Strongly recommended to set for realtime dataSources. See <a href="/docs/28.0.0/data-management/compaction#data-handling-with-compaction">Data handling with compaction</a>.</td><td>no (default = &quot;P1D&quot;)</td></tr><tr><td><code>tuningConfig</code></td><td>Tuning config for compaction tasks. See below <a href="#automatic-compaction-tuningconfig">Automatic compaction tuningConfig</a>.</td><td>no</td></tr><tr><td><code>taskContext</code></td><td><a href="/docs/28.0.0/ingestion/tasks#context">Task context</a> for compaction tasks.</td><td>no</td></tr><tr><td><code>granularitySpec</code></td><td>Custom <code>granularitySpec</code>. See <a href="#automatic-compaction-granularityspec">Automatic compaction granularitySpec</a>.</td><td>No</td></tr><tr><td><code>dimensionsSpec</code></td><td>Custom <code>dimensionsSpec</code>. See <a href="#automatic-compaction-dimensionsspec">Automatic compaction dimensionsSpec</a>.</td><td>No</td></tr><tr><td><code>transformSpec</code></td><td>Custom <code>transformSpec</code>. See <a href="#automatic-compaction-transformspec">Automatic compaction transformSpec</a>.</td><td>No</td></tr><tr><td><code>metricsSpec</code></td><td>Custom <a href="/docs/28.0.0/ingestion/ingestion-spec#metricsspec"><code>metricsSpec</code></a>. The compaction task preserves any existing metrics regardless of whether <code>metricsSpec</code> is specified. If <code>metricsSpec</code> is specified, Druid does not reapply any aggregators matching the metric names specified in <code>metricsSpec</code> to rows that already have the associated metrics. For rows that do not already have the metric specified in <code>metricsSpec</code>, Druid applies the metric aggregator on the source column, then proceeds to combine the metrics across segments as usual. If <code>metricsSpec</code> is not specified, Druid automatically discovers the metrics in the existing segments and combines existing metrics with the same metric name across segments. Aggregators for metrics with the same name are assumed to be compatible for combining across segments, otherwise the compaction task may fail.</td><td>No</td></tr><tr><td><code>ioConfig</code></td><td>IO config for compaction tasks. See <a href="#automatic-compaction-ioconfig">Automatic compaction ioConfig</a>.</td><td>no</td></tr></tbody></table><p>Automatic compaction config example:</p><div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;dataSource&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;wikiticker&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;granularitySpec&quot;</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;segmentGranularity&quot;</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;none&quot;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Compaction tasks fail when higher priority tasks cause Druid to revoke their locks. By default, realtime tasks like ingestion have a higher priority than compaction tasks. Frequent conflicts between compaction tasks and realtime tasks can cause the Coordinator&#x27;s automatic compaction to hang.
You may see this issue with streaming ingestion from Kafka and Kinesis, which ingest late-arriving data.</p><p>To mitigate this problem, set <code>skipOffsetFromLatest</code> to a value large enough so that arriving data tends to fall outside the offset value from the current time. This way you can avoid conflicts between compaction tasks and realtime ingestion tasks.
For example, if you want to skip over segments from thirty days prior to the end time of the most recent segment, assign <code>&quot;skipOffsetFromLatest&quot;: &quot;P30D&quot;</code>.
For more information, see <a href="/docs/28.0.0/data-management/automatic-compaction#avoid-conflicts-with-ingestion">Avoid conflicts with ingestion</a>.</p><h6 class="anchor anchorWithStickyNavbar_LWe7" id="automatic-compaction-tuningconfig">Automatic compaction tuningConfig<a href="#automatic-compaction-tuningconfig" class="hash-link" aria-label="Direct link to Automatic compaction tuningConfig" title="Direct link to Automatic compaction tuningConfig"></a></h6><p>Auto-compaction supports a subset of the <a href="/docs/28.0.0/ingestion/native-batch#tuningconfig">tuningConfig for Parallel task</a>.
The below is a list of the supported configurations for auto-compaction.</p><table><thead><tr><th>Property</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>type</td><td>The task type, this should always be <code>index_parallel</code>.</td><td>yes</td></tr><tr><td><code>maxRowsInMemory</code></td><td>Used in determining when intermediate persists to disk should occur. Normally user does not need to set this, but depending on the nature of data, if rows are short in terms of bytes, user may not want to store a million rows in memory and this value should be set.</td><td>no (default = 1000000)</td></tr><tr><td><code>maxBytesInMemory</code></td><td>Used in determining when intermediate persists to disk should occur. Normally this is computed internally and user does not need to set it. This value represents number of bytes to aggregate in heap memory before persisting. This is based on a rough estimate of memory usage and not actual usage. The maximum heap memory usage for indexing is <code>maxBytesInMemory</code> * (2 + <code>maxPendingPersists</code>)</td><td>no (default = 1/6 of max JVM memory)</td></tr><tr><td><code>splitHintSpec</code></td><td>Used to give a hint to control the amount of data that each first phase task reads. This hint could be ignored depending on the implementation of the input source. See <a href="/docs/28.0.0/ingestion/native-batch#split-hint-spec">Split hint spec</a> for more details.</td><td>no (default = size-based split hint spec)</td></tr><tr><td><code>partitionsSpec</code></td><td>Defines how to partition data in each time chunk, see <a href="/docs/28.0.0/ingestion/native-batch#partitionsspec"><code>PartitionsSpec</code></a></td><td>no (default = <code>dynamic</code>)</td></tr><tr><td><code>indexSpec</code></td><td>Defines segment storage format options to be used at indexing time, see <a href="/docs/28.0.0/ingestion/ingestion-spec#indexspec">IndexSpec</a></td><td>no</td></tr><tr><td><code>indexSpecForIntermediatePersists</code></td><td>Defines segment storage format options to be used at indexing time for intermediate persisted temporary segments. this can be used to disable dimension/metric compression on intermediate segments to reduce memory required for final merging. however, disabling compression on intermediate segments might increase page cache use while they are used before getting merged into final segment published, see <a href="/docs/28.0.0/ingestion/ingestion-spec#indexspec">IndexSpec</a> for possible values.</td><td>no</td></tr><tr><td><code>maxPendingPersists</code></td><td>Maximum number of persists that can be pending but not started. If this limit would be exceeded by a new intermediate persist, ingestion will block until the currently-running persist finishes. Maximum heap memory usage for indexing scales with <code>maxRowsInMemory</code> * (2 + <code>maxPendingPersists</code>).</td><td>no (default = 0, meaning one persist can be running concurrently with ingestion, and none can be queued up)</td></tr><tr><td><code>pushTimeout</code></td><td>Milliseconds to wait for pushing segments. It must be &gt;= 0, where 0 means to wait forever.</td><td>no (default = 0)</td></tr><tr><td><code>segmentWriteOutMediumFactory</code></td><td>Segment write-out medium to use when creating segments. See <a href="/docs/28.0.0/ingestion/native-batch#segmentwriteoutmediumfactory">SegmentWriteOutMediumFactory</a>.</td><td>no (default is the value from <code>druid.peon.defaultSegmentWriteOutMediumFactory.type</code> is used)</td></tr><tr><td><code>maxNumConcurrentSubTasks</code></td><td>Maximum number of worker tasks which can be run in parallel at the same time. The supervisor task would spawn worker tasks up to <code>maxNumConcurrentSubTasks</code> regardless of the current available task slots. If this value is set to 1, the supervisor task processes data ingestion on its own instead of spawning worker tasks. If this value is set to too large, too many worker tasks can be created which might block other ingestion. Check <a href="/docs/28.0.0/ingestion/native-batch#capacity-planning">Capacity Planning</a> for more details.</td><td>no (default = 1)</td></tr><tr><td><code>maxRetry</code></td><td>Maximum number of retries on task failures.</td><td>no (default = 3)</td></tr><tr><td><code>maxNumSegmentsToMerge</code></td><td>Max limit for the number of segments that a single task can merge at the same time in the second phase. Used only with <code>hashed</code> or <code>single_dim</code> partitionsSpec.</td><td>no (default = 100)</td></tr><tr><td><code>totalNumMergeTasks</code></td><td>Total number of tasks to merge segments in the merge phase when <code>partitionsSpec</code> is set to <code>hashed</code> or <code>single_dim</code>.</td><td>no (default = 10)</td></tr><tr><td><code>taskStatusCheckPeriodMs</code></td><td>Polling period in milliseconds to check running task statuses.</td><td>no (default = 1000)</td></tr><tr><td><code>chatHandlerTimeout</code></td><td>Timeout for reporting the pushed segments in worker tasks.</td><td>no (default = PT10S)</td></tr><tr><td><code>chatHandlerNumRetries</code></td><td>Retries for reporting the pushed segments in worker tasks.</td><td>no (default = 5)</td></tr></tbody></table><h6 class="anchor anchorWithStickyNavbar_LWe7" id="automatic-compaction-granularityspec">Automatic compaction granularitySpec<a href="#automatic-compaction-granularityspec" class="hash-link" aria-label="Direct link to Automatic compaction granularitySpec" title="Direct link to Automatic compaction granularitySpec"></a></h6><table><thead><tr><th>Field</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>segmentGranularity</code></td><td>Time chunking period for the segment granularity. Defaults to &#x27;null&#x27;, which preserves the original segment granularity. Accepts all <a href="/docs/28.0.0/querying/granularities">Query granularity</a> values.</td><td>No</td></tr><tr><td><code>queryGranularity</code></td><td>The resolution of timestamp storage within each segment. Defaults to &#x27;null&#x27;, which preserves the original query granularity. Accepts all <a href="/docs/28.0.0/querying/granularities">Query granularity</a> values.</td><td>No</td></tr><tr><td><code>rollup</code></td><td>Whether to enable ingestion-time rollup or not. Defaults to &#x27;null&#x27;, which preserves the original setting. Note that once data is rollup, individual records can no longer be recovered.</td><td>No</td></tr></tbody></table><h6 class="anchor anchorWithStickyNavbar_LWe7" id="automatic-compaction-dimensionsspec">Automatic compaction dimensionsSpec<a href="#automatic-compaction-dimensionsspec" class="hash-link" aria-label="Direct link to Automatic compaction dimensionsSpec" title="Direct link to Automatic compaction dimensionsSpec"></a></h6><table><thead><tr><th>Field</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>dimensions</code></td><td>A list of dimension names or objects. Defaults to &#x27;null&#x27;, which preserves the original dimensions. Note that setting this will cause segments manually compacted with <code>dimensionExclusions</code> to be compacted again.</td><td>No</td></tr></tbody></table><h6 class="anchor anchorWithStickyNavbar_LWe7" id="automatic-compaction-transformspec">Automatic compaction transformSpec<a href="#automatic-compaction-transformspec" class="hash-link" aria-label="Direct link to Automatic compaction transformSpec" title="Direct link to Automatic compaction transformSpec"></a></h6><table><thead><tr><th>Field</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td><code>filter</code></td><td>The <code>filter</code> conditionally filters input rows during compaction. Only rows that pass the filter will be included in the compacted segments. Any of Druid&#x27;s standard <a href="/docs/28.0.0/querying/filters">query filters</a> can be used. Defaults to &#x27;null&#x27;, which will not filter any row.</td><td>No</td></tr></tbody></table><h6 class="anchor anchorWithStickyNavbar_LWe7" id="automatic-compaction-ioconfig">Automatic compaction ioConfig<a href="#automatic-compaction-ioconfig" class="hash-link" aria-label="Direct link to Automatic compaction ioConfig" title="Direct link to Automatic compaction ioConfig"></a></h6><p>Auto-compaction supports a subset of the <a href="/docs/28.0.0/ingestion/native-batch">ioConfig for Parallel task</a>.
The below is a list of the supported configurations for auto-compaction.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>dropExisting</code></td><td>If <code>true</code> the compaction task replaces all existing segments fully contained by the umbrella interval of the compacted segments when the task publishes new segments and tombstones. If compaction fails, Druid does not publish any segments or tombstones. WARNING: this functionality is still in beta. Note that changing this config does not cause intervals to be compacted again.</td><td>false</td><td>no</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="overlord">Overlord<a href="#overlord" class="hash-link" aria-label="Direct link to Overlord" title="Direct link to Overlord"></a></h3><p>For general Overlord Process information, see <a href="/docs/28.0.0/design/overlord">here</a>.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="overlord-static-configuration">Overlord Static Configuration<a href="#overlord-static-configuration" class="hash-link" aria-label="Direct link to Overlord Static Configuration" title="Direct link to Overlord Static Configuration"></a></h4><p>These Overlord static configurations can be defined in the <code>overlord/runtime.properties</code> file.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="overlord-process-configs">Overlord Process Configs<a href="#overlord-process-configs" class="hash-link" aria-label="Direct link to Overlord Process Configs" title="Direct link to Overlord Process Configs"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.host</code></td><td>The host for the current process. This is used to advertise the current processes location as reachable from another process and should generally be specified such that <code>http://${druid.host}/</code> could actually talk to this process</td><td>InetAddress.getLocalHost().getCanonicalHostName()</td></tr><tr><td><code>druid.bindOnHost</code></td><td>Indicating whether the process&#x27;s internal jetty server bind on <code>druid.host</code>. Default is false, which means binding to all interfaces.</td><td>false</td></tr><tr><td><code>druid.plaintextPort</code></td><td>This is the port to actually listen on; unless port mapping is used, this will be the same port as is on <code>druid.host</code></td><td>8090</td></tr><tr><td><code>druid.tlsPort</code></td><td>TLS port for HTTPS connector, if <a href="/docs/28.0.0/operations/tls-support">druid.enableTlsPort</a> is set then this config will be used. If <code>druid.host</code> contains port then that port will be ignored. This should be a non-negative Integer.</td><td>8290</td></tr><tr><td><code>druid.service</code></td><td>The name of the service. This is used as a dimension when emitting metrics and alerts to differentiate between the various services</td><td>druid/overlord</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="overlord-operations">Overlord Operations<a href="#overlord-operations" class="hash-link" aria-label="Direct link to Overlord Operations" title="Direct link to Overlord Operations"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.runner.type</code></td><td>Indicates whether tasks should be run locally using &quot;local&quot; or in a distributed environment using &quot;remote&quot;. The recommended option is &quot;httpRemote&quot;, which is similar to &quot;remote&quot; but uses HTTP to interact with Middle Managers instead of ZooKeeper.</td><td>httpRemote</td></tr><tr><td><code>druid.indexer.storage.type</code></td><td>Choices are &quot;local&quot; or &quot;metadata&quot;. Indicates whether incoming tasks should be stored locally (in heap) or in metadata storage. &quot;local&quot; is mainly for internal testing while &quot;metadata&quot; is recommended in production because storing incoming tasks in metadata storage allows for tasks to be resumed if the Overlord should fail.</td><td>local</td></tr><tr><td><code>druid.indexer.storage.recentlyFinishedThreshold</code></td><td>Duration of time to store task results. Default is 24 hours. If you have hundreds of tasks running in a day, consider increasing this threshold.</td><td>PT24H</td></tr><tr><td><code>druid.indexer.tasklock.forceTimeChunkLock</code></td><td><em><strong>Setting this to false is still experimental</strong></em><br> If set, all tasks are enforced to use time chunk lock. If not set, each task automatically chooses a lock type to use. This configuration can be overwritten by setting <code>forceTimeChunkLock</code> in the <a href="/docs/28.0.0/ingestion/tasks#context">task context</a>. See <a href="/docs/28.0.0/ingestion/tasks#context">Task Locking &amp; Priority</a> for more details about locking in tasks.</td><td>true</td></tr><tr><td><code>druid.indexer.tasklock.batchSegmentAllocation</code></td><td>If set to true, Druid performs segment allocate actions in batches to improve throughput and reduce the average <code>task/action/run/time</code>. See <a href="/docs/28.0.0/ingestion/tasks#batching-segmentallocate-actions">batching <code>segmentAllocate</code> actions</a> for details.</td><td>true</td></tr><tr><td><code>druid.indexer.tasklock.batchAllocationWaitTime</code></td><td>Number of milliseconds after Druid adds the first segment allocate action to a batch, until it executes the batch. Allows the batch to add more requests and improve the average segment allocation run time. This configuration takes effect only if <code>batchSegmentAllocation</code> is enabled.</td><td>500</td></tr><tr><td><code>druid.indexer.task.default.context</code></td><td>Default task context that is applied to all tasks submitted to the Overlord. Any default in this config does not override neither the context values the user provides nor <code>druid.indexer.tasklock.forceTimeChunkLock</code>.</td><td>empty context</td></tr><tr><td><code>druid.indexer.queue.maxSize</code></td><td>Maximum number of active tasks at one time.</td><td>Integer.MAX_VALUE</td></tr><tr><td><code>druid.indexer.queue.startDelay</code></td><td>Sleep this long before starting Overlord queue management. This can be useful to give a cluster time to re-orient itself after e.g. a widespread network issue.</td><td>PT1M</td></tr><tr><td><code>druid.indexer.queue.restartDelay</code></td><td>Sleep this long when Overlord queue management throws an exception before trying again.</td><td>PT30S</td></tr><tr><td><code>druid.indexer.queue.storageSyncRate</code></td><td>Sync Overlord state this often with an underlying task persistence mechanism.</td><td>PT1M</td></tr></tbody></table><p>The following configs only apply if the Overlord is running in remote mode. For a description of local vs. remote mode, see <a href="/docs/28.0.0/design/overlord">Overlord Process</a>.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.runner.taskAssignmentTimeout</code></td><td>How long to wait after a task as been assigned to a MiddleManager before throwing an error.</td><td>PT5M</td></tr><tr><td><code>druid.indexer.runner.minWorkerVersion</code></td><td>The minimum MiddleManager version to send tasks to. The version number is a string. This affects the expected behavior during certain operations like comparison against <code>druid.worker.version</code>. Specifically, the version comparison follows dictionary order. Use ISO8601 date format for the version to accommodate date comparisons.</td><td>&quot;0&quot;</td></tr><tr><td><code>druid.indexer.runner.parallelIndexTaskSlotRatio</code></td><td>The ratio of task slots available for parallel indexing supervisor tasks per worker. The specified value must be in the range <!-- -->[0, 1]<!-- -->.</td><td>1</td></tr><tr><td><code>druid.indexer.runner.compressZnodes</code></td><td>Indicates whether or not the Overlord should expect MiddleManagers to compress Znodes.</td><td>true</td></tr><tr><td><code>druid.indexer.runner.maxZnodeBytes</code></td><td>The maximum size Znode in bytes that can be created in ZooKeeper, should be in the range of [10KiB, 2GiB). <a href="/docs/28.0.0/configuration/human-readable-byte">Human-readable format</a> is supported.</td><td>512 KiB</td></tr><tr><td><code>druid.indexer.runner.taskCleanupTimeout</code></td><td>How long to wait before failing a task after a MiddleManager is disconnected from ZooKeeper.</td><td>PT15M</td></tr><tr><td><code>druid.indexer.runner.taskShutdownLinkTimeout</code></td><td>How long to wait on a shutdown request to a MiddleManager before timing out</td><td>PT1M</td></tr><tr><td><code>druid.indexer.runner.pendingTasksRunnerNumThreads</code></td><td>Number of threads to allocate pending-tasks to workers, must be at least 1.</td><td>1</td></tr><tr><td><code>druid.indexer.runner.maxRetriesBeforeBlacklist</code></td><td>Number of consecutive times the MiddleManager can fail tasks, before the worker is blacklisted, must be at least 1</td><td>5</td></tr><tr><td><code>druid.indexer.runner.workerBlackListBackoffTime</code></td><td>How long to wait before a task is whitelisted again. This value should be greater that the value set for taskBlackListCleanupPeriod.</td><td>PT15M</td></tr><tr><td><code>druid.indexer.runner.workerBlackListCleanupPeriod</code></td><td>A duration after which the cleanup thread will startup to clean blacklisted workers.</td><td>PT5M</td></tr><tr><td><code>druid.indexer.runner.maxPercentageBlacklistWorkers</code></td><td>The maximum percentage of workers to blacklist, this must be between 0 and 100.</td><td>20</td></tr></tbody></table><p>There are additional configs for autoscaling (if it is enabled):</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.autoscale.strategy</code></td><td>Choices are &quot;noop&quot;, &quot;ec2&quot; or &quot;gce&quot;. Sets the strategy to run when autoscaling is required.</td><td>noop</td></tr><tr><td><code>druid.indexer.autoscale.doAutoscale</code></td><td>If set to &quot;true&quot; autoscaling will be enabled.</td><td>false</td></tr><tr><td><code>druid.indexer.autoscale.provisionPeriod</code></td><td>How often to check whether or not new MiddleManagers should be added.</td><td>PT1M</td></tr><tr><td><code>druid.indexer.autoscale.terminatePeriod</code></td><td>How often to check when MiddleManagers should be removed.</td><td>PT5M</td></tr><tr><td><code>druid.indexer.autoscale.originTime</code></td><td>The starting reference timestamp that the terminate period increments upon.</td><td>2012-01-01T00:55:00.000Z</td></tr><tr><td><code>druid.indexer.autoscale.workerIdleTimeout</code></td><td>How long can a worker be idle (not a run task) before it can be considered for termination.</td><td>PT90M</td></tr><tr><td><code>druid.indexer.autoscale.maxScalingDuration</code></td><td>How long the Overlord will wait around for a MiddleManager to show up before giving up.</td><td>PT15M</td></tr><tr><td><code>druid.indexer.autoscale.numEventsToTrack</code></td><td>The number of autoscaling related events (node creation and termination) to track.</td><td>10</td></tr><tr><td><code>druid.indexer.autoscale.pendingTaskTimeout</code></td><td>How long a task can be in &quot;pending&quot; state before the Overlord tries to scale up.</td><td>PT30S</td></tr><tr><td><code>druid.indexer.autoscale.workerVersion</code></td><td>If set, will only create nodes of set version during autoscaling. Overrides dynamic configuration.</td><td>null</td></tr><tr><td><code>druid.indexer.autoscale.workerPort</code></td><td>The port that MiddleManagers will run on.</td><td>8080</td></tr><tr><td><code>druid.indexer.autoscale.workerCapacityHint</code></td><td>An estimation of the number of task slots available for each worker launched by the auto scaler when there are no workers running. The auto scaler uses the worker capacity hint to launch workers with an adequate capacity to handle pending tasks. When unset or set to a value less than or equal to 0, the auto scaler scales workers equal to the value for <code>minNumWorkers</code> in autoScaler config instead. The auto scaler assumes that each worker, either a middleManager or indexer, has the same amount of task slots. Therefore, when all your workers have the same capacity (homogeneous capacity), set the value for <code>autoscale.workerCapacityHint</code> equal to <code>druid.worker.capacity</code>. If your workers have different capacities (heterogeneous capacity), set the value to the average of <code>druid.worker.capacity</code> across the workers. For example, if two workers have <code>druid.worker.capacity=10</code>, and one has <code>druid.worker.capacity=4</code>, set <code>autoscale.workerCapacityHint=8</code>. Only applies to <code>pendingTaskBased</code> provisioning strategy.</td><td>-1</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="supervisors">Supervisors<a href="#supervisors" class="hash-link" aria-label="Direct link to Supervisors" title="Direct link to Supervisors"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.supervisor.healthinessThreshold</code></td><td>The number of successful runs before an unhealthy supervisor is again considered healthy.</td><td>3</td></tr><tr><td><code>druid.supervisor.unhealthinessThreshold</code></td><td>The number of failed runs before the supervisor is considered unhealthy.</td><td>3</td></tr><tr><td><code>druid.supervisor.taskHealthinessThreshold</code></td><td>The number of consecutive task successes before an unhealthy supervisor is again considered healthy.</td><td>3</td></tr><tr><td><code>druid.supervisor.taskUnhealthinessThreshold</code></td><td>The number of consecutive task failures before the supervisor is considered unhealthy.</td><td>3</td></tr><tr><td><code>druid.supervisor.storeStackTrace</code></td><td>Whether full stack traces of supervisor exceptions should be stored and returned by the supervisor <code>/status</code> endpoint.</td><td>false</td></tr><tr><td><code>druid.supervisor.maxStoredExceptionEvents</code></td><td>The maximum number of exception events that can be returned through the supervisor <code>/status</code> endpoint.</td><td><code>max(healthinessThreshold, unhealthinessThreshold)</code></td></tr><tr><td><code>druid.supervisor.idleConfig.enabled</code></td><td>If <code>true</code>, supervisor can become idle if there is no data on input stream/topic for some time.</td><td>false</td></tr><tr><td><code>druid.supervisor.idleConfig.inactiveAfterMillis</code></td><td>Supervisor is marked as idle if all existing data has been read from input topic and no new data has been published for <code>inactiveAfterMillis</code> milliseconds.</td><td><code>600_000</code></td></tr></tbody></table><p>The <code>druid.supervisor.idleConfig.*</code> specified in the Overlord runtime properties defines the default behavior for the entire cluster. See <a href="/docs/28.0.0/development/extensions-core/kafka-supervisor-reference#supervisor-io-configuration">Idle Configuration in Kafka Supervisor IOConfig</a> to override it for an individual supervisor.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="overlord-dynamic-configuration">Overlord dynamic configuration<a href="#overlord-dynamic-configuration" class="hash-link" aria-label="Direct link to Overlord dynamic configuration" title="Direct link to Overlord dynamic configuration"></a></h4><p>The Overlord can be dynamically configured to specify how tasks are assigned to workers.</p><p>The JSON object can be submitted to the Overlord via a POST request at:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">http://&lt;OVERLORD_IP&gt;:&lt;port&gt;/druid/indexer/v1/worker</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Optional header parameters for auditing the config change can also be specified.</p><table><thead><tr><th>Header Param Name</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>X-Druid-Author</code></td><td>author making the config change</td><td>&quot;&quot;</td></tr><tr><td><code>X-Druid-Comment</code></td><td>comment describing the change being done</td><td>&quot;&quot;</td></tr></tbody></table><p>An example Overlord dynamic config is shown below:</p><div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;selectStrategy&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;type&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;fillCapacity&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;affinityConfig&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;affinity&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;datasource1&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">&quot;host1:port&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;host2:port&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;datasource2&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">&quot;host3:port&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;autoScaler&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;type&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;ec2&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;minNumWorkers&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">2</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;maxNumWorkers&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">12</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;envConfig&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;availabilityZone&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;us-east-1a&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;nodeData&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;amiId&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;${AMI}&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;instanceType&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;c3.8xlarge&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;minInstances&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;maxInstances&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token number" style="color:rgb(247, 140, 108)">1</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;securityGroupIds&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">[</span><span class="token string" style="color:rgb(195, 232, 141)">&quot;${IDs}&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">]</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;keyName&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;${KEY_NAME}&quot;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;userData&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;impl&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;string&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;data&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;${SCRIPT_COMMAND}&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;versionReplacementString&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;:VERSION:&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;version&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token null keyword" style="font-style:italic">null</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Issuing a GET request to the same URL returns the current Overlord dynamic config.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>selectStrategy</code></td><td>Describes how to assign tasks to MiddleManagers. The type can be <code>equalDistribution</code>, <code>equalDistributionWithCategorySpec</code>, <code>fillCapacity</code>, <code>fillCapacityWithCategorySpec</code>, and <code>javascript</code>.</td><td><code>{&quot;type&quot;:&quot;equalDistribution&quot;}</code></td></tr><tr><td><code>autoScaler</code></td><td>Only used if autoscaling is enabled. See below.</td><td>null</td></tr></tbody></table><p>To view the audit history of worker config issue a GET request to the URL -</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">http://&lt;OVERLORD_IP&gt;:&lt;port&gt;/druid/indexer/v1/worker/history?interval=&lt;interval&gt;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>The default value of <code>interval</code> can be specified by setting <code>druid.audit.manager.auditHistoryMillis</code> (1 week if not configured) in Overlord runtime.properties.</p><p>To view the last <code>n</code> entries of the audit history of worker config, issue a GET request to the following URL:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">http://&lt;OVERLORD_IP&gt;:&lt;port&gt;/druid/indexer/v1/worker/history?count=&lt;n&gt;</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h5 class="anchor anchorWithStickyNavbar_LWe7" id="worker-select-strategy">Worker select strategy<a href="#worker-select-strategy" class="hash-link" aria-label="Direct link to Worker select strategy" title="Direct link to Worker select strategy"></a></h5><p>The select strategy controls how Druid assigns tasks to workers (MiddleManagers).
At a high level, the select strategy determines the list of eligible workers for a given task using
either an <code>affinityConfig</code> or a <code>categorySpec</code>. Then, Druid assigns the task by either trying to distribute load equally
(<code>equalDistribution</code>) or to fill as many workers as possible to capacity (<code>fillCapacity</code>).
There are 4 options for select strategies:</p><ul><li><a href="#equaldistribution"><code>equalDistribution</code></a></li><li><a href="#equaldistributionwithcategoryspec"><code>equalDistributionWithCategorySpec</code></a></li><li><a href="#fillcapacity"><code>fillCapacity</code></a></li><li><a href="#fillcapacitywithcategoryspec"><code>fillCapacityWithCategorySpec</code></a></li></ul><p>A <code>javascript</code> option is also available but should only be used for prototyping new strategies.</p><p>If an <code>affinityConfig</code> is provided (as part of <code>fillCapacity</code> and <code>equalDistribution</code> strategies) for a given task, the list of workers eligible to be assigned is determined as follows:</p><ul><li>a non-affinity worker if no affinity is specified for that datasource. Any worker not listed in the <code>affinityConfig</code> is considered a non-affinity worker.</li><li>a non-affinity worker if preferred workers are not available and the affinity is <em>weak</em> i.e. <code>strong: false</code>.</li><li>a preferred worker listed in the <code>affinityConfig</code> for this datasource if it has available capacity</li><li>no worker if preferred workers are not available and affinity is <em>strong</em> i.e. <code>strong: true</code>. In this case, the task remains in &quot;pending&quot; state. The chosen provisioning strategy (e.g. <code>pendingTaskBased</code>) may then use the total number of pending tasks to determine if a new node should be provisioned.</li></ul><p>Note that every worker listed in the <code>affinityConfig</code> will only be used for the assigned datasources and no other.</p><p>If a <code>categorySpec</code> is provided (as part of <code>fillCapacityWithCategorySpec</code> and <code>equalDistributionWithCategorySpec</code> strategies), then a task of a given datasource may be assigned to:</p><ul><li>any worker if no category config is given for task type</li><li>any worker if category config is given for task type but no category is given for datasource and there&#x27;s no default category</li><li>a preferred worker (based on category config and category for datasource) if available</li><li>any worker if category config and category are given but no preferred worker is available and category config is <code>weak</code></li><li>not assigned at all if preferred workers are not available and category config is <code>strong</code></li></ul><p>In both the cases, Druid determines the list of eligible workers and selects one depending on their load with the goal of either distributing the load equally or filling as few workers as possible.</p><p>If you are using auto-scaling, use the <code>fillCapacity</code> select strategy since auto-scaled nodes can
not be assigned a category, and you want the work to be concentrated on the fewest number of workers to allow the empty ones to scale down.</p><h6 class="anchor anchorWithStickyNavbar_LWe7" id="equaldistribution"><code>equalDistribution</code><a href="#equaldistribution" class="hash-link" aria-label="Direct link to equaldistribution" title="Direct link to equaldistribution"></a></h6><p>Tasks are assigned to the MiddleManager with the most free slots at the time the task begins running.
This evenly distributes work across your MiddleManagers.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>equalDistribution</code></td><td>required; must be <code>equalDistribution</code></td></tr><tr><td><code>affinityConfig</code></td><td><a href="#affinityconfig"><code>AffinityConfig</code></a> object</td><td>null (no affinity)</td></tr></tbody></table><h6 class="anchor anchorWithStickyNavbar_LWe7" id="equaldistributionwithcategoryspec"><code>equalDistributionWithCategorySpec</code><a href="#equaldistributionwithcategoryspec" class="hash-link" aria-label="Direct link to equaldistributionwithcategoryspec" title="Direct link to equaldistributionwithcategoryspec"></a></h6><p>This strategy is a variant of <code>equalDistribution</code>, which supports <code>workerCategorySpec</code> field rather than <code>affinityConfig</code>.
By specifying <code>workerCategorySpec</code>, you can assign tasks to run on different categories of MiddleManagers based on the <strong>type</strong> and <strong>dataSource</strong> of the task.
This strategy doesn&#x27;t work with <code>AutoScaler</code> since the behavior is undefined.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>equalDistributionWithCategorySpec</code></td><td>required; must be <code>equalDistributionWithCategorySpec</code></td></tr><tr><td><code>workerCategorySpec</code></td><td><a href="#workercategoryspec"><code>WorkerCategorySpec</code></a> object</td><td>null (no worker category spec)</td></tr></tbody></table><p>Example: tasks of type &quot;index_kafka&quot; default to running on MiddleManagers of category <code>c1</code>, except for tasks that write to datasource &quot;ds1,&quot; which run on MiddleManagers of category <code>c2</code>.</p><div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;selectStrategy&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;type&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;equalDistributionWithCategorySpec&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;workerCategorySpec&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;strong&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">false</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;categoryMap&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;index_kafka&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;defaultCategory&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;c1&quot;</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;categoryAffinity&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">{</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token property">&quot;ds1&quot;</span><span class="token operator" style="color:rgb(137, 221, 255)">:</span><span class="token plain"> </span><span class="token string" style="color:rgb(195, 232, 141)">&quot;c2&quot;</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> </span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token punctuation" style="color:rgb(199, 146, 234)">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h6 class="anchor anchorWithStickyNavbar_LWe7" id="fillcapacity"><code>fillCapacity</code><a href="#fillcapacity" class="hash-link" aria-label="Direct link to fillcapacity" title="Direct link to fillcapacity"></a></h6><p>Tasks are assigned to the worker with the most currently-running tasks. This is
useful when you are auto-scaling MiddleManagers since it tends to pack some full and
leave others empty. The empty ones can be safely terminated.</p><p>Note that if <code>druid.indexer.runner.pendingTasksRunnerNumThreads</code> is set to <em>N</em> &gt; 1, then this strategy will fill <em>N</em>
MiddleManagers up to capacity simultaneously, rather than a single MiddleManager.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>fillCapacity</code></td><td>required; must be <code>fillCapacity</code></td></tr><tr><td><code>affinityConfig</code></td><td><a href="#affinityconfig"><code>AffinityConfig</code></a> object</td><td>null (no affinity)</td></tr></tbody></table><h6 class="anchor anchorWithStickyNavbar_LWe7" id="fillcapacitywithcategoryspec"><code>fillCapacityWithCategorySpec</code><a href="#fillcapacitywithcategoryspec" class="hash-link" aria-label="Direct link to fillcapacitywithcategoryspec" title="Direct link to fillcapacitywithcategoryspec"></a></h6><p>This strategy is a variant of <code>fillCapacity</code>, which supports <code>workerCategorySpec</code> instead of an <code>affinityConfig</code>.
The usage is the same as <code>equalDistributionWithCategorySpec</code> strategy.
This strategy doesn&#x27;t work with <code>AutoScaler</code> since the behavior is undefined.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>fillCapacityWithCategorySpec</code>.</td><td>required; must be <code>fillCapacityWithCategorySpec</code></td></tr><tr><td><code>workerCategorySpec</code></td><td><a href="#workercategoryspec"><code>WorkerCategorySpec</code></a> object</td><td>null (no worker category spec)</td></tr></tbody></table><a name="javascript-worker-select-strategy"></a><h6 class="anchor anchorWithStickyNavbar_LWe7" id="javascript-1"><code>javascript</code><a href="#javascript-1" class="hash-link" aria-label="Direct link to javascript-1" title="Direct link to javascript-1"></a></h6><p>Allows defining arbitrary logic for selecting workers to run task using a JavaScript function.
The function is passed remoteTaskRunnerConfig, map of workerId to available workers and task to be executed and returns the workerId on which the task should be run or null if the task cannot be run.
It can be used for rapid development of missing features where the worker selection logic is to be changed or tuned often.
If the selection logic is quite complex and cannot be easily tested in JavaScript environment,
its better to write a druid extension module with extending current worker selection strategies written in java.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>javascript</code></td><td>required; must be <code>javascript</code></td></tr><tr><td><code>function</code></td><td>String representing JavaScript function</td><td></td></tr></tbody></table><p>Example: a function that sends batch_index_task to workers 10.0.0.1 and 10.0.0.2 and all other tasks to other available workers.</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">{</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> &quot;type&quot;:&quot;javascript&quot;,</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> &quot;function&quot;:&quot;function (config, zkWorkers, task) {\nvar batch_workers = new java.util.ArrayList();\nbatch_workers.add(\&quot;middleManager1_hostname:8091\&quot;);\nbatch_workers.add(\&quot;middleManager2_hostname:8091\&quot;);\nworkers = zkWorkers.keySet().toArray();\nvar sortedWorkers = new Array()\n;for(var i = 0; i &lt; workers.length; i++){\n sortedWorkers[i] = workers[i];\n}\nArray.prototype.sort.call(sortedWorkers,function(a, b){return zkWorkers.get(b).getCurrCapacityUsed() - zkWorkers.get(a).getCurrCapacityUsed();});\nvar minWorkerVer = config.getMinWorkerVersion();\nfor (var i = 0; i &lt; sortedWorkers.length; i++) {\n var worker = sortedWorkers[i];\n var zkWorker = zkWorkers.get(worker);\n if(zkWorker.canRunTask(task) &amp;&amp; zkWorker.isValidVersion(minWorkerVer)){\n if(task.getType() == &#x27;index_hadoop&#x27; &amp;&amp; batch_workers.contains(worker)){\n return worker;\n } else {\n if(task.getType() != &#x27;index_hadoop&#x27; &amp;&amp; !batch_workers.contains(worker)){\n return worker;\n }\n }\n }\n}\nreturn null;\n}&quot;</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">}</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p> JavaScript-based functionality is disabled by default. Please refer to the Druid <a href="/docs/28.0.0/development/javascript">JavaScript programming guide</a> for guidelines about using Druid&#x27;s JavaScript functionality, including instructions on how to enable it.</p></div></div><h6 class="anchor anchorWithStickyNavbar_LWe7" id="affinityconfig">affinityConfig<a href="#affinityconfig" class="hash-link" aria-label="Direct link to affinityConfig" title="Direct link to affinityConfig"></a></h6><p>Use the <code>affinityConfig</code> field to pass affinity configuration to the <code>equalDistribution</code> and <code>fillCapacity</code> strategies.
If not provided, the default is to have no affinity.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>affinity</code></td><td>JSON object mapping a datasource String name to a list of indexing service MiddleManager <code>host:port</code> values. Druid doesn&#x27;t perform DNS resolution, so the &#x27;host&#x27; value must match what is configured on the MiddleManager and what the MiddleManager announces itself as (examine the Overlord logs to see what your MiddleManager announces itself as).</td><td>{}</td></tr><tr><td><code>strong</code></td><td>When <code>true</code> tasks for a datasource must be assigned to affinity-mapped MiddleManagers. Tasks remain queued until a slot becomes available. When <code>false</code>, Druid may assign tasks for a datasource to other MiddleManagers when affinity-mapped MiddleManagers are unavailable to run queued tasks.</td><td>false</td></tr></tbody></table><h6 class="anchor anchorWithStickyNavbar_LWe7" id="workercategoryspec">workerCategorySpec<a href="#workercategoryspec" class="hash-link" aria-label="Direct link to workerCategorySpec" title="Direct link to workerCategorySpec"></a></h6><p>WorkerCategorySpec can be provided to the <code>equalDistributionWithCategorySpec</code> and <code>fillCapacityWithCategorySpec</code> strategies using the <code>workerCategorySpec</code>
field. If not provided, the default is to not use it at all.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>categoryMap</code></td><td>A JSON map object mapping a task type String name to a <a href="#categoryconfig">CategoryConfig</a> object, by which you can specify category config for different task type.</td><td>{}</td></tr><tr><td><code>strong</code></td><td>With weak workerCategorySpec (the default), tasks for a dataSource may be assigned to other MiddleManagers if the MiddleManagers specified in <code>categoryMap</code> are not able to run all pending tasks in the queue for that dataSource. With strong workerCategorySpec, tasks for a dataSource will only ever be assigned to their specified MiddleManagers, and will wait in the pending queue if necessary.</td><td>false</td></tr></tbody></table><h6 class="anchor anchorWithStickyNavbar_LWe7" id="categoryconfig">CategoryConfig<a href="#categoryconfig" class="hash-link" aria-label="Direct link to CategoryConfig" title="Direct link to CategoryConfig"></a></h6><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>defaultCategory</code></td><td>Specify default category for a task type.</td><td>null</td></tr><tr><td><code>categoryAffinity</code></td><td>A JSON map object mapping a datasource String name to a category String name of the MiddleManager. If category isn&#x27;t specified for a datasource, then using the <code>defaultCategory</code>. If no specified category and the <code>defaultCategory</code> is also null, then tasks can run on any available MiddleManagers.</td><td>null</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="autoscaler">Autoscaler<a href="#autoscaler" class="hash-link" aria-label="Direct link to Autoscaler" title="Direct link to Autoscaler"></a></h5><p>Amazon&#x27;s EC2 together with Google&#x27;s GCE are currently the only supported autoscalers.</p><p>EC2&#x27;s autoscaler properties are:</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>ec2</code></td><td>0</td></tr><tr><td><code>minNumWorkers</code></td><td>The minimum number of workers that can be in the cluster at any given time.</td><td>0</td></tr><tr><td><code>maxNumWorkers</code></td><td>The maximum number of workers that can be in the cluster at any given time.</td><td>0</td></tr><tr><td><code>envConfig.availabilityZone</code></td><td>What Amazon availability zone to run in.</td><td>none</td></tr><tr><td><code>envConfig.nodeData</code></td><td>A JSON object that describes how to launch new nodes.</td><td>none; required</td></tr><tr><td><code>envConfig.userData</code></td><td>A JSON object that describes how to configure new nodes. If you have set <code>druid.indexer.autoscale.workerVersion</code>, this must have a <code>versionReplacementString</code>. Otherwise, a <code>versionReplacementString</code> is not necessary.</td><td>none; optional</td></tr></tbody></table><p>For GCE&#x27;s properties, please refer to the <a href="/docs/28.0.0/development/extensions-contrib/gce-extensions">gce-extensions</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="data-server">Data Server<a href="#data-server" class="hash-link" aria-label="Direct link to Data Server" title="Direct link to Data Server"></a></h2><p>This section contains the configuration options for the processes that reside on Data servers (MiddleManagers/Peons and Historicals) in the suggested <a href="/docs/28.0.0/design/processes#server-types">three-server configuration</a>.</p><p>Configuration options for the <a href="/docs/28.0.0/design/indexer">Indexer process</a> are also provided here.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="middlemanager-and-peons">MiddleManager and Peons<a href="#middlemanager-and-peons" class="hash-link" aria-label="Direct link to MiddleManager and Peons" title="Direct link to MiddleManager and Peons"></a></h3><p>These MiddleManager and Peon configurations can be defined in the <code>middleManager/runtime.properties</code> file.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="middlemanager-process-config">MiddleManager Process Config<a href="#middlemanager-process-config" class="hash-link" aria-label="Direct link to MiddleManager Process Config" title="Direct link to MiddleManager Process Config"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.host</code></td><td>The host for the current process. This is used to advertise the current processes location as reachable from another process and should generally be specified such that <code>http://${druid.host}/</code> could actually talk to this process</td><td>InetAddress.getLocalHost().getCanonicalHostName()</td></tr><tr><td><code>druid.bindOnHost</code></td><td>Indicating whether the process&#x27;s internal jetty server bind on <code>druid.host</code>. Default is false, which means binding to all interfaces.</td><td>false</td></tr><tr><td><code>druid.plaintextPort</code></td><td>This is the port to actually listen on; unless port mapping is used, this will be the same port as is on <code>druid.host</code></td><td>8091</td></tr><tr><td><code>druid.tlsPort</code></td><td>TLS port for HTTPS connector, if <a href="/docs/28.0.0/operations/tls-support">druid.enableTlsPort</a> is set then this config will be used. If <code>druid.host</code> contains port then that port will be ignored. This should be a non-negative Integer.</td><td>8291</td></tr><tr><td><code>druid.service</code></td><td>The name of the service. This is used as a dimension when emitting metrics and alerts to differentiate between the various services</td><td>druid/middlemanager</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="middlemanager-configuration">MiddleManager Configuration<a href="#middlemanager-configuration" class="hash-link" aria-label="Direct link to MiddleManager Configuration" title="Direct link to MiddleManager Configuration"></a></h4><p>Middle managers pass their configurations down to their child peons. The MiddleManager requires the following configs:</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.indexer.runner.allowedPrefixes</code></td><td>Whitelist of prefixes for configs that can be passed down to child peons.</td><td>&quot;com.metamx&quot;, &quot;druid&quot;, &quot;org.apache.druid&quot;, &quot;user.timezone&quot;, &quot;file.encoding&quot;, &quot;java.io.tmpdir&quot;, &quot;hadoop&quot;</td></tr><tr><td><code>druid.indexer.runner.compressZnodes</code></td><td>Indicates whether or not the MiddleManagers should compress Znodes.</td><td>true</td></tr><tr><td><code>druid.indexer.runner.classpath</code></td><td>Java classpath for the peon.</td><td>System.getProperty(&quot;java.class.path&quot;)</td></tr><tr><td><code>druid.indexer.runner.javaCommand</code></td><td>Command required to execute java.</td><td>java</td></tr><tr><td><code>druid.indexer.runner.javaOpts</code></td><td><em>DEPRECATED</em> A string of -X Java options to pass to the peon&#x27;s JVM. Quotable parameters or parameters with spaces are encouraged to use javaOptsArray</td><td>&quot;&quot;</td></tr><tr><td><code>druid.indexer.runner.javaOptsArray</code></td><td>A JSON array of strings to be passed in as options to the peon&#x27;s JVM. This is additive to <code>druid.indexer.runner.javaOpts</code> and is recommended for properly handling arguments which contain quotes or spaces like <code>[&quot;-XX:OnOutOfMemoryError=kill -9 %p&quot;]</code></td><td><code>[]</code></td></tr><tr><td><code>druid.indexer.runner.maxZnodeBytes</code></td><td>The maximum size Znode in bytes that can be created in ZooKeeper, should be in the range of [10KiB, 2GiB). <a href="/docs/28.0.0/configuration/human-readable-byte">Human-readable format</a> is supported.</td><td>512KiB</td></tr><tr><td><code>druid.indexer.runner.startPort</code></td><td>Starting port used for peon processes, should be greater than 1023 and less than 65536.</td><td>8100</td></tr><tr><td><code>druid.indexer.runner.endPort</code></td><td>Ending port used for peon processes, should be greater than or equal to <code>druid.indexer.runner.startPort</code> and less than 65536.</td><td>65535</td></tr><tr><td><code>druid.indexer.runner.ports</code></td><td>A JSON array of integers to specify ports that used for peon processes. If provided and non-empty, ports for peon processes will be chosen from these ports. And <code>druid.indexer.runner.startPort/druid.indexer.runner.endPort</code> will be completely ignored.</td><td><code>[]</code></td></tr><tr><td><code>druid.worker.ip</code></td><td>The IP of the worker.</td><td>localhost</td></tr><tr><td><code>druid.worker.version</code></td><td>Version identifier for the MiddleManager. The version number is a string. This affects the expected behavior during certain operations like comparison against <code>druid.indexer.runner.minWorkerVersion</code>. Specifically, the version comparison follows dictionary order. Use ISO8601 date format for the version to accommodate date comparisons.</td><td>0</td></tr><tr><td><code>druid.worker.capacity</code></td><td>Maximum number of tasks the MiddleManager can accept.</td><td>Number of CPUs on the machine - 1</td></tr><tr><td><code>druid.worker.baseTaskDirs</code></td><td>List of base temporary working directories, one of which is assigned per task in a round-robin fashion. This property can be used to allow usage of multiple disks for indexing. This property is recommended in place of and takes precedence over <code>${druid.indexer.task.baseTaskDir}</code>. If this configuration is not set, <code>${druid.indexer.task.baseTaskDir}</code> is used. Example: <code>druid.worker.baseTaskDirs=[\&quot;PATH1\&quot;,\&quot;PATH2\&quot;,...]</code>.</td><td>null</td></tr><tr><td><code>druid.worker.baseTaskDirSize</code></td><td>The total amount of bytes that can be used by tasks on any single task dir. This value is treated symmetrically across all directories, that is, if this is 500 GB and there are 3 <code>baseTaskDirs</code>, then each of those task directories is assumed to allow for 500 GB to be used and a total of 1.5 TB will potentially be available across all tasks. The actual amount of memory assigned to each task is discussed in <a href="/docs/28.0.0/ingestion/tasks#configuring-task-storage-sizes">Configuring task storage sizes</a></td><td><code>Long.MAX_VALUE</code></td></tr><tr><td><code>druid.worker.category</code></td><td>A string to name the category that the MiddleManager node belongs to.</td><td><code>_default_worker_category</code></td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="peon-processing">Peon Processing<a href="#peon-processing" class="hash-link" aria-label="Direct link to Peon Processing" title="Direct link to Peon Processing"></a></h4><p>Processing properties set on the MiddleManager will be passed through to Peons.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.processing.buffer.sizeBytes</code></td><td>This specifies a buffer size (less than 2GiB) for the storage of intermediate results. The computation engine in both the Historical and Realtime processes will use a scratch buffer of this size to do all of their intermediate computations off-heap. Larger values allow for more aggregations in a single pass over the data while smaller values can require more passes depending on the query that is being executed. <a href="/docs/28.0.0/configuration/human-readable-byte">Human-readable format</a> is supported.</td><td>auto (max 1 GiB)</td></tr><tr><td><code>druid.processing.buffer.poolCacheMaxCount</code></td><td>Processing buffer pool caches the buffers for later use. This is the maximum count that the cache will grow to. Note that pool can create more buffers than it can cache if necessary.</td><td><code>Integer.MAX_VALUE</code></td></tr><tr><td><code>druid.processing.formatString</code></td><td>Realtime and Historical processes use this format string to name their processing threads.</td><td>processing-%s</td></tr><tr><td><code>druid.processing.numMergeBuffers</code></td><td>The number of direct memory buffers available for merging query results. The buffers are sized by <code>druid.processing.buffer.sizeBytes</code>. This property is effectively a concurrency limit for queries that require merging buffers. If you are using any queries that require merge buffers (currently, just groupBy) then you should have at least two of these.</td><td><code>max(2, druid.processing.numThreads / 4)</code></td></tr><tr><td><code>druid.processing.numThreads</code></td><td>The number of processing threads to have available for parallel processing of segments. Our rule of thumb is <code>num_cores - 1</code>, which means that even under heavy load there will still be one core available to do background tasks like talking with ZooKeeper and pulling down segments. If only one core is available, this property defaults to the value <code>1</code>.</td><td>Number of cores - 1 (or 1)</td></tr><tr><td><code>druid.processing.fifo</code></td><td>Enables the processing queue to treat tasks of equal priority in a FIFO manner.</td><td><code>true</code></td></tr><tr><td><code>druid.processing.tmpDir</code></td><td>Path where temporary files created while processing a query should be stored. If specified, this configuration takes priority over the default <code>java.io.tmpdir</code> path.</td><td>path represented by <code>java.io.tmpdir</code></td></tr><tr><td><code>druid.processing.intermediaryData.storage.type</code></td><td>Storage type for intermediary segments of data shuffle between native parallel index tasks. <br>Set to <code>local</code> to store segment files in the local storage of the MiddleManager or Indexer. <br>Set to <code>deepstore</code> to use configured deep storage for better fault tolerance during rolling updates. When the storage type is <code>deepstore</code>, Druid stores the data in the <code>shuffle-data</code> directory under the configured deep storage path. Druid does not support automated cleanup for the <code>shuffle-data</code> directory. You can set up cloud storage lifecycle rules for automated cleanup of data at the <code>shuffle-data</code> prefix location.</td><td><code>local</code></td></tr></tbody></table><p>The amount of direct memory needed by Druid is at least
<code>druid.processing.buffer.sizeBytes * (druid.processing.numMergeBuffers + druid.processing.numThreads + 1)</code>. You can
ensure at least this amount of direct memory is available by providing <code>-XX:MaxDirectMemorySize=&lt;VALUE&gt;</code> in
<code>druid.indexer.runner.javaOptsArray</code> as documented above.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="peon-query-configuration">Peon query configuration<a href="#peon-query-configuration" class="hash-link" aria-label="Direct link to Peon query configuration" title="Direct link to Peon query configuration"></a></h4><p>See <a href="#general-query-configuration">general query configuration</a>.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="peon-caching">Peon Caching<a href="#peon-caching" class="hash-link" aria-label="Direct link to Peon Caching" title="Direct link to Peon Caching"></a></h4><p>You can optionally configure caching to be enabled on the peons by setting caching configs here.</p><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.realtime.cache.useCache</code></td><td>true, false</td><td>Enable the cache on the realtime.</td><td>false</td></tr><tr><td><code>druid.realtime.cache.populateCache</code></td><td>true, false</td><td>Populate the cache on the realtime.</td><td>false</td></tr><tr><td><code>druid.realtime.cache.unCacheable</code></td><td>All druid query types</td><td>All query types to not cache.</td><td><code>[]</code></td></tr><tr><td><code>druid.realtime.cache.maxEntrySize</code></td><td>positive integer</td><td>Maximum cache entry size in bytes.</td><td>1_000_000</td></tr></tbody></table><p>See <a href="#cache-configuration">cache configuration</a> for how to configure cache settings.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="additional-peon-configuration">Additional Peon Configuration<a href="#additional-peon-configuration" class="hash-link" aria-label="Direct link to Additional Peon Configuration" title="Direct link to Additional Peon Configuration"></a></h4><p>Although peons inherit the configurations of their parent MiddleManagers, explicit child peon configs in MiddleManager can be set by prefixing them with:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.fork.property</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Additional peon configs include:</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.peon.mode</code></td><td>Choices are &quot;local&quot; and &quot;remote&quot;. Setting this to local means you intend to run the peon as a standalone process (Not recommended).</td><td>remote</td></tr><tr><td><code>druid.indexer.task.baseDir</code></td><td>Base temporary working directory.</td><td><code>System.getProperty(&quot;java.io.tmpdir&quot;)</code></td></tr><tr><td><code>druid.indexer.task.baseTaskDir</code></td><td>Base temporary working directory for tasks.</td><td><code>${druid.indexer.task.baseDir}/persistent/task</code></td></tr><tr><td><code>druid.indexer.task.batchProcessingMode</code></td><td>Batch ingestion tasks have three operating modes to control construction and tracking for intermediary segments: <code>OPEN_SEGMENTS</code>, <code>CLOSED_SEGMENTS</code>, and <code>CLOSED_SEGMENT_SINKS</code>. <code>OPEN_SEGMENTS</code> uses the streaming ingestion code path and performs a <code>mmap</code> on intermediary segments to build a timeline to make these segments available to realtime queries. Batch ingestion doesn&#x27;t require intermediary segments, so the default mode, <code>CLOSED_SEGMENTS</code>, eliminates <code>mmap</code> of intermediary segments. <code>CLOSED_SEGMENTS</code> mode still tracks the entire set of segments in heap. The <code>CLOSED_SEGMENTS_SINKS</code> mode is the most aggressive configuration and should have the smallest memory footprint. It eliminates in-memory tracking and <code>mmap</code> of intermediary segments produced during segment creation. <code>CLOSED_SEGMENTS_SINKS</code> mode isn&#x27;t as well tested as other modes so is currently considered experimental. You can use <code>OPEN_SEGMENTS</code> mode if problems occur with the 2 newer modes.</td><td><code>CLOSED_SEGMENTS</code></td></tr><tr><td><code>druid.indexer.task.defaultHadoopCoordinates</code></td><td>Hadoop version to use with HadoopIndexTasks that do not request a particular version.</td><td><code>org.apache.hadoop:hadoop-client-api:3.3.6</code>, <code>org.apache.hadoop:hadoop-client-runtime:3.3.6</code></td></tr><tr><td><code>druid.indexer.task.defaultRowFlushBoundary</code></td><td>Highest row count before persisting to disk. Used for indexing generating tasks.</td><td>75000</td></tr><tr><td><code>druid.indexer.task.directoryLockTimeout</code></td><td>Wait this long for zombie peons to exit before giving up on their replacements.</td><td>PT10M</td></tr><tr><td><code>druid.indexer.task.gracefulShutdownTimeout</code></td><td>Wait this long on middleManager restart for restorable tasks to gracefully exit.</td><td>PT5M</td></tr><tr><td><code>druid.indexer.task.hadoopWorkingPath</code></td><td>Temporary working directory for Hadoop tasks.</td><td><code>/tmp/druid-indexing</code></td></tr><tr><td><code>druid.indexer.task.restoreTasksOnRestart</code></td><td>If true, MiddleManagers will attempt to stop tasks gracefully on shutdown and restore them on restart.</td><td>false</td></tr><tr><td><code>druid.indexer.task.ignoreTimestampSpecForDruidInputSource</code></td><td>If true, tasks using the <a href="/docs/28.0.0/ingestion/input-sources">Druid input source</a> will ignore the provided timestampSpec, and will use the <code>__time</code> column of the input datasource. This option is provided for compatibility with ingestion specs written before Druid 0.22.0.</td><td>false</td></tr><tr><td><code>druid.indexer.task.storeEmptyColumns</code></td><td>Boolean value for whether or not to store empty columns during ingestion. When set to true, Druid stores every column specified in the <a href="/docs/28.0.0/ingestion/ingestion-spec#dimensionsspec"><code>dimensionsSpec</code></a>. If you use the string-based schemaless ingestion and don&#x27;t specify any dimensions to ingest, you must also set <a href="/docs/28.0.0/ingestion/ingestion-spec#dimensionsspec"><code>includeAllDimensions</code></a> for Druid to store empty columns.<br><br>If you set <code>storeEmptyColumns</code> to false, Druid SQL queries referencing empty columns will fail. If you intend to leave <code>storeEmptyColumns</code> disabled, you should either ingest placeholder data for empty columns or else not query on empty columns.<br><br>You can overwrite this configuration by setting <code>storeEmptyColumns</code> in the <a href="/docs/28.0.0/ingestion/tasks#context-parameters">task context</a>.</td><td>true</td></tr><tr><td><code>druid.indexer.task.tmpStorageBytesPerTask</code></td><td>Maximum number of bytes per task to be used to store temporary files on disk. This config is generally intended for internal usage. Attempts to set it are very likely to be overwritten by the TaskRunner that executes the task, so be sure of what you expect to happen before directly adjusting this configuration parameter. The config is documented here primarily to provide an understanding of what it means if/when someone sees that it has been set. A value of -1 disables this limit.</td><td>-1</td></tr><tr><td><code>druid.indexer.server.maxChatRequests</code></td><td>Maximum number of concurrent requests served by a task&#x27;s chat handler. Set to 0 to disable limiting.</td><td>0</td></tr></tbody></table><p>If the peon is running in remote mode, there must be an Overlord up and running. Peons in remote mode can set the following configurations:</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.peon.taskActionClient.retry.minWait</code></td><td>The minimum retry time to communicate with Overlord.</td><td>PT5S</td></tr><tr><td><code>druid.peon.taskActionClient.retry.maxWait</code></td><td>The maximum retry time to communicate with Overlord.</td><td>PT1M</td></tr><tr><td><code>druid.peon.taskActionClient.retry.maxRetryCount</code></td><td>The maximum number of retries to communicate with Overlord.</td><td>60</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="segmentwriteoutmediumfactory">SegmentWriteOutMediumFactory<a href="#segmentwriteoutmediumfactory" class="hash-link" aria-label="Direct link to SegmentWriteOutMediumFactory" title="Direct link to SegmentWriteOutMediumFactory"></a></h5><p>When new segments are created, Druid temporarily stores some preprocessed data in some buffers. Currently three types of
<em>medium</em> exist for those buffers: <em>temporary files</em>, <em>off-heap memory</em>, and <em>on-heap memory</em>.</p><p><em>Temporary files</em> (<code>tmpFile</code>) are stored under the task working directory (see <code>druid.worker.baseTaskDirs</code>
configuration above) and thus share it&#x27;s mounting properties, e. g. they could be backed by HDD, SSD or memory (tmpfs).
This type of medium may do unnecessary disk I/O and requires some disk space to be available.</p><p><em>Off-heap memory medium</em> (<code>offHeapMemory</code>) creates buffers in off-heap memory of a JVM process that is running a task.
This type of medium is preferred, but it may require to allow the JVM to have more off-heap memory, by changing
<code>-XX:MaxDirectMemorySize</code> configuration. It is not yet understood how does the required off-heap memory size relates
to the size of the segments being created. But definitely it doesn&#x27;t make sense to add more extra off-heap memory,
than the configured maximum <em>heap</em> size (<code>-Xmx</code>) for the same JVM.</p><p><em>On-heap memory medium</em> (<code>onHeapMemory</code>) creates buffers using the allocated heap memory of the JVM process running a task.
Using on-heap memory introduces garbage collection overhead and so is not recommended in most cases. This type of medium is
most helpful for tasks run on external clusters where it may be difficult to allocate and work with direct memory
effectively.</p><p>For most types of tasks SegmentWriteOutMediumFactory could be configured per-task (see <a href="/docs/28.0.0/ingestion/tasks">Tasks</a>
page, &quot;TuningConfig&quot; section), but if it&#x27;s not specified for a task, or it&#x27;s not supported for a particular task type,
then the value from the configuration below is used:</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.peon.defaultSegmentWriteOutMediumFactory.type</code></td><td><code>tmpFile</code>, <code>offHeapMemory</code>, or <code>onHeapMemory</code>, see explanation above</td><td><code>tmpFile</code></td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="indexer">Indexer<a href="#indexer" class="hash-link" aria-label="Direct link to Indexer" title="Direct link to Indexer"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="indexer-process-configuration">Indexer Process Configuration<a href="#indexer-process-configuration" class="hash-link" aria-label="Direct link to Indexer Process Configuration" title="Direct link to Indexer Process Configuration"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.host</code></td><td>The host for the current process. This is used to advertise the current processes location as reachable from another process and should generally be specified such that <code>http://${druid.host}/</code> could actually talk to this process</td><td>InetAddress.getLocalHost().getCanonicalHostName()</td></tr><tr><td><code>druid.bindOnHost</code></td><td>Indicating whether the process&#x27;s internal jetty server bind on <code>druid.host</code>. Default is false, which means binding to all interfaces.</td><td>false</td></tr><tr><td><code>druid.plaintextPort</code></td><td>This is the port to actually listen on; unless port mapping is used, this will be the same port as is on <code>druid.host</code></td><td>8091</td></tr><tr><td><code>druid.tlsPort</code></td><td>TLS port for HTTPS connector, if <a href="/docs/28.0.0/operations/tls-support">druid.enableTlsPort</a> is set then this config will be used. If <code>druid.host</code> contains port then that port will be ignored. This should be a non-negative Integer.</td><td>8283</td></tr><tr><td><code>druid.service</code></td><td>The name of the service. This is used as a dimension when emitting metrics and alerts to differentiate between the various services</td><td>druid/indexer</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="indexer-general-configuration">Indexer General Configuration<a href="#indexer-general-configuration" class="hash-link" aria-label="Direct link to Indexer General Configuration" title="Direct link to Indexer General Configuration"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.worker.version</code></td><td>Version identifier for the Indexer.</td><td>0</td></tr><tr><td><code>druid.worker.capacity</code></td><td>Maximum number of tasks the Indexer can accept.</td><td>Number of available processors - 1</td></tr><tr><td><code>druid.worker.baseTaskDirs</code></td><td>List of base temporary working directories, one of which is assigned per task in a round-robin fashion. This property can be used to allow usage of multiple disks for indexing. This property is recommended in place of and takes precedence over <code>${druid.indexer.task.baseTaskDir}</code>. If this configuration is not set, <code>${druid.indexer.task.baseTaskDir}</code> is used. Example: <code>druid.worker.baseTaskDirs=[\&quot;PATH1\&quot;,\&quot;PATH2\&quot;,...]</code>.</td><td>null</td></tr><tr><td><code>druid.worker.baseTaskDirSize</code></td><td>The total amount of bytes that can be used by tasks on any single task dir. This value is treated symmetrically across all directories, that is, if this is 500 GB and there are 3 <code>baseTaskDirs</code>, then each of those task directories is assumed to allow for 500 GB to be used and a total of 1.5 TB will potentially be available across all tasks. The actual amount of memory assigned to each task is discussed in <a href="/docs/28.0.0/ingestion/tasks#configuring-task-storage-sizes">Configuring task storage sizes</a></td><td><code>Long.MAX_VALUE</code></td></tr><tr><td><code>druid.worker.globalIngestionHeapLimitBytes</code></td><td>Total amount of heap available for ingestion processing. This is applied by automatically setting the <code>maxBytesInMemory</code> property on tasks.</td><td>60% of configured JVM heap</td></tr><tr><td><code>druid.worker.numConcurrentMerges</code></td><td>Maximum number of segment persist or merge operations that can run concurrently across all tasks.</td><td><code>druid.worker.capacity</code> / 2, rounded down</td></tr><tr><td><code>druid.indexer.task.baseDir</code></td><td>Base temporary working directory.</td><td><code>System.getProperty(&quot;java.io.tmpdir&quot;)</code></td></tr><tr><td><code>druid.indexer.task.baseTaskDir</code></td><td>Base temporary working directory for tasks.</td><td><code>${druid.indexer.task.baseDir}/persistent/tasks</code></td></tr><tr><td><code>druid.indexer.task.defaultHadoopCoordinates</code></td><td>Hadoop version to use with HadoopIndexTasks that do not request a particular version.</td><td><code>org.apache.hadoop:hadoop-client-api:3.3.6</code>, <code>org.apache.hadoop:hadoop-client-runtime:3.3.6</code></td></tr><tr><td><code>druid.indexer.task.gracefulShutdownTimeout</code></td><td>Wait this long on Indexer restart for restorable tasks to gracefully exit.</td><td>PT5M</td></tr><tr><td><code>druid.indexer.task.hadoopWorkingPath</code></td><td>Temporary working directory for Hadoop tasks.</td><td><code>/tmp/druid-indexing</code></td></tr><tr><td><code>druid.indexer.task.restoreTasksOnRestart</code></td><td>If true, the Indexer will attempt to stop tasks gracefully on shutdown and restore them on restart.</td><td>false</td></tr><tr><td><code>druid.indexer.task.ignoreTimestampSpecForDruidInputSource</code></td><td>If true, tasks using the <a href="/docs/28.0.0/ingestion/input-sources">Druid input source</a> will ignore the provided timestampSpec, and will use the <code>__time</code> column of the input datasource. This option is provided for compatibility with ingestion specs written before Druid 0.22.0.</td><td>false</td></tr><tr><td><code>druid.indexer.task.storeEmptyColumns</code></td><td>Boolean value for whether or not to store empty columns during ingestion. When set to true, Druid stores every column specified in the <a href="/docs/28.0.0/ingestion/ingestion-spec#dimensionsspec"><code>dimensionsSpec</code></a>. <br><br>If you set <code>storeEmptyColumns</code> to false, Druid SQL queries referencing empty columns will fail. If you intend to leave <code>storeEmptyColumns</code> disabled, you should either ingest placeholder data for empty columns or else not query on empty columns.<br><br>You can overwrite this configuration by setting <code>storeEmptyColumns</code> in the <a href="/docs/28.0.0/ingestion/tasks#context-parameters">task context</a>.</td><td>true</td></tr><tr><td><code>druid.peon.taskActionClient.retry.maxWait</code></td><td>The maximum retry time to communicate with Overlord.</td><td>PT1M</td></tr><tr><td><code>druid.peon.taskActionClient.retry.maxRetryCount</code></td><td>The maximum number of retries to communicate with Overlord.</td><td>60</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="indexer-concurrent-requests">Indexer Concurrent Requests<a href="#indexer-concurrent-requests" class="hash-link" aria-label="Direct link to Indexer Concurrent Requests" title="Direct link to Indexer Concurrent Requests"></a></h4><p>Druid uses Jetty to serve HTTP requests.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.server.http.numThreads</code></td><td>Number of threads for HTTP requests. Please see the <a href="/docs/28.0.0/design/indexer#server-http-threads">Indexer Server HTTP threads</a> documentation for more details on how the Indexer uses this configuration.</td><td>max(10, (Number of cores * 17) / 16 + 2) + 30</td></tr><tr><td><code>druid.server.http.queueSize</code></td><td>Size of the worker queue used by Jetty server to temporarily store incoming client connections. If this value is set and a request is rejected by jetty because queue is full then client would observe request failure with TCP connection being closed immediately with a completely empty response from server.</td><td>Unbounded</td></tr><tr><td><code>druid.server.http.maxIdleTime</code></td><td>The Jetty max idle time for a connection.</td><td>PT5M</td></tr><tr><td><code>druid.server.http.enableRequestLimit</code></td><td>If enabled, no requests would be queued in jetty queue and &quot;HTTP 429 Too Many Requests&quot; error response would be sent.</td><td>false</td></tr><tr><td><code>druid.server.http.defaultQueryTimeout</code></td><td>Query timeout in millis, beyond which unfinished queries will be cancelled</td><td>300000</td></tr><tr><td><code>druid.server.http.gracefulShutdownTimeout</code></td><td>The maximum amount of time Jetty waits after receiving shutdown signal. After this timeout the threads will be forcefully shutdown. This allows any queries that are executing to complete(Only values greater than zero are valid).</td><td><code>PT30S</code></td></tr><tr><td><code>druid.server.http.unannouncePropagationDelay</code></td><td>How long to wait for ZooKeeper unannouncements to propagate before shutting down Jetty. This is a minimum and <code>druid.server.http.gracefulShutdownTimeout</code> does not start counting down until after this period elapses.</td><td><code>PT0S</code> (do not wait)</td></tr><tr><td><code>druid.server.http.maxQueryTimeout</code></td><td>Maximum allowed value (in milliseconds) for <code>timeout</code> parameter. See <a href="/docs/28.0.0/querying/query-context">query-context</a> to know more about <code>timeout</code>. Query is rejected if the query context <code>timeout</code> is greater than this value.</td><td>Long.MAX_VALUE</td></tr><tr><td><code>druid.server.http.maxRequestHeaderSize</code></td><td>Maximum size of a request header in bytes. Larger headers consume more memory and can make a server more vulnerable to denial of service attacks.</td><td>8 * 1024</td></tr><tr><td><code>druid.server.http.enableForwardedRequestCustomizer</code></td><td>If enabled, adds Jetty ForwardedRequestCustomizer which reads X-Forwarded-* request headers to manipulate servlet request object when Druid is used behind a proxy.</td><td>false</td></tr><tr><td><code>druid.server.http.allowedHttpMethods</code></td><td>List of HTTP methods that should be allowed in addition to the ones required by Druid APIs. Druid APIs require GET, PUT, POST, and DELETE, which are always allowed. This option is not useful unless you have installed an extension that needs these additional HTTP methods or that adds functionality related to CORS. None of Druid&#x27;s bundled extensions require these methods.</td><td>[]</td></tr><tr><td><code>druid.server.http.contentSecurityPolicy</code></td><td>Content-Security-Policy header value to set on each non-POST response. Setting this property to an empty string, or omitting it, both result in the default <code>frame-ancestors: none</code> being set.</td><td><code>frame-ancestors &#x27;none&#x27;</code></td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="indexer-processing-resources">Indexer Processing Resources<a href="#indexer-processing-resources" class="hash-link" aria-label="Direct link to Indexer Processing Resources" title="Direct link to Indexer Processing Resources"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.processing.buffer.sizeBytes</code></td><td>This specifies a buffer size (less than 2GiB) for the storage of intermediate results. The computation engine in the Indexer processes will use a scratch buffer of this size to do all of their intermediate computations off-heap. Larger values allow for more aggregations in a single pass over the data while smaller values can require more passes depending on the query that is being executed. <a href="/docs/28.0.0/configuration/human-readable-byte">Human-readable format</a> is supported.</td><td>auto (max 1GiB)</td></tr><tr><td><code>druid.processing.buffer.poolCacheMaxCount</code></td><td>processing buffer pool caches the buffers for later use, this is the maximum count cache will grow to. note that pool can create more buffers than it can cache if necessary.</td><td>Integer.MAX_VALUE</td></tr><tr><td><code>druid.processing.formatString</code></td><td>Indexer processes use this format string to name their processing threads.</td><td>processing-%s</td></tr><tr><td><code>druid.processing.numMergeBuffers</code></td><td>The number of direct memory buffers available for merging query results. The buffers are sized by <code>druid.processing.buffer.sizeBytes</code>. This property is effectively a concurrency limit for queries that require merging buffers. If you are using any queries that require merge buffers (currently, just groupBy) then you should have at least two of these.</td><td><code>max(2, druid.processing.numThreads / 4)</code></td></tr><tr><td><code>druid.processing.numThreads</code></td><td>The number of processing threads to have available for parallel processing of segments. Our rule of thumb is <code>num_cores - 1</code>, which means that even under heavy load there will still be one core available to do background tasks like talking with ZooKeeper and pulling down segments. If only one core is available, this property defaults to the value <code>1</code>.</td><td>Number of cores - 1 (or 1)</td></tr><tr><td><code>druid.processing.fifo</code></td><td>If the processing queue should treat tasks of equal priority in a FIFO manner</td><td><code>true</code></td></tr><tr><td><code>druid.processing.tmpDir</code></td><td>Path where temporary files created while processing a query should be stored. If specified, this configuration takes priority over the default <code>java.io.tmpdir</code> path.</td><td>path represented by <code>java.io.tmpdir</code></td></tr></tbody></table><p>The amount of direct memory needed by Druid is at least
<code>druid.processing.buffer.sizeBytes * (druid.processing.numMergeBuffers + druid.processing.numThreads + 1)</code>. You can
ensure at least this amount of direct memory is available by providing <code>-XX:MaxDirectMemorySize=&lt;VALUE&gt;</code> at the command
line.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="query-configurations">Query Configurations<a href="#query-configurations" class="hash-link" aria-label="Direct link to Query Configurations" title="Direct link to Query Configurations"></a></h4><p>See <a href="#general-query-configuration">general query configuration</a>.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="indexer-caching">Indexer Caching<a href="#indexer-caching" class="hash-link" aria-label="Direct link to Indexer Caching" title="Direct link to Indexer Caching"></a></h4><p>You can optionally configure caching to be enabled on the Indexer by setting caching configs here.</p><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.realtime.cache.useCache</code></td><td>true, false</td><td>Enable the cache on the realtime.</td><td>false</td></tr><tr><td><code>druid.realtime.cache.populateCache</code></td><td>true, false</td><td>Populate the cache on the realtime.</td><td>false</td></tr><tr><td><code>druid.realtime.cache.unCacheable</code></td><td>All druid query types</td><td>All query types to not cache.</td><td><code>[]</code></td></tr><tr><td><code>druid.realtime.cache.maxEntrySize</code></td><td>positive integer</td><td>Maximum cache entry size in bytes.</td><td>1_000_000</td></tr></tbody></table><p>See <a href="#cache-configuration">cache configuration</a> for how to configure cache settings.</p><p>Note that only local caches such as the <code>local</code>-type cache and <code>caffeine</code> cache are supported. If a remote cache such as <code>memcached</code> is used, it will be ignored.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="historical">Historical<a href="#historical" class="hash-link" aria-label="Direct link to Historical" title="Direct link to Historical"></a></h3><p>For general Historical Process information, see <a href="/docs/28.0.0/design/historical">here</a>.</p><p>These Historical configurations can be defined in the <code>historical/runtime.properties</code> file.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="historical-process-configuration">Historical Process Configuration<a href="#historical-process-configuration" class="hash-link" aria-label="Direct link to Historical Process Configuration" title="Direct link to Historical Process Configuration"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.host</code></td><td>The host for the current process. This is used to advertise the current processes location as reachable from another process and should generally be specified such that <code>http://${druid.host}/</code> could actually talk to this process</td><td>InetAddress.getLocalHost().getCanonicalHostName()</td></tr><tr><td><code>druid.bindOnHost</code></td><td>Indicating whether the process&#x27;s internal jetty server bind on <code>druid.host</code>. Default is false, which means binding to all interfaces.</td><td>false</td></tr><tr><td><code>druid.plaintextPort</code></td><td>This is the port to actually listen on; unless port mapping is used, this will be the same port as is on <code>druid.host</code></td><td>8083</td></tr><tr><td><code>druid.tlsPort</code></td><td>TLS port for HTTPS connector, if <a href="/docs/28.0.0/operations/tls-support">druid.enableTlsPort</a> is set then this config will be used. If <code>druid.host</code> contains port then that port will be ignored. This should be a non-negative Integer.</td><td>8283</td></tr><tr><td><code>druid.service</code></td><td>The name of the service. This is used as a dimension when emitting metrics and alerts to differentiate between the various services</td><td>druid/historical</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="historical-general-configuration">Historical General Configuration<a href="#historical-general-configuration" class="hash-link" aria-label="Direct link to Historical General Configuration" title="Direct link to Historical General Configuration"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.server.maxSize</code></td><td>The maximum number of bytes-worth of segments that the process wants assigned to it. The Coordinator process will attempt to assign segments to a Historical process only if this property is greater than the total size of segments served by it. Since this property defines the upper limit on the total segment size that can be assigned to a Historical, it is defaulted to the sum of all <code>maxSize</code> values specified within <code>druid.segmentCache.locations</code> property. Human-readable format is supported, see <a href="/docs/28.0.0/configuration/human-readable-byte">here</a>.</td><td>Sum of <code>maxSize</code> values defined within <code>druid.segmentCache.locations</code></td></tr><tr><td><code>druid.server.tier</code></td><td>A string to name the distribution tier that the storage process belongs to. Many of the <a href="/docs/28.0.0/operations/rule-configuration">rules Coordinator processes use</a> to manage segments can be keyed on tiers.</td><td><code>_default_tier</code></td></tr><tr><td><code>druid.server.priority</code></td><td>In a tiered architecture, the priority of the tier, thus allowing control over which processes are queried. Higher numbers mean higher priority. The default (no priority) works for architecture with no cross replication (tiers that have no data-storage overlap). Data centers typically have equal priority.</td><td>0</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="storing-segments">Storing Segments<a href="#storing-segments" class="hash-link" aria-label="Direct link to Storing Segments" title="Direct link to Storing Segments"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.segmentCache.locations</code></td><td>Segments assigned to a Historical process are first stored on the local file system (in a disk cache) and then served by the Historical process. These locations define where that local cache resides. This value cannot be NULL or EMPTY. Here is an example <code>druid.segmentCache.locations=[{&quot;path&quot;: &quot;/mnt/druidSegments&quot;, &quot;maxSize&quot;: &quot;10k&quot;, &quot;freeSpacePercent&quot;: 1.0}]</code>. &quot;freeSpacePercent&quot; is optional, if provided then enforces that much of free disk partition space while storing segments. But, it depends on File.getTotalSpace() and File.getFreeSpace() methods, so enable if only if they work for your File System.</td><td>none</td></tr><tr><td><code>druid.segmentCache.locationSelector.strategy</code></td><td>The strategy used to select a location from the configured <code>druid.segmentCache.locations</code> for segment distribution. Possible values are <code>leastBytesUsed</code>, <code>roundRobin</code>, <code>random</code>, or <code>mostAvailableSize</code>.</td><td>leastBytesUsed</td></tr><tr><td><code>druid.segmentCache.deleteOnRemove</code></td><td>Delete segment files from cache once a process is no longer serving a segment.</td><td>true</td></tr><tr><td><code>druid.segmentCache.dropSegmentDelayMillis</code></td><td>How long a process delays before completely dropping segment.</td><td>30000 (30 seconds)</td></tr><tr><td><code>druid.segmentCache.infoDir</code></td><td>Historical processes keep track of the segments they are serving so that when the process is restarted they can reload the same segments without waiting for the Coordinator to reassign. This path defines where this metadata is kept. Directory will be created if needed.</td><td>${first_location}/info_dir</td></tr><tr><td><code>druid.segmentCache.announceIntervalMillis</code></td><td>How frequently to announce segments while segments are loading from cache. Set this value to zero to wait for all segments to be loaded before announcing.</td><td>5000 (5 seconds)</td></tr><tr><td><code>druid.segmentCache.numLoadingThreads</code></td><td>How many segments to drop or load concurrently from deep storage. Note that the work of loading segments involves downloading segments from deep storage, decompressing them and loading them to a memory mapped location. So the work is not all I/O Bound. Depending on CPU and network load, one could possibly increase this config to a higher value.</td><td>max(1,Number of cores / 6)</td></tr><tr><td><code>druid.segmentCache.numBootstrapThreads</code></td><td>How many segments to load concurrently during historical startup.</td><td><code>druid.segmentCache.numLoadingThreads</code></td></tr><tr><td><code>druid.segmentCache.lazyLoadOnStart</code></td><td>Whether or not to load segment columns metadata lazily during historical startup. When set to true, Historical startup time will be dramatically improved by deferring segment loading until the first time that segment takes part in a query, which will incur this cost instead.</td><td>false</td></tr><tr><td><code>druid.coordinator.loadqueuepeon.curator.numCallbackThreads</code></td><td>Number of threads for executing callback actions associated with loading or dropping of segments. One might want to increase this number when noticing clusters are lagging behind w.r.t. balancing segments across historical nodes.</td><td>2</td></tr><tr><td><code>druid.segmentCache.numThreadsToLoadSegmentsIntoPageCacheOnDownload</code></td><td>Number of threads to asynchronously read segment index files into null output stream on each new segment download after the historical process finishes bootstrapping. Recommended to set to 1 or 2 or leave unspecified to disable. See also <code>druid.segmentCache.numThreadsToLoadSegmentsIntoPageCacheOnBootstrap</code></td><td>0</td></tr><tr><td><code>druid.segmentCache.numThreadsToLoadSegmentsIntoPageCacheOnBootstrap</code></td><td>Number of threads to asynchronously read segment index files into null output stream during historical process bootstrap. This thread pool is terminated after historical process finishes bootstrapping. Recommended to set to half of available cores. If left unspecified, <code>druid.segmentCache.numThreadsToLoadSegmentsIntoPageCacheOnDownload</code> will be used. If both configs are unspecified, this feature is disabled. Preemptively loading segments into page cache helps in the sense that later when a segment is queried, it&#x27;s already in page cache and only a minor page fault needs to be triggered instead of a more costly major page fault to make the query latency more consistent. Note that loading segment into page cache just does a blind loading of segment index files and will evict any existing segments from page cache at the discretion of operating system when the total segment size on local disk is larger than the page cache usable in the RAM, which roughly equals to total available RAM in the host - druid process memory including both heap and direct memory allocated - memory used by other non druid processes on the host, so it is the user&#x27;s responsibility to ensure the host has enough RAM to host all the segments to avoid random evictions to fully leverage this feature.</td><td><code>druid.segmentCache.numThreadsToLoadSegmentsIntoPageCacheOnDownload</code></td></tr></tbody></table><p>In <code>druid.segmentCache.locations</code>, <em>freeSpacePercent</em> was added because <em>maxSize</em> setting is only a theoretical limit and assumes that much space will always be available for storing segments. In case of any druid bug leading to unaccounted segment files left alone on disk or some other process writing stuff to disk, This check can start failing segment loading early before filling up the disk completely and leaving the host usable otherwise.</p><p>In <code>druid.segmentCache.locationSelector.strategy</code>, one of <code>leastBytesUsed</code>, <code>roundRobin</code>, <code>random</code>, or <code>mostAvailableSize</code> could be specified to represent the strategy to distribute segments across multiple segment cache locations.</p><table><thead><tr><th>Strategy</th><th>Description</th></tr></thead><tbody><tr><td><code>leastBytesUsed</code></td><td>selects a location which has least bytes used in absolute terms.</td></tr><tr><td><code>roundRobin</code></td><td>selects a location in a round robin fashion oblivious to the bytes used or the capacity.</td></tr><tr><td><code>random</code></td><td>selects a segment cache location randomly each time among the available storage locations.</td></tr><tr><td><code>mostAvailableSize</code></td><td>selects a segment cache location that has most free space among the available storage locations.</td></tr></tbody></table><p>Note that if <code>druid.segmentCache.numLoadingThreads</code> &gt; 1, multiple threads can download different segments at the same time. In this case, with the leastBytesUsed strategy or mostAvailableSize strategy, historicals may select a sub-optimal storage location because each decision is based on a snapshot of the storage location status of when a segment is requested to download.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="historical-query-configs">Historical query configs<a href="#historical-query-configs" class="hash-link" aria-label="Direct link to Historical query configs" title="Direct link to Historical query configs"></a></h4><h5 class="anchor anchorWithStickyNavbar_LWe7" id="concurrent-requests">Concurrent Requests<a href="#concurrent-requests" class="hash-link" aria-label="Direct link to Concurrent Requests" title="Direct link to Concurrent Requests"></a></h5><p>Druid uses Jetty to serve HTTP requests.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.server.http.numThreads</code></td><td>Number of threads for HTTP requests.</td><td>max(10, (Number of cores * 17) / 16 + 2) + 30</td></tr><tr><td><code>druid.server.http.queueSize</code></td><td>Size of the worker queue used by Jetty server to temporarily store incoming client connections. If this value is set and a request is rejected by jetty because queue is full then client would observe request failure with TCP connection being closed immediately with a completely empty response from server.</td><td>Unbounded</td></tr><tr><td><code>druid.server.http.maxIdleTime</code></td><td>The Jetty max idle time for a connection.</td><td>PT5M</td></tr><tr><td><code>druid.server.http.enableRequestLimit</code></td><td>If enabled, no requests would be queued in jetty queue and &quot;HTTP 429 Too Many Requests&quot; error response would be sent.</td><td>false</td></tr><tr><td><code>druid.server.http.defaultQueryTimeout</code></td><td>Query timeout in millis, beyond which unfinished queries will be cancelled</td><td>300000</td></tr><tr><td><code>druid.server.http.gracefulShutdownTimeout</code></td><td>The maximum amount of time Jetty waits after receiving shutdown signal. After this timeout the threads will be forcefully shutdown. This allows any queries that are executing to complete(Only values greater than zero are valid).</td><td><code>PT30S</code></td></tr><tr><td><code>druid.server.http.unannouncePropagationDelay</code></td><td>How long to wait for ZooKeeper unannouncements to propagate before shutting down Jetty. This is a minimum and <code>druid.server.http.gracefulShutdownTimeout</code> does not start counting down until after this period elapses.</td><td><code>PT0S</code> (do not wait)</td></tr><tr><td><code>druid.server.http.maxQueryTimeout</code></td><td>Maximum allowed value (in milliseconds) for <code>timeout</code> parameter. See <a href="/docs/28.0.0/querying/query-context">query-context</a> to know more about <code>timeout</code>. Query is rejected if the query context <code>timeout</code> is greater than this value.</td><td>Long.MAX_VALUE</td></tr><tr><td><code>druid.server.http.maxRequestHeaderSize</code></td><td>Maximum size of a request header in bytes. Larger headers consume more memory and can make a server more vulnerable to denial of service attacks.</td><td>8 * 1024</td></tr><tr><td><code>druid.server.http.contentSecurityPolicy</code></td><td>Content-Security-Policy header value to set on each non-POST response. Setting this property to an empty string, or omitting it, both result in the default <code>frame-ancestors: none</code> being set.</td><td><code>frame-ancestors &#x27;none&#x27;</code></td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="processing">Processing<a href="#processing" class="hash-link" aria-label="Direct link to Processing" title="Direct link to Processing"></a></h5><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.processing.buffer.sizeBytes</code></td><td>This specifies a buffer size (less than 2GiB), for the storage of intermediate results. The computation engine in both the Historical and Realtime processes will use a scratch buffer of this size to do all of their intermediate computations off-heap. Larger values allow for more aggregations in a single pass over the data while smaller values can require more passes depending on the query that is being executed. <a href="/docs/28.0.0/configuration/human-readable-byte">Human-readable format</a> is supported.</td><td>auto (max 1GiB)</td></tr><tr><td><code>druid.processing.buffer.poolCacheMaxCount</code></td><td>processing buffer pool caches the buffers for later use, this is the maximum count cache will grow to. note that pool can create more buffers than it can cache if necessary.</td><td>Integer.MAX_VALUE</td></tr><tr><td><code>druid.processing.formatString</code></td><td>Realtime and Historical processes use this format string to name their processing threads.</td><td>processing-%s</td></tr><tr><td><code>druid.processing.numMergeBuffers</code></td><td>The number of direct memory buffers available for merging query results. The buffers are sized by <code>druid.processing.buffer.sizeBytes</code>. This property is effectively a concurrency limit for queries that require merging buffers. If you are using any queries that require merge buffers (currently, just groupBy) then you should have at least two of these.</td><td><code>max(2, druid.processing.numThreads / 4)</code></td></tr><tr><td><code>druid.processing.numThreads</code></td><td>The number of processing threads to have available for parallel processing of segments. Our rule of thumb is <code>num_cores - 1</code>, which means that even under heavy load there will still be one core available to do background tasks like talking with ZooKeeper and pulling down segments. If only one core is available, this property defaults to the value <code>1</code>.</td><td>Number of cores - 1 (or 1)</td></tr><tr><td><code>druid.processing.fifo</code></td><td>If the processing queue should treat tasks of equal priority in a FIFO manner</td><td><code>true</code></td></tr><tr><td><code>druid.processing.tmpDir</code></td><td>Path where temporary files created while processing a query should be stored. If specified, this configuration takes priority over the default <code>java.io.tmpdir</code> path.</td><td>path represented by <code>java.io.tmpdir</code></td></tr></tbody></table><p>The amount of direct memory needed by Druid is at least
<code>druid.processing.buffer.sizeBytes * (druid.processing.numMergeBuffers + druid.processing.numThreads + 1)</code>. You can
ensure at least this amount of direct memory is available by providing <code>-XX:MaxDirectMemorySize=&lt;VALUE&gt;</code> at the command
line.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="historical-query-configuration">Historical query configuration<a href="#historical-query-configuration" class="hash-link" aria-label="Direct link to Historical query configuration" title="Direct link to Historical query configuration"></a></h5><p>See <a href="#general-query-configuration">general query configuration</a>.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="historical-caching">Historical Caching<a href="#historical-caching" class="hash-link" aria-label="Direct link to Historical Caching" title="Direct link to Historical Caching"></a></h4><p>You can optionally only configure caching to be enabled on the Historical by setting caching configs here.</p><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.historical.cache.useCache</code></td><td>true, false</td><td>Enable the cache on the Historical.</td><td>false</td></tr><tr><td><code>druid.historical.cache.populateCache</code></td><td>true, false</td><td>Populate the cache on the Historical.</td><td>false</td></tr><tr><td><code>druid.historical.cache.unCacheable</code></td><td>All druid query types</td><td>All query types to not cache.</td><td><code>[]</code></td></tr><tr><td><code>druid.historical.cache.maxEntrySize</code></td><td>positive integer</td><td>Maximum cache entry size in bytes.</td><td>1_000_000</td></tr></tbody></table><p>See <a href="#cache-configuration">cache configuration</a> for how to configure cache settings.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="query-server">Query Server<a href="#query-server" class="hash-link" aria-label="Direct link to Query Server" title="Direct link to Query Server"></a></h2><p>This section contains the configuration options for the processes that reside on Query servers (Brokers) in the suggested <a href="/docs/28.0.0/design/processes#server-types">three-server configuration</a>.</p><p>Configuration options for the experimental <a href="/docs/28.0.0/design/router">Router process</a> are also provided here.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="broker">Broker<a href="#broker" class="hash-link" aria-label="Direct link to Broker" title="Direct link to Broker"></a></h3><p>For general Broker process information, see <a href="/docs/28.0.0/design/broker">here</a>.</p><p>These Broker configurations can be defined in the <code>broker/runtime.properties</code> file.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="broker-process-configs">Broker Process Configs<a href="#broker-process-configs" class="hash-link" aria-label="Direct link to Broker Process Configs" title="Direct link to Broker Process Configs"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.host</code></td><td>The host for the current process. This is used to advertise the current processes location as reachable from another process and should generally be specified such that <code>http://${druid.host}/</code> could actually talk to this process</td><td>InetAddress.getLocalHost().getCanonicalHostName()</td></tr><tr><td><code>druid.bindOnHost</code></td><td>Indicating whether the process&#x27;s internal jetty server bind on <code>druid.host</code>. Default is false, which means binding to all interfaces.</td><td>false</td></tr><tr><td><code>druid.plaintextPort</code></td><td>This is the port to actually listen on; unless port mapping is used, this will be the same port as is on <code>druid.host</code></td><td>8082</td></tr><tr><td><code>druid.tlsPort</code></td><td>TLS port for HTTPS connector, if <a href="/docs/28.0.0/operations/tls-support">druid.enableTlsPort</a> is set then this config will be used. If <code>druid.host</code> contains port then that port will be ignored. This should be a non-negative Integer.</td><td>8282</td></tr><tr><td><code>druid.service</code></td><td>The name of the service. This is used as a dimension when emitting metrics and alerts to differentiate between the various services</td><td>druid/broker</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="query-configuration">Query configuration<a href="#query-configuration" class="hash-link" aria-label="Direct link to Query configuration" title="Direct link to Query configuration"></a></h4><h5 class="anchor anchorWithStickyNavbar_LWe7" id="query-routing">Query routing<a href="#query-routing" class="hash-link" aria-label="Direct link to Query routing" title="Direct link to Query routing"></a></h5><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.broker.balancer.type</code></td><td><code>random</code>, <code>connectionCount</code></td><td>Determines how the broker balances connections to Historical processes. <code>random</code> choose randomly, <code>connectionCount</code> picks the process with the fewest number of active connections to</td><td><code>random</code></td></tr><tr><td><code>druid.broker.select.tier</code></td><td><code>highestPriority</code>, <code>lowestPriority</code>, <code>custom</code></td><td>If segments are cross-replicated across tiers in a cluster, you can tell the broker to prefer to select segments in a tier with a certain priority.</td><td><code>highestPriority</code></td></tr><tr><td><code>druid.broker.select.tier.custom.priorities</code></td><td><code>An array of integer priorities.</code> E.g., <code>[-1, 0, 1, 2]</code></td><td>Select servers in tiers with a custom priority list.</td><td>The config only has effect if <code>druid.broker.select.tier</code> is set to <code>custom</code>. If <code>druid.broker.select.tier</code> is set to <code>custom</code> but this config is not specified, the effect is the same as <code>druid.broker.select.tier</code> set to <code>highestPriority</code>. Any of the integers in this config can be ignored if there&#x27;s no corresponding tiers with such priorities. Tiers with priorities explicitly specified in this config always have higher priority than those not and those not specified fall back to use <code>highestPriority</code> strategy among themselves.</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="query-prioritization-and-laning">Query prioritization and laning<a href="#query-prioritization-and-laning" class="hash-link" aria-label="Direct link to Query prioritization and laning" title="Direct link to Query prioritization and laning"></a></h5><p><em>Laning strategies</em> allow you to control capacity utilization for heterogeneous query workloads. With laning, the broker examines and classifies a query for the purpose of assigning it to a &#x27;lane&#x27;. Lanes have capacity limits, enforced by the broker, that can be used to ensure sufficient resources are available for other lanes or for interactive queries (with no lane), or to limit overall throughput for queries within the lane. Requests in excess of the capacity are discarded with an HTTP 429 status code.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.query.scheduler.numThreads</code></td><td>Maximum number of concurrently-running queries. When this parameter is set lower than <code>druid.server.http.numThreads</code>, query requests beyond the limit are denied with HTTP 429 instead of waiting in the Jetty request queue. This has the effect of reserving the leftover Jetty threads for non-query requests.<br><br>When this parameter is set equal to or higher than <code>druid.server.http.numThreads</code>, it has no effect.</td><td>Unbounded</td></tr><tr><td><code>druid.query.scheduler.laning.strategy</code></td><td>Query laning strategy to use to assign queries to a lane in order to control capacities for certain classes of queries.</td><td><code>none</code></td></tr><tr><td><code>druid.query.scheduler.prioritization.strategy</code></td><td>Query prioritization strategy to automatically assign priorities.</td><td><code>manual</code></td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="prioritization-strategies">Prioritization strategies<a href="#prioritization-strategies" class="hash-link" aria-label="Direct link to Prioritization strategies" title="Direct link to Prioritization strategies"></a></h5><h6 class="anchor anchorWithStickyNavbar_LWe7" id="manual-prioritization-strategy">Manual prioritization strategy<a href="#manual-prioritization-strategy" class="hash-link" aria-label="Direct link to Manual prioritization strategy" title="Direct link to Manual prioritization strategy"></a></h6><p>With this configuration, queries are never assigned a priority automatically, but will preserve a priority manually set on the <a href="/docs/28.0.0/querying/query-context">query context</a> with the <code>priority</code> key. This mode can be explicitly set by setting <code>druid.query.scheduler.prioritization.strategy</code> to <code>manual</code>.</p><h6 class="anchor anchorWithStickyNavbar_LWe7" id="threshold-prioritization-strategy">Threshold prioritization strategy<a href="#threshold-prioritization-strategy" class="hash-link" aria-label="Direct link to Threshold prioritization strategy" title="Direct link to Threshold prioritization strategy"></a></h6><p>This prioritization strategy lowers the priority of queries that cross any of a configurable set of thresholds, such as how far in the past the data is, how large of an interval a query covers, or the number of segments taking part in a query.</p><p>This strategy can be enabled by setting <code>druid.query.scheduler.prioritization.strategy</code> to <code>threshold</code>.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.query.scheduler.prioritization.periodThreshold</code></td><td>ISO duration threshold for how old data can be queried before automatically adjusting query priority.</td><td>None</td></tr><tr><td><code>druid.query.scheduler.prioritization.durationThreshold</code></td><td>ISO duration threshold for maximum duration a queries interval can span before the priority is automatically adjusted.</td><td>None</td></tr><tr><td><code>druid.query.scheduler.prioritization.segmentCountThreshold</code></td><td>Number threshold for maximum number of segments that can take part in a query before its priority is automatically adjusted.</td><td>None</td></tr><tr><td><code>druid.query.scheduler.prioritization.adjustment</code></td><td>Amount to reduce the priority of queries which cross any threshold.</td><td>None</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="laning-strategies">Laning strategies<a href="#laning-strategies" class="hash-link" aria-label="Direct link to Laning strategies" title="Direct link to Laning strategies"></a></h5><h6 class="anchor anchorWithStickyNavbar_LWe7" id="no-laning-strategy">No laning strategy<a href="#no-laning-strategy" class="hash-link" aria-label="Direct link to No laning strategy" title="Direct link to No laning strategy"></a></h6><p>In this mode, queries are never assigned a lane, and the concurrent query count will only be limited by <code>druid.server.http.numThreads</code> or <code>druid.query.scheduler.numThreads</code>, if set. This is the default Druid query scheduler operating mode. Enable this strategy explicitly by setting <code>druid.query.scheduler.laning.strategy</code> to <code>none</code>.</p><h6 class="anchor anchorWithStickyNavbar_LWe7" id="highlow-laning-strategy">&#x27;High/Low&#x27; laning strategy<a href="#highlow-laning-strategy" class="hash-link" aria-label="Direct link to &#x27;High/Low&#x27; laning strategy" title="Direct link to &#x27;High/Low&#x27; laning strategy"></a></h6><p>This laning strategy splits queries with a <code>priority</code> below zero into a <code>low</code> query lane, automatically. Queries with priority of zero (the default) or above are considered &#x27;interactive&#x27;. The limit on <code>low</code> queries can be set to some desired percentage of the total capacity (or HTTP thread pool size), reserving capacity for interactive queries. Queries in the <code>low</code> lane are <em>not</em> guaranteed their capacity, which may be consumed by interactive queries, but may use up to this limit if total capacity is available.</p><p>If the <code>low</code> lane is specified in the <a href="/docs/28.0.0/querying/query-context">query context</a> <code>lane</code> parameter, this will override the computed lane.</p><p>This strategy can be enabled by setting <code>druid.query.scheduler.laning.strategy=hilo</code>.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.query.scheduler.laning.maxLowPercent</code></td><td>Maximum percent of the smaller number of <code>druid.server.http.numThreads</code> or <code>druid.query.scheduler.numThreads</code>, defining the number of HTTP threads that can be used by queries with a priority lower than 0. Value must be an integer in the range 1 to 100, and will be rounded up</td><td>No default, must be set if using this mode</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="guardrails-for-materialization-of-subqueries">Guardrails for materialization of subqueries<a href="#guardrails-for-materialization-of-subqueries" class="hash-link" aria-label="Direct link to Guardrails for materialization of subqueries" title="Direct link to Guardrails for materialization of subqueries"></a></h5><p>Druid stores the subquery rows in temporary tables that live in the Java heap. It is a good practice to avoid large subqueries in Druid.
Therefore, there are guardrails that are built in Druid to prevent the queries from generating subquery results which can exhaust the heap
space. They can be set on a cluster level or modified per query level as desired.
Note the following guardrails that can be set by the cluster admin to limit the subquery results:</p><ol><li><code>druid.server.http.maxSubqueryRows</code> in broker&#x27;s config to set a default for the entire cluster or <code>maxSubqueryRows</code> in the query context to set an upper limit on the number of rows a subquery can generate</li><li><code>druid.server.http.maxSubqueryBytes</code> in broker&#x27;s config to set a default for the entire cluster or <code>maxSubqueryBytes</code> in the query context to set an upper limit on the number of bytes a subquery can generate</li></ol><p>Note that limiting the subquery by bytes is a newer feature therefore it is experimental as it materializes the results differently.</p><p><code>maxSubqueryBytes</code> can be configured to the following values:</p><ol><li>&#x27;disabled&#x27; - It is the default setting out of the box. It disables the subquery&#x27;s from the byte based limit, and effectively disables this feature.</li><li>&#x27;auto&#x27; - Druid automatically decides the optimal byte based limit based upon the heap space available and the max number of concurrent queries.</li><li>A positive long value - User can manually specify the number of bytes that the results of the subqueries of a single query can occupy on the heap.</li></ol><p>Due to the conversion between the Java objects and the Frame&#x27;s format, setting <code>maxSubqueryBytes</code> can become slow if the subquery starts generating
rows in the order of magnitude of around 10 million and above. In those scenarios, disable the <code>maxSubqueryBytes</code> settings for such queries, assess the
number of rows that the subqueries generate and override the <code>maxSubqueryRows</code> to appropriate value.</p><p>If you choose to modify or set any of the above limits, you must also think about the heap size of all Brokers, Historicals, and task Peons that process data for the subqueries to accommodate the subquery results.
There is no formula to calculate the correct value. Trial and error is the best approach.</p><h6 class="anchor anchorWithStickyNavbar_LWe7" id="manual-laning-strategy">&#x27;Manual&#x27; laning strategy<a href="#manual-laning-strategy" class="hash-link" aria-label="Direct link to &#x27;Manual&#x27; laning strategy" title="Direct link to &#x27;Manual&#x27; laning strategy"></a></h6><p>This laning strategy is best suited for cases where one or more external applications which query Druid are capable of manually deciding what lane a given query should belong to. Configured with a map of lane names to percent or exact max capacities, queries with a matching <code>lane</code> parameter in the <a href="/docs/28.0.0/querying/query-context">query context</a> will be subjected to those limits.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.query.scheduler.laning.lanes.{name}</code></td><td>Maximum percent or exact limit of queries that can concurrently run in the defined lanes. Any number of lanes may be defined like this. The lane names &#x27;total&#x27; and &#x27;default&#x27; are reserved for internal use.</td><td>No default, must define at least one lane with a limit above 0. If <code>druid.query.scheduler.laning.isLimitPercent</code> is set to <code>true</code>, values must be integers in the range of 1 to 100.</td></tr><tr><td><code>druid.query.scheduler.laning.isLimitPercent</code></td><td>If set to <code>true</code>, the values set for <code>druid.query.scheduler.laning.lanes</code> will be treated as a percent of the smaller number of <code>druid.server.http.numThreads</code> or <code>druid.query.scheduler.numThreads</code>. Note that in this mode, these lane values across lanes are <em>not</em> required to add up to, and can exceed, 100%.</td><td><code>false</code></td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="server-configuration">Server Configuration<a href="#server-configuration" class="hash-link" aria-label="Direct link to Server Configuration" title="Direct link to Server Configuration"></a></h5><p>Druid uses Jetty to serve HTTP requests. Each query being processed consumes a single thread from <code>druid.server.http.numThreads</code>, so consider defining <code>druid.query.scheduler.numThreads</code> to a lower value in order to reserve HTTP threads for responding to health checks, lookup loading, and other non-query, (in most cases) comparatively very short-lived, HTTP requests.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.server.http.numThreads</code></td><td>Number of threads for HTTP requests.</td><td>max(10, (Number of cores * 17) / 16 + 2) + 30</td></tr><tr><td><code>druid.server.http.queueSize</code></td><td>Size of the worker queue used by Jetty server to temporarily store incoming client connections. If this value is set and a request is rejected by jetty because queue is full then client would observe request failure with TCP connection being closed immediately with a completely empty response from server.</td><td>Unbounded</td></tr><tr><td><code>druid.server.http.maxIdleTime</code></td><td>The Jetty max idle time for a connection.</td><td>PT5M</td></tr><tr><td><code>druid.server.http.enableRequestLimit</code></td><td>If enabled, no requests would be queued in jetty queue and &quot;HTTP 429 Too Many Requests&quot; error response would be sent.</td><td>false</td></tr><tr><td><code>druid.server.http.defaultQueryTimeout</code></td><td>Query timeout in millis, beyond which unfinished queries will be cancelled</td><td>300000</td></tr><tr><td><code>druid.server.http.maxScatterGatherBytes</code></td><td>Maximum number of bytes gathered from data processes such as Historicals and realtime processes to execute a query. Queries that exceed this limit will fail. This is an advance configuration that allows to protect in case Broker is under heavy load and not utilizing the data gathered in memory fast enough and leading to OOMs. This limit can be further reduced at query time using <code>maxScatterGatherBytes</code> in the context. Note that having large limit is not necessarily bad if broker is never under heavy concurrent load in which case data gathered is processed quickly and freeing up the memory used. Human-readable format is supported, see <a href="/docs/28.0.0/configuration/human-readable-byte">here</a>.</td><td>Long.MAX_VALUE</td></tr><tr><td><code>druid.server.http.maxSubqueryRows</code></td><td>Maximum number of rows from all subqueries per query. Druid stores the subquery rows in temporary tables that live in the Java heap. <code>druid.server.http.maxSubqueryRows</code> is a guardrail to prevent the system from exhausting available heap. When a subquery exceeds the row limit, Druid throws a resource limit exceeded exception: &quot;Subquery generated results beyond maximum.&quot;<br><br>It is a good practice to avoid large subqueries in Druid. However, if you choose to raise the subquery row limit, you must also increase the heap size of all Brokers, Historicals, and task Peons that process data for the subqueries to accommodate the subquery results.<br><br>There is no formula to calculate the correct value. Trial and error is the best approach.</td><td>100000</td></tr><tr><td><code>druid.server.http.maxSubqueryBytes</code></td><td>Maximum number of bytes from all subqueries per query. Since the results are stored on the Java heap, <code>druid.server.http.maxSubqueryBytes</code> is a guardrail like <code>druid.server.http.maxSubqueryRows</code> to prevent the heap space from exhausting. When a subquery exceeds the byte limit, Druid throws a resource limit exceeded exception. A negative value for the guardrail indicates that Druid won&#x27;t guardrail by memory. This can be set to &#x27;disabled&#x27; which disables the results from being limited via the byte limit, &#x27;auto&#x27; which sets this value automatically taking free heap space into account, or a positive long value depicting the number of bytes per query&#x27;s subqueries&#x27; results can occupy. This is an experimental feature for now as this materializes the results in a different format.</td><td>&#x27;disabled&#x27;</td></tr><tr><td><code>druid.server.http.gracefulShutdownTimeout</code></td><td>The maximum amount of time Jetty waits after receiving shutdown signal. After this timeout the threads will be forcefully shutdown. This allows any queries that are executing to complete(Only values greater than zero are valid).</td><td><code>PT30S</code></td></tr><tr><td><code>druid.server.http.unannouncePropagationDelay</code></td><td>How long to wait for ZooKeeper unannouncements to propagate before shutting down Jetty. This is a minimum and <code>druid.server.http.gracefulShutdownTimeout</code> does not start counting down until after this period elapses.</td><td><code>PT0S</code> (do not wait)</td></tr><tr><td><code>druid.server.http.maxQueryTimeout</code></td><td>Maximum allowed value (in milliseconds) for <code>timeout</code> parameter. See <a href="/docs/28.0.0/querying/query-context">query-context</a> to know more about <code>timeout</code>. Query is rejected if the query context <code>timeout</code> is greater than this value.</td><td>Long.MAX_VALUE</td></tr><tr><td><code>druid.server.http.maxRequestHeaderSize</code></td><td>Maximum size of a request header in bytes. Larger headers consume more memory and can make a server more vulnerable to denial of service attacks.</td><td>8 * 1024</td></tr><tr><td><code>druid.server.http.contentSecurityPolicy</code></td><td>Content-Security-Policy header value to set on each non-POST response. Setting this property to an empty string, or omitting it, both result in the default <code>frame-ancestors: none</code> being set.</td><td><code>frame-ancestors &#x27;none&#x27;</code></td></tr><tr><td><code>druid.server.http.enableHSTS</code></td><td>If set to true, druid services will add strict transport security header <code>Strict-Transport-Security: max-age=63072000; includeSubDomains</code> to all HTTP responses</td><td><code>false</code></td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="client-configuration">Client Configuration<a href="#client-configuration" class="hash-link" aria-label="Direct link to Client Configuration" title="Direct link to Client Configuration"></a></h5><p>Druid Brokers use an HTTP client to communicate with data servers (Historical servers and real-time tasks). This
client has the following configuration options.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.broker.http.numConnections</code></td><td>Size of connection pool for the Broker to connect to Historical and real-time processes. If there are more queries than this number that all need to speak to the same process, then they will queue up.</td><td><code>20</code></td></tr><tr><td><code>druid.broker.http.eagerInitialization</code></td><td>Indicates that http connections from Broker to Historical and Real-time processes should be eagerly initialized. If set to true, <code>numConnections</code> connections are created upon initialization</td><td><code>true</code></td></tr><tr><td><code>druid.broker.http.compressionCodec</code></td><td>Compression codec the Broker uses to communicate with Historical and real-time processes. May be &quot;gzip&quot; or &quot;identity&quot;.</td><td><code>gzip</code></td></tr><tr><td><code>druid.broker.http.readTimeout</code></td><td>The timeout for data reads from Historical servers and real-time tasks.</td><td><code>PT15M</code></td></tr><tr><td><code>druid.broker.http.unusedConnectionTimeout</code></td><td>The timeout for idle connections in connection pool. The connection in the pool will be closed after this timeout and a new one will be established. This timeout should be less than <code>druid.broker.http.readTimeout</code>. Set this timeout = ~90% of <code>druid.broker.http.readTimeout</code></td><td><code>PT4M</code></td></tr><tr><td><code>druid.broker.http.maxQueuedBytes</code></td><td>Maximum number of bytes queued per query before exerting <a href="/docs/28.0.0/operations/basic-cluster-tuning#broker-backpressure">backpressure</a> on channels to the data servers.<br><br>Similar to <code>druid.server.http.maxScatterGatherBytes</code>, except that <code>maxQueuedBytes</code> triggers <a href="/docs/28.0.0/operations/basic-cluster-tuning#broker-backpressure">backpressure</a> instead of query failure. Set to zero to disable. You can override this setting by using the <a href="/docs/28.0.0/querying/query-context"><code>maxQueuedBytes</code> query context parameter</a>. Druid supports <a href="/docs/28.0.0/configuration/human-readable-byte">human-readable</a> format.</td><td><code>25MB</code> or 2% of maximum Broker heap size, whichever is greater.</td></tr><tr><td><code>druid.broker.http.numMaxThreads</code></td><td>`Maximum number of I/O worker threads</td><td>max(10, ((number of cores * 17) / 16 + 2) + 30)`</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="retry-policy">Retry Policy<a href="#retry-policy" class="hash-link" aria-label="Direct link to Retry Policy" title="Direct link to Retry Policy"></a></h5><p>Druid broker can optionally retry queries internally for transient errors.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.broker.retryPolicy.numTries</code></td><td>Number of tries.</td><td>1</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="processing-1">Processing<a href="#processing-1" class="hash-link" aria-label="Direct link to Processing" title="Direct link to Processing"></a></h5><p>The broker uses processing configs for nested groupBy queries.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.processing.buffer.sizeBytes</code></td><td>This specifies a buffer size (less than 2GiB) for the storage of intermediate results. The computation engine in both the Historical and Realtime processes will use a scratch buffer of this size to do all of their intermediate computations off-heap. Larger values allow for more aggregations in a single pass over the data while smaller values can require more passes depending on the query that is being executed. <a href="/docs/28.0.0/configuration/human-readable-byte">Human-readable format</a> is supported.</td><td>auto (max 1GiB)</td></tr><tr><td><code>druid.processing.buffer.poolCacheInitialCount</code></td><td>initializes the number of buffers allocated on the intermediate results pool. Note that pool can create more buffers if necessary.</td><td><code>0</code></td></tr><tr><td><code>druid.processing.buffer.poolCacheMaxCount</code></td><td>processing buffer pool caches the buffers for later use, this is the maximum count cache will grow to. note that pool can create more buffers than it can cache if necessary.</td><td>Integer.MAX_VALUE</td></tr><tr><td><code>druid.processing.numMergeBuffers</code></td><td>The number of direct memory buffers available for merging query results. The buffers are sized by <code>druid.processing.buffer.sizeBytes</code>. This property is effectively a concurrency limit for queries that require merging buffers. If you are using any queries that require merge buffers (currently, just groupBy) then you should have at least two of these.</td><td><code>max(2, druid.processing.numThreads / 4)</code></td></tr><tr><td><code>druid.processing.fifo</code></td><td>If the processing queue should treat tasks of equal priority in a FIFO manner</td><td><code>true</code></td></tr><tr><td><code>druid.processing.tmpDir</code></td><td>Path where temporary files created while processing a query should be stored. If specified, this configuration takes priority over the default <code>java.io.tmpdir</code> path.</td><td>path represented by <code>java.io.tmpdir</code></td></tr><tr><td><code>druid.processing.merge.useParallelMergePool</code></td><td>Enable automatic parallel merging for Brokers on a dedicated async ForkJoinPool. If <code>false</code>, instead merges will be done serially on the <code>HTTP</code> thread pool.</td><td><code>true</code></td></tr><tr><td><code>druid.processing.merge.pool.parallelism</code></td><td>Size of ForkJoinPool. Note that the default configuration assumes that the value returned by <code>Runtime.getRuntime().availableProcessors()</code> represents 2 hyper-threads per physical core, and multiplies this value by <code>0.75</code> in attempt to size <code>1.5</code> times the number of <em>physical</em> cores.</td><td><code>Runtime.getRuntime().availableProcessors() * 0.75</code> (rounded up)</td></tr><tr><td><code>druid.processing.merge.pool.defaultMaxQueryParallelism</code></td><td>Default maximum number of parallel merge tasks per query. Note that the default configuration assumes that the value returned by <code>Runtime.getRuntime().availableProcessors()</code> represents 2 hyper-threads per physical core, and multiplies this value by <code>0.5</code> in attempt to size to the number of <em>physical</em> cores.</td><td><code>Runtime.getRuntime().availableProcessors() * 0.5</code> (rounded up)</td></tr><tr><td><code>druid.processing.merge.pool.awaitShutdownMillis</code></td><td>Time to wait for merge ForkJoinPool tasks to complete before ungracefully stopping on process shutdown in milliseconds.</td><td><code>60_000</code></td></tr><tr><td><code>druid.processing.merge.task.targetRunTimeMillis</code></td><td>Ideal run-time of each ForkJoinPool merge task, before forking off a new task to continue merging sequences.</td><td><code>100</code></td></tr><tr><td><code>druid.processing.merge.task.initialYieldNumRows</code></td><td>Number of rows to yield per ForkJoinPool merge task, before forking off a new task to continue merging sequences.</td><td><code>16384</code></td></tr><tr><td><code>druid.processing.merge.task.smallBatchNumRows</code></td><td>Size of result batches to operate on in ForkJoinPool merge tasks.</td><td><code>4096</code></td></tr></tbody></table><p>The amount of direct memory needed by Druid is at least
<code>druid.processing.buffer.sizeBytes * (druid.processing.numMergeBuffers + 1)</code>. You can
ensure at least this amount of direct memory is available by providing <code>-XX:MaxDirectMemorySize=&lt;VALUE&gt;</code> at the command
line.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="broker-query-configuration">Broker query configuration<a href="#broker-query-configuration" class="hash-link" aria-label="Direct link to Broker query configuration" title="Direct link to Broker query configuration"></a></h5><p>See <a href="#general-query-configuration">general query configuration</a>.</p><h6 class="anchor anchorWithStickyNavbar_LWe7" id="broker-generated-query-configuration-supplementation">Broker Generated Query Configuration Supplementation<a href="#broker-generated-query-configuration-supplementation" class="hash-link" aria-label="Direct link to Broker Generated Query Configuration Supplementation" title="Direct link to Broker Generated Query Configuration Supplementation"></a></h6><p>The Broker generates queries internally. This configuration section describes how an operator can augment the configuration
of these queries.</p><p>As of now the only supported augmentation is overriding the default query context. This allows an operator the flexibility
to adjust it as they see fit. A common use of this configuration is to override the query priority of the cluster generated
queries in order to avoid running as a default priority of 0.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.broker.internal.query.config.context</code></td><td>A string formatted <code>key:value</code> map of a query context to add to internally generated broker queries.</td><td>null</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="sql">SQL<a href="#sql" class="hash-link" aria-label="Direct link to SQL" title="Direct link to SQL"></a></h4><p>The Druid SQL server is configured through the following properties on the Broker.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.sql.enable</code></td><td>Whether to enable SQL at all, including background metadata fetching. If false, this overrides all other SQL-related properties and disables SQL metadata, serving, and planning completely.</td><td>true</td></tr><tr><td><code>druid.sql.avatica.enable</code></td><td>Whether to enable JDBC querying at <code>/druid/v2/sql/avatica/</code>.</td><td>true</td></tr><tr><td><code>druid.sql.avatica.maxConnections</code></td><td>Maximum number of open connections for the Avatica server. These are not HTTP connections, but are logical client connections that may span multiple HTTP connections.</td><td>25</td></tr><tr><td><code>druid.sql.avatica.maxRowsPerFrame</code></td><td>Maximum acceptable value for the JDBC client <code>Statement.setFetchSize</code> method. This setting determines the maximum number of rows that Druid will populate in a single &#x27;fetch&#x27; for a JDBC <code>ResultSet</code>. Set this property to -1 to enforce no row limit on the server-side and potentially return the entire set of rows on the initial statement execution. If the JDBC client calls <code>Statement.setFetchSize</code> with a value other than -1, Druid uses the lesser value of the client-provided limit and <code>maxRowsPerFrame</code>. If <code>maxRowsPerFrame</code> is smaller than <code>minRowsPerFrame</code>, then the <code>ResultSet</code> size will be fixed. To handle queries that produce results with a large number of rows, you can increase value of <code>druid.sql.avatica.maxRowsPerFrame</code> to reduce the number of fetches required to completely transfer the result set.</td><td>5,000</td></tr><tr><td><code>druid.sql.avatica.minRowsPerFrame</code></td><td>Minimum acceptable value for the JDBC client <code>Statement.setFetchSize</code> method. The value for this property must greater than 0. If the JDBC client calls <code>Statement.setFetchSize</code> with a lesser value, Druid uses <code>minRowsPerFrame</code> instead. If <code>maxRowsPerFrame</code> is less than <code>minRowsPerFrame</code>, Druid uses the minimum value of the two. For handling queries which produce results with a large number of rows, you can increase this value to reduce the number of fetches required to completely transfer the result set.</td><td>100</td></tr><tr><td><code>druid.sql.avatica.maxStatementsPerConnection</code></td><td>Maximum number of simultaneous open statements per Avatica client connection.</td><td>4</td></tr><tr><td><code>druid.sql.avatica.connectionIdleTimeout</code></td><td>Avatica client connection idle timeout.</td><td>PT5M</td></tr><tr><td><code>druid.sql.avatica.fetchTimeoutMs</code></td><td>Avatica fetch timeout, in milliseconds. When a request for the next batch of data takes longer than this time, Druid returns an empty result set, causing the client to poll again. This avoids HTTP timeouts for long-running queries. The default of 5 sec. is good for most cases.</td><td>5000</td></tr><tr><td><code>druid.sql.http.enable</code></td><td>Whether to enable JSON over HTTP querying at <code>/druid/v2/sql/</code>.</td><td>true</td></tr><tr><td><code>druid.sql.planner.maxTopNLimit</code></td><td>Maximum threshold for a <a href="/docs/28.0.0/querying/topnquery">TopN query</a>. Higher limits will be planned as <a href="/docs/28.0.0/querying/groupbyquery">GroupBy queries</a> instead.</td><td>100000</td></tr><tr><td><code>druid.sql.planner.metadataRefreshPeriod</code></td><td>Throttle for metadata refreshes.</td><td>PT1M</td></tr><tr><td><code>druid.sql.planner.metadataColumnTypeMergePolicy</code></td><td>Defines how column types will be chosen when faced with differences between segments when computing the SQL schema. Options are specified as a JSON object, with valid choices of <code>leastRestrictive</code> or <code>latestInterval</code>. For <code>leastRestrictive</code>, Druid will automatically widen the type computed for the schema to a type which data across all segments can be converted into, however planned schema migrations can only take effect once all segments have been re-ingested to the new schema. With <code>latestInterval</code>, the column type in most recent time chunks defines the type for the schema.</td><td><code>leastRestrictive</code></td></tr><tr><td><code>druid.sql.planner.useApproximateCountDistinct</code></td><td>Whether to use an approximate cardinality algorithm for <code>COUNT(DISTINCT foo)</code>.</td><td>true</td></tr><tr><td><code>druid.sql.planner.useGroupingSetForExactDistinct</code></td><td>Only relevant when <code>useApproximateCountDistinct</code> is disabled. If set to true, exact distinct queries are re-written using grouping sets. Otherwise, exact distinct queries are re-written using joins. This should be set to true for group by query with multiple exact distinct aggregations. This flag can be overridden per query.</td><td>false</td></tr><tr><td><code>druid.sql.planner.useApproximateTopN</code></td><td>Whether to use approximate <a href="/docs/28.0.0/querying/topnquery">TopN queries</a> when a SQL query could be expressed as such. If false, exact <a href="/docs/28.0.0/querying/groupbyquery">GroupBy queries</a> will be used instead.</td><td>true</td></tr><tr><td><code>druid.sql.planner.requireTimeCondition</code></td><td>Whether to require SQL to have filter conditions on <strong>time column so that all generated native queries will have user specified intervals. If true, all queries without filter condition on </strong>time column will fail</td><td>false</td></tr><tr><td><code>druid.sql.planner.sqlTimeZone</code></td><td>Sets the default time zone for the server, which will affect how time functions and timestamp literals behave. Should be a time zone name like &quot;America/Los_Angeles&quot; or offset like &quot;-08:00&quot;.</td><td>UTC</td></tr><tr><td><code>druid.sql.planner.metadataSegmentCacheEnable</code></td><td>Whether to keep a cache of published segments in broker. If true, broker polls coordinator in background to get segments from metadata store and maintains a local cache. If false, coordinator&#x27;s REST API will be invoked when broker needs published segments info.</td><td>false</td></tr><tr><td><code>druid.sql.planner.metadataSegmentPollPeriod</code></td><td>How often to poll coordinator for published segments list if <code>druid.sql.planner.metadataSegmentCacheEnable</code> is set to true. Poll period is in milliseconds.</td><td>60000</td></tr><tr><td><code>druid.sql.planner.authorizeSystemTablesDirectly</code></td><td>If true, Druid authorizes queries against any of the system schema tables (<code>sys</code> in SQL) as <code>SYSTEM_TABLE</code> resources which require <code>READ</code> access, in addition to permissions based content filtering.</td><td>false</td></tr><tr><td><code>druid.sql.planner.useNativeQueryExplain</code></td><td>If true, <code>EXPLAIN PLAN FOR</code> will return the explain plan as a JSON representation of equivalent native query(s), else it will return the original version of explain plan generated by Calcite. It can be overridden per query with <code>useNativeQueryExplain</code> context key.</td><td>true</td></tr><tr><td><code>druid.sql.planner.maxNumericInFilters</code></td><td>Max limit for the amount of numeric values that can be compared for a string type dimension when the entire SQL WHERE clause of a query translates to an <a href="/docs/28.0.0/querying/filters#or">OR</a> of <a href="/docs/28.0.0/querying/filters#bound-filter">Bound filter</a>. By default, Druid does not restrict the amount of numeric Bound Filters on String columns, although this situation may block other queries from running. Set this property to a smaller value to prevent Druid from running queries that have prohibitively long segment processing times. The optimal limit requires some trial and error; we recommend starting with 100. Users who submit a query that exceeds the limit of <code>maxNumericInFilters</code> should instead rewrite their queries to use strings in the <code>WHERE</code> clause instead of numbers. For example, <code>WHERE someString IN (‘123’, ‘456’)</code>. If this value is disabled, <code>maxNumericInFilters</code> set through query context is ignored.</td><td><code>-1</code> (disabled)</td></tr><tr><td><code>druid.sql.approxCountDistinct.function</code></td><td>Implementation to use for the <a href="/docs/28.0.0/querying/sql-aggregations"><code>APPROX_COUNT_DISTINCT</code> function</a>. Without extensions loaded, the only valid value is <code>APPROX_COUNT_DISTINCT_BUILTIN</code> (a HyperLogLog, or HLL, based implementation). If the <a href="/docs/28.0.0/development/extensions-core/datasketches-extension">DataSketches extension</a> is loaded, this can also be <code>APPROX_COUNT_DISTINCT_DS_HLL</code> (alternative HLL implementation) or <code>APPROX_COUNT_DISTINCT_DS_THETA</code>.<br><br>Theta sketches use significantly more memory than HLL sketches, so you should prefer one of the two HLL implementations.</td><td>APPROX_COUNT_DISTINCT_BUILTIN</td></tr></tbody></table><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p> Previous versions of Druid had properties named <code>druid.sql.planner.maxQueryCount</code> and <code>druid.sql.planner.maxSemiJoinRowsInMemory</code>.
These properties are no longer available. Since Druid 0.18.0, you can use <code>druid.server.http.maxSubqueryRows</code> to control the maximum
number of rows permitted across all subqueries.</p></div></div><h4 class="anchor anchorWithStickyNavbar_LWe7" id="broker-caching">Broker Caching<a href="#broker-caching" class="hash-link" aria-label="Direct link to Broker Caching" title="Direct link to Broker Caching"></a></h4><p>You can optionally only configure caching to be enabled on the Broker by setting caching configs here.</p><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.broker.cache.useCache</code></td><td>true, false</td><td>Enable the cache on the Broker.</td><td>false</td></tr><tr><td><code>druid.broker.cache.populateCache</code></td><td>true, false</td><td>Populate the cache on the Broker.</td><td>false</td></tr><tr><td><code>druid.broker.cache.useResultLevelCache</code></td><td>true, false</td><td>Enable result level caching on the Broker.</td><td>false</td></tr><tr><td><code>druid.broker.cache.populateResultLevelCache</code></td><td>true, false</td><td>Populate the result level cache on the Broker.</td><td>false</td></tr><tr><td><code>druid.broker.cache.resultLevelCacheLimit</code></td><td>positive integer</td><td>Maximum size of query response that can be cached.</td><td><code>Integer.MAX_VALUE</code></td></tr><tr><td><code>druid.broker.cache.unCacheable</code></td><td>All druid query types</td><td>All query types to not cache.</td><td><code>[]</code></td></tr><tr><td><code>druid.broker.cache.cacheBulkMergeLimit</code></td><td>positive integer or 0</td><td>Queries with more segments than this number will not attempt to fetch from cache at the broker level, leaving potential caching fetches (and cache result merging) to the Historicals</td><td><code>Integer.MAX_VALUE</code></td></tr><tr><td><code>druid.broker.cache.maxEntrySize</code></td><td>positive integer</td><td>Maximum cache entry size in bytes.</td><td>1_000_000</td></tr></tbody></table><p>See <a href="#cache-configuration">cache configuration</a> for how to configure cache settings.</p><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p> Note: Even if cache is enabled, for <a href="/docs/28.0.0/querying/groupbyquery">groupBy</a> queries, segment level cache does not work on Brokers.
See <a href="/docs/28.0.0/querying/caching">Query caching</a> for more information.</p></div></div><h4 class="anchor anchorWithStickyNavbar_LWe7" id="segment-discovery">Segment Discovery<a href="#segment-discovery" class="hash-link" aria-label="Direct link to Segment Discovery" title="Direct link to Segment Discovery"></a></h4><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.serverview.type</code></td><td>batch or http</td><td>Segment discovery method to use. &quot;http&quot; enables discovering segments using HTTP instead of ZooKeeper.</td><td>http</td></tr><tr><td><code>druid.broker.segment.watchedTiers</code></td><td>List of strings</td><td>The Broker watches segment announcements from processes that serve segments to build a cache to relate each process to the segments it serves. This configuration allows the Broker to only consider segments being served from a list of tiers. By default, Broker considers all tiers. This can be used to partition your dataSources in specific Historical tiers and configure brokers in partitions so that they are only queryable for specific dataSources. This config is mutually exclusive from <code>druid.broker.segment.ignoredTiers</code> and at most one of these can be configured on a Broker.</td><td>none</td></tr><tr><td><code>druid.broker.segment.ignoredTiers</code></td><td>List of strings</td><td>The Broker watches segment announcements from processes that serve segments to build a cache to relate each process to the segments it serves. This configuration allows the Broker to ignore the segments being served from a list of tiers. By default, Broker considers all tiers. This config is mutually exclusive from <code>druid.broker.segment.watchedTiers</code> and at most one of these can be configured on a Broker.</td><td>none</td></tr><tr><td><code>druid.broker.segment.watchedDataSources</code></td><td>List of strings</td><td>Broker watches the segment announcements from processes serving segments to build cache of which process is serving which segments, this configuration allows to only consider segments being served from a whitelist of dataSources. By default, Broker would consider all datasources. This can be used to configure brokers in partitions so that they are only queryable for specific dataSources.</td><td>none</td></tr><tr><td><code>druid.broker.segment.watchRealtimeTasks</code></td><td>Boolean</td><td>The Broker watches segment announcements from processes that serve segments to build a cache to relate each process to the segments it serves. When <code>watchRealtimeTasks</code> is true, the Broker watches for segment announcements from both Historicals and realtime processes. To configure a broker to exclude segments served by realtime processes, set <code>watchRealtimeTasks</code> to false.</td><td>true</td></tr><tr><td><code>druid.broker.segment.awaitInitializationOnStart</code></td><td>Boolean</td><td>Whether the Broker will wait for its view of segments to fully initialize before starting up. If set to &#x27;true&#x27;, the Broker&#x27;s HTTP server will not start up, and the Broker will not announce itself as available, until the server view is initialized. See also <code>druid.sql.planner.awaitInitializationOnStart</code>, a related setting.</td><td>true</td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_LWe7" id="cache-configuration">Cache Configuration<a href="#cache-configuration" class="hash-link" aria-label="Direct link to Cache Configuration" title="Direct link to Cache Configuration"></a></h2><p>This section describes caching configuration that is common to Broker, Historical, and MiddleManager/Peon processes.</p><p>Caching could optionally be enabled on the Broker, Historical, and MiddleManager/Peon processes. See
<a href="#broker-caching">Broker</a>, <a href="#historical-caching">Historical</a>, and <a href="#peon-caching">Peon</a> configuration options for how to
enable it for different processes.</p><p>Druid uses a local in-memory cache by default, unless a different type of cache is specified.
Use the <code>druid.cache.type</code> configuration to set a different kind of cache.</p><p>Cache settings are set globally, so the same configuration can be re-used
for both Broker and Historical processes, when defined in the common properties file.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="cache-type">Cache Type<a href="#cache-type" class="hash-link" aria-label="Direct link to Cache Type" title="Direct link to Cache Type"></a></h3><table><thead><tr><th>Property</th><th>Possible Values</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.cache.type</code></td><td><code>local</code>, <code>memcached</code>, <code>hybrid</code>, <code>caffeine</code></td><td>The type of cache to use for queries. See below of the configuration options for each cache type</td><td><code>caffeine</code></td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="local-cache">Local Cache<a href="#local-cache" class="hash-link" aria-label="Direct link to Local Cache" title="Direct link to Local Cache"></a></h4><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p> DEPRECATED: Use caffeine (default as of v0.12.0) instead</p></div></div><p>The local cache is deprecated in favor of the Caffeine cache, and may be removed in a future version of Druid. The Caffeine cache affords significantly better performance and control over eviction behavior compared to <code>local</code> cache, and is recommended in any situation where you are using JRE 8u60 or higher.</p><p>A simple in-memory LRU cache. Local cache resides in JVM heap memory, so if you enable it, make sure you increase heap size accordingly.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.cache.sizeInBytes</code></td><td>Maximum cache size in bytes. Zero disables caching.</td><td>0</td></tr><tr><td><code>druid.cache.initialSize</code></td><td>Initial size of the hashtable backing the cache.</td><td>500000</td></tr><tr><td><code>druid.cache.logEvictionCount</code></td><td>If non-zero, log cache eviction every <code>logEvictionCount</code> items.</td><td>0</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="caffeine-cache">Caffeine Cache<a href="#caffeine-cache" class="hash-link" aria-label="Direct link to Caffeine Cache" title="Direct link to Caffeine Cache"></a></h4><p>A highly performant local cache implementation for Druid based on <a href="https://github.com/ben-manes/caffeine" target="_blank" rel="noopener noreferrer">Caffeine</a>. Requires a JRE8u60 or higher if using <code>COMMON_FJP</code>.</p><h5 class="anchor anchorWithStickyNavbar_LWe7" id="configuration">Configuration<a href="#configuration" class="hash-link" aria-label="Direct link to Configuration" title="Direct link to Configuration"></a></h5><p>Below are the configuration options known to this module:</p><table><thead><tr><th><code>runtime.properties</code></th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.cache.type</code></td><td>Set this to <code>caffeine</code> or leave out parameter</td><td><code>caffeine</code></td></tr><tr><td><code>druid.cache.sizeInBytes</code></td><td>The maximum size of the cache in bytes on heap. It can be configured as described in <a href="/docs/28.0.0/configuration/human-readable-byte">here</a>.</td><td>min(1GiB, Runtime.maxMemory / 10)</td></tr><tr><td><code>druid.cache.expireAfter</code></td><td>The time (in ms) after an access for which a cache entry may be expired</td><td>None (no time limit)</td></tr><tr><td><code>druid.cache.cacheExecutorFactory</code></td><td>The executor factory to use for Caffeine maintenance. One of <code>COMMON_FJP</code>, <code>SINGLE_THREAD</code>, or <code>SAME_THREAD</code></td><td>ForkJoinPool common pool (<code>COMMON_FJP</code>)</td></tr><tr><td><code>druid.cache.evictOnClose</code></td><td>If a close of a namespace (ex: removing a segment from a process) should cause an eager eviction of associated cache values</td><td><code>false</code></td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="druidcachecacheexecutorfactory"><code>druid.cache.cacheExecutorFactory</code><a href="#druidcachecacheexecutorfactory" class="hash-link" aria-label="Direct link to druidcachecacheexecutorfactory" title="Direct link to druidcachecacheexecutorfactory"></a></h5><p>Here are the possible values for <code>druid.cache.cacheExecutorFactory</code>, which controls how maintenance tasks are run</p><ul><li><code>COMMON_FJP</code> (default) use the common ForkJoinPool. Should use with <a href="https://github.com/apache/druid/pull/4810#issuecomment-329922810" target="_blank" rel="noopener noreferrer">JRE 8u60 or higher</a>. Older versions of the JRE may have worse performance than newer JRE versions.</li><li><code>SINGLE_THREAD</code> Use a single-threaded executor.</li><li><code>SAME_THREAD</code> Cache maintenance is done eagerly.</li></ul><h5 class="anchor anchorWithStickyNavbar_LWe7" id="metrics">Metrics<a href="#metrics" class="hash-link" aria-label="Direct link to Metrics" title="Direct link to Metrics"></a></h5><p>In addition to the normal cache metrics, the caffeine cache implementation also reports the following in both <code>total</code> and <code>delta</code></p><table><thead><tr><th>Metric</th><th>Description</th><th>Normal value</th></tr></thead><tbody><tr><td><code>query/cache/caffeine/*/requests</code></td><td>Count of hits or misses</td><td>hit + miss</td></tr><tr><td><code>query/cache/caffeine/*/loadTime</code></td><td>Length of time caffeine spends loading new values (unused feature)</td><td>0</td></tr><tr><td><code>query/cache/caffeine/*/evictionBytes</code></td><td>Size in bytes that have been evicted from the cache</td><td>Varies, should tune cache <code>sizeInBytes</code> so that <code>sizeInBytes</code>/<code>evictionBytes</code> is approximately the rate of cache churn you desire</td></tr></tbody></table><h5 class="anchor anchorWithStickyNavbar_LWe7" id="memcached">Memcached<a href="#memcached" class="hash-link" aria-label="Direct link to Memcached" title="Direct link to Memcached"></a></h5><p>Uses memcached as cache backend. This allows all processes to share the same cache.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.cache.expiration</code></td><td>Memcached <a href="https://code.google.com/p/memcached/wiki/NewCommands#Standard_Protocol" target="_blank" rel="noopener noreferrer">expiration time</a>.</td><td>2592000 (30 days)</td></tr><tr><td><code>druid.cache.timeout</code></td><td>Maximum time in milliseconds to wait for a response from Memcached.</td><td>500</td></tr><tr><td><code>druid.cache.hosts</code></td><td>Comma separated list of Memcached hosts <code>&lt;host:port&gt;</code>. Need to specify all nodes when <code>druid.cache.clientMode</code> is set to static. Dynamic mode <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/AutoDiscovery.html" target="_blank" rel="noopener noreferrer">automatically identifies nodes in your cluster</a> so just specifying the configuration endpoint and port is fine.</td><td>none</td></tr><tr><td><code>druid.cache.maxObjectSize</code></td><td>Maximum object size in bytes for a Memcached object.</td><td>52428800 (50 MiB)</td></tr><tr><td><code>druid.cache.memcachedPrefix</code></td><td>Key prefix for all keys in Memcached.</td><td>druid</td></tr><tr><td><code>druid.cache.numConnections</code></td><td>Number of memcached connections to use.</td><td>1</td></tr><tr><td><code>druid.cache.protocol</code></td><td>Memcached communication protocol. Can be binary or text.</td><td>binary</td></tr><tr><td><code>druid.cache.locator</code></td><td>Memcached locator. Can be consistent or array_mod.</td><td>consistent</td></tr><tr><td><code>druid.cache.enableTls</code></td><td>Enable TLS based connection for Memcached client. Boolean</td><td>false</td></tr><tr><td><code>druid.cache.clientMode</code></td><td>Client Mode. Static mode requires the user to specify individual cluster nodes. Dynamic mode uses <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/AutoDiscovery.HowAutoDiscoveryWorks.html" target="_blank" rel="noopener noreferrer">AutoDiscovery</a> feature of AWS Memcached. String. <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/AutoDiscovery.Manual.html" target="_blank" rel="noopener noreferrer">&quot;static&quot;</a> or <a href="https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/AutoDiscovery.Using.ModifyApp.Java.html" target="_blank" rel="noopener noreferrer">&quot;dynamic&quot;</a></td><td>static</td></tr><tr><td><code>druid.cache.skipTlsHostnameVerification</code></td><td>Skip TLS Hostname Verification. Boolean.</td><td>true</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="hybrid">Hybrid<a href="#hybrid" class="hash-link" aria-label="Direct link to Hybrid" title="Direct link to Hybrid"></a></h4><p>Uses a combination of any two caches as a two-level L1 / L2 cache.
This may be used to combine a local in-memory cache with a remote memcached cache.</p><p>Cache requests will first check L1 cache before checking L2.
If there is an L1 miss and L2 hit, it will also populate L1.</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.cache.l1.type</code></td><td>type of cache to use for L1 cache. See <code>druid.cache.type</code> configuration for valid types.</td><td><code>caffeine</code></td></tr><tr><td><code>druid.cache.l2.type</code></td><td>type of cache to use for L2 cache. See <code>druid.cache.type</code> configuration for valid types.</td><td><code>caffeine</code></td></tr><tr><td><code>druid.cache.l1.*</code></td><td>Any property valid for the given type of L1 cache can be set using this prefix. For instance, if you are using a <code>caffeine</code> L1 cache, specify <code>druid.cache.l1.sizeInBytes</code> to set its size.</td><td>defaults are the same as for the given cache type.</td></tr><tr><td><code>druid.cache.l2.*</code></td><td>Prefix for L2 cache settings, see description for L1.</td><td>defaults are the same as for the given cache type.</td></tr><tr><td><code>druid.cache.useL2</code></td><td>A boolean indicating whether to query L2 cache, if it&#x27;s a miss in L1. It makes sense to configure this to <code>false</code> on Historical processes, if L2 is a remote cache like <code>memcached</code>, and this cache also used on brokers, because in this case if a query reached Historical it means that a broker didn&#x27;t find corresponding results in the same remote cache, so a query to the remote cache from Historical is guaranteed to be a miss.</td><td><code>true</code></td></tr><tr><td><code>druid.cache.populateL2</code></td><td>A boolean indicating whether to put results into L2 cache.</td><td><code>true</code></td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_LWe7" id="general-query-configuration">General query configuration<a href="#general-query-configuration" class="hash-link" aria-label="Direct link to General query configuration" title="Direct link to General query configuration"></a></h2><p>This section describes configurations that control behavior of Druid&#x27;s query types, applicable to Broker, Historical, and MiddleManager processes.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="overriding-default-query-context-values">Overriding default query context values<a href="#overriding-default-query-context-values" class="hash-link" aria-label="Direct link to Overriding default query context values" title="Direct link to Overriding default query context values"></a></h3><p>Any <a href="/docs/28.0.0/querying/query-context#general-parameters">query context general parameter</a> default value can be
overridden by setting the runtime property in the format of <code>druid.query.default.context.{query_context_key}</code>.
The <code>druid.query.default.context.{query_context_key}</code> runtime property prefix applies to all current and future
query context keys, the same as how query context parameter passed with the query works. Note that the runtime property
value can be overridden if value for the same key is explicitly specify in the query contexts.</p><p>The precedence chain for query context values is as follows:</p><p>hard-coded default value in Druid code &lt;- runtime property not prefixed with <code>druid.query.default.context</code>
&lt;- runtime property prefixed with <code>druid.query.default.context</code> &lt;- context parameter in the query</p><p>Note that not all query context key has a runtime property not prefixed with <code>druid.query.default.context</code> that can
override the hard-coded default value. For example, <code>maxQueuedBytes</code> has <code>druid.broker.http.maxQueuedBytes</code>
but <code>joinFilterRewriteMaxSize</code> does not. Hence, the only way of overriding <code>joinFilterRewriteMaxSize</code> hard-coded default
value is with runtime property <code>druid.query.default.context.joinFilterRewriteMaxSize</code>.</p><p>To further elaborate on the previous example:</p><p>If neither <code>druid.broker.http.maxQueuedBytes</code> or <code>druid.query.default.context.maxQueuedBytes</code> is set and
the query does not have <code>maxQueuedBytes</code> in the context, then the hard-coded value in Druid code is use.
If runtime property only contains <code>druid.broker.http.maxQueuedBytes=x</code> and query does not have <code>maxQueuedBytes</code> in the
context, then the value of the property, <code>x</code>, is use. However, if query does have <code>maxQueuedBytes</code> in the context,
then that value is use instead.
If runtime property only contains <code>druid.query.default.context.maxQueuedBytes=y</code> OR runtime property contains both
<code>druid.broker.http.maxQueuedBytes=x</code> and <code>druid.query.default.context.maxQueuedBytes=y</code>, then the value of
<code>druid.query.default.context.maxQueuedBytes</code>, <code>y</code>, is use (given that query does not have <code>maxQueuedBytes</code> in the
context). If query does have <code>maxQueuedBytes</code> in the context, then that value is use instead.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="topn-query-config">TopN query config<a href="#topn-query-config" class="hash-link" aria-label="Direct link to TopN query config" title="Direct link to TopN query config"></a></h3><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.query.topN.minTopNThreshold</code></td><td>See <a href="/docs/28.0.0/querying/topnquery#aliasing">TopN Aliasing</a> for details.</td><td>1000</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="search-query-config">Search query config<a href="#search-query-config" class="hash-link" aria-label="Direct link to Search query config" title="Direct link to Search query config"></a></h3><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.query.search.maxSearchLimit</code></td><td>Maximum number of search results to return.</td><td>1000</td></tr><tr><td><code>druid.query.search.searchStrategy</code></td><td>Default search query strategy.</td><td>useIndexes</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="segmentmetadata-query-config">SegmentMetadata query config<a href="#segmentmetadata-query-config" class="hash-link" aria-label="Direct link to SegmentMetadata query config" title="Direct link to SegmentMetadata query config"></a></h3><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.query.segmentMetadata.defaultHistory</code></td><td>When no interval is specified in the query, use a default interval of defaultHistory before the end time of the most recent segment, specified in ISO8601 format. This property also controls the duration of the default interval used by GET /druid/v2/datasources/{dataSourceName} interactions for retrieving datasource dimensions/metrics.</td><td>P1W</td></tr><tr><td><code>druid.query.segmentMetadata.defaultAnalysisTypes</code></td><td>This can be used to set the Default Analysis Types for all segment metadata queries, this can be overridden when making the query</td><td>[&quot;cardinality&quot;, &quot;interval&quot;, &quot;minmax&quot;]</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="groupby-query-config">GroupBy query config<a href="#groupby-query-config" class="hash-link" aria-label="Direct link to GroupBy query config" title="Direct link to GroupBy query config"></a></h3><p>This section describes the configurations for groupBy queries. You can set the runtime properties in the <code>runtime.properties</code> file on Broker, Historical, and MiddleManager processes. You can set the query context parameters through the <a href="/docs/28.0.0/querying/query-context">query context</a>.</p><p>Supported runtime properties:</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.query.groupBy.maxSelectorDictionarySize</code></td><td>Maximum amount of heap space (approximately) to use for per-segment string dictionaries. See <a href="/docs/28.0.0/querying/groupbyquery#memory-tuning-and-resource-limits">groupBy memory tuning and resource limits</a> for details.</td><td>100000000</td></tr><tr><td><code>druid.query.groupBy.maxMergingDictionarySize</code></td><td>Maximum amount of heap space (approximately) to use for per-query string dictionaries. When the dictionary exceeds this size, a spill to disk will be triggered. See <a href="/docs/28.0.0/querying/groupbyquery#memory-tuning-and-resource-limits">groupBy memory tuning and resource limits</a> for details.</td><td>100000000</td></tr><tr><td><code>druid.query.groupBy.maxOnDiskStorage</code></td><td>Maximum amount of disk space to use, per-query, for spilling result sets to disk when either the merging buffer or the dictionary fills up. Queries that exceed this limit will fail. Set to zero to disable disk spilling.</td><td>0 (disabled)</td></tr><tr><td><code>druid.query.groupBy.defaultOnDiskStorage</code></td><td>Default amount of disk space to use, per-query, for spilling the result sets to disk when either the merging buffer or the dictionary fills up. Set to zero to disable disk spilling for queries which don&#x27;t override <code>maxOnDiskStorage</code> in their context.</td><td><code>druid.query.groupBy.maxOnDiskStorage</code></td></tr></tbody></table><p>Supported query contexts:</p><table><thead><tr><th>Key</th><th>Description</th></tr></thead><tbody><tr><td><code>maxSelectorDictionarySize</code></td><td>Can be used to lower the value of <code>druid.query.groupBy.maxMergingDictionarySize</code> for this query.</td></tr><tr><td><code>maxMergingDictionarySize</code></td><td>Can be used to lower the value of <code>druid.query.groupBy.maxMergingDictionarySize</code> for this query.</td></tr><tr><td><code>maxOnDiskStorage</code></td><td>Can be used to set <code>maxOnDiskStorage</code> to a value between 0 and <code>druid.query.groupBy.maxOnDiskStorage</code> for this query. If this query context override exceeds <code>druid.query.groupBy.maxOnDiskStorage</code>, the query will use <code>druid.query.groupBy.maxOnDiskStorage</code>. Omitting this from the query context will cause the query to use <code>druid.query.groupBy.defaultOnDiskStorage</code> for <code>maxOnDiskStorage</code></td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="advanced-configurations">Advanced configurations<a href="#advanced-configurations" class="hash-link" aria-label="Direct link to Advanced configurations" title="Direct link to Advanced configurations"></a></h3><p>Supported runtime properties:</p><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.query.groupBy.singleThreaded</code></td><td>Merge results using a single thread.</td><td>false</td></tr><tr><td><code>druid.query.groupBy.bufferGrouperInitialBuckets</code></td><td>Initial number of buckets in the off-heap hash table used for grouping results. Set to 0 to use a reasonable default (1024).</td><td>0</td></tr><tr><td><code>druid.query.groupBy.bufferGrouperMaxLoadFactor</code></td><td>Maximum load factor of the off-heap hash table used for grouping results. When the load factor exceeds this size, the table will be grown or spilled to disk. Set to 0 to use a reasonable default (0.7).</td><td>0</td></tr><tr><td><code>druid.query.groupBy.forceHashAggregation</code></td><td>Force to use hash-based aggregation.</td><td>false</td></tr><tr><td><code>druid.query.groupBy.intermediateCombineDegree</code></td><td>Number of intermediate processes combined together in the combining tree. Higher degrees will need less threads which might be helpful to improve the query performance by reducing the overhead of too many threads if the server has sufficiently powerful CPU cores.</td><td>8</td></tr><tr><td><code>druid.query.groupBy.numParallelCombineThreads</code></td><td>Hint for the number of parallel combining threads. This should be larger than 1 to turn on the parallel combining feature. The actual number of threads used for parallel combining is min(<code>druid.query.groupBy.numParallelCombineThreads</code>, <code>druid.processing.numThreads</code>).</td><td>1 (disabled)</td></tr></tbody></table><p>Supported query contexts:</p><table><thead><tr><th>Key</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>groupByIsSingleThreaded</code></td><td>Overrides the value of <code>druid.query.groupBy.singleThreaded</code> for this query.</td><td></td></tr><tr><td><code>bufferGrouperInitialBuckets</code></td><td>Overrides the value of <code>druid.query.groupBy.bufferGrouperInitialBuckets</code> for this query.</td><td>None</td></tr><tr><td><code>bufferGrouperMaxLoadFactor</code></td><td>Overrides the value of <code>druid.query.groupBy.bufferGrouperMaxLoadFactor</code> for this query.</td><td>None</td></tr><tr><td><code>forceHashAggregation</code></td><td>Overrides the value of <code>druid.query.groupBy.forceHashAggregation</code></td><td>None</td></tr><tr><td><code>intermediateCombineDegree</code></td><td>Overrides the value of <code>druid.query.groupBy.intermediateCombineDegree</code></td><td>None</td></tr><tr><td><code>numParallelCombineThreads</code></td><td>Overrides the value of <code>druid.query.groupBy.numParallelCombineThreads</code></td><td>None</td></tr><tr><td><code>sortByDimsFirst</code></td><td>Sort the results first by dimension values and then by timestamp.</td><td>false</td></tr><tr><td><code>forceLimitPushDown</code></td><td>When all fields in the orderby are part of the grouping key, the broker will push limit application down to the Historical processes. When the sorting order uses fields that are not in the grouping key, applying this optimization can result in approximate results with unknown accuracy, so this optimization is disabled by default in that case. Enabling this context flag turns on limit push down for limit/orderbys that contain non-grouping key columns.</td><td>false</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="expression-processing-configurations">Expression processing configurations<a href="#expression-processing-configurations" class="hash-link" aria-label="Direct link to Expression processing configurations" title="Direct link to Expression processing configurations"></a></h4><table><thead><tr><th>Key</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.expressions.useStrictBooleans</code></td><td>Controls the behavior of Druid boolean operators and functions, if set to <code>true</code> all boolean values are either <code>1</code> or <code>0</code>. See <a href="/docs/28.0.0/querying/math-expr#logical-operator-modes">expression documentation</a> for more information.</td><td>true</td></tr><tr><td><code>druid.expressions.allowNestedArrays</code></td><td>If enabled, Druid array expressions can create nested arrays.</td><td>true</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="router">Router<a href="#router" class="hash-link" aria-label="Direct link to Router" title="Direct link to Router"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="router-process-configs">Router Process Configs<a href="#router-process-configs" class="hash-link" aria-label="Direct link to Router Process Configs" title="Direct link to Router Process Configs"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.host</code></td><td>The host for the current process. This is used to advertise the current processes location as reachable from another process and should generally be specified such that <code>http://${druid.host}/</code> could actually talk to this process</td><td>InetAddress.getLocalHost().getCanonicalHostName()</td></tr><tr><td><code>druid.bindOnHost</code></td><td>Indicating whether the process&#x27;s internal jetty server bind on <code>druid.host</code>. Default is false, which means binding to all interfaces.</td><td>false</td></tr><tr><td><code>druid.plaintextPort</code></td><td>This is the port to actually listen on; unless port mapping is used, this will be the same port as is on <code>druid.host</code></td><td>8888</td></tr><tr><td><code>druid.tlsPort</code></td><td>TLS port for HTTPS connector, if <a href="/docs/28.0.0/operations/tls-support">druid.enableTlsPort</a> is set then this config will be used. If <code>druid.host</code> contains port then that port will be ignored. This should be a non-negative Integer.</td><td>9088</td></tr><tr><td><code>druid.service</code></td><td>The name of the service. This is used as a dimension when emitting metrics and alerts to differentiate between the various services</td><td>druid/router</td></tr></tbody></table><h4 class="anchor anchorWithStickyNavbar_LWe7" id="runtime-configuration">Runtime Configuration<a href="#runtime-configuration" class="hash-link" aria-label="Direct link to Runtime Configuration" title="Direct link to Runtime Configuration"></a></h4><table><thead><tr><th>Property</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>druid.router.defaultBrokerServiceName</code></td><td>The default Broker to connect to in case service discovery fails.</td><td>druid/broker</td></tr><tr><td><code>druid.router.tierToBrokerMap</code></td><td>Queries for a certain tier of data are routed to their appropriate Broker. This value should be an ordered JSON map of tiers to Broker names. The priority of Brokers is based on the ordering.</td><td><code>{&quot;_default_tier&quot;: &quot;&lt;defaultBrokerServiceName&gt;&quot;}</code></td></tr><tr><td><code>druid.router.defaultRule</code></td><td>The default rule for all datasources.</td><td>&quot;_default&quot;</td></tr><tr><td><code>druid.router.pollPeriod</code></td><td>How often to poll for new rules.</td><td>PT1M</td></tr><tr><td><code>druid.router.sql.enable</code></td><td>Enable routing of SQL queries using strategies. When<code>true</code>, the Router uses the strategies defined in <code>druid.router.strategies</code> to determine the broker service for a given SQL query. When <code>false</code>, the Router uses the <code>defaultBrokerServiceName</code>.</td><td><code>false</code></td></tr><tr><td><code>druid.router.strategies</code></td><td>Please see <a href="/docs/28.0.0/design/router#router-strategies">Router Strategies</a> for details.</td><td>[{&quot;type&quot;:&quot;timeBoundary&quot;},{&quot;type&quot;:&quot;priority&quot;}]</td></tr><tr><td><code>druid.router.avatica.balancer.type</code></td><td>Class to use for balancing Avatica queries across Brokers. Please see <a href="/docs/28.0.0/design/router#avatica-query-balancing">Avatica Query Balancing</a>.</td><td>rendezvousHash</td></tr><tr><td><code>druid.router.managementProxy.enabled</code></td><td>Enables the Router&#x27;s <a href="/docs/28.0.0/design/router#router-as-management-proxy">management proxy</a> functionality.</td><td>false</td></tr><tr><td><code>druid.router.http.numConnections</code></td><td>Size of connection pool for the Router to connect to Broker processes. If there are more queries than this number that all need to speak to the same process, then they will queue up.</td><td><code>20</code></td></tr><tr><td><code>druid.router.http.eagerInitialization</code></td><td>Indicates that http connections from Router to Broker should be eagerly initialized. If set to true, <code>numConnections</code> connections are created upon initialization</td><td><code>true</code></td></tr><tr><td><code>druid.router.http.readTimeout</code></td><td>The timeout for data reads from Broker processes.</td><td><code>PT15M</code></td></tr><tr><td><code>druid.router.http.numMaxThreads</code></td><td>Maximum number of worker threads to handle HTTP requests and responses</td><td><code>max(10, ((number of cores * 17) / 16 + 2) + 30)</code></td></tr><tr><td><code>druid.router.http.numRequestsQueued</code></td><td>Maximum number of requests that may be queued to a destination</td><td><code>1024</code></td></tr><tr><td><code>druid.router.http.requestBuffersize</code></td><td>Size of the content buffer for receiving requests. These buffers are only used for active connections that have requests with bodies that will not fit within the header buffer</td><td><code>8 * 1024</code></td></tr></tbody></table></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/28.0.0/api-reference/sql-jdbc"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">SQL JDBC driver</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/28.0.0/configuration/extensions"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Extensions</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#recommended-configuration-file-organization" class="table-of-contents__link toc-highlight">Recommended Configuration File Organization</a></li><li><a href="#configuration-interpolation" class="table-of-contents__link toc-highlight">Configuration Interpolation</a></li><li><a href="#common-configurations" class="table-of-contents__link toc-highlight">Common Configurations</a><ul><li><a href="#jvm-configuration-best-practices" class="table-of-contents__link toc-highlight">JVM Configuration Best Practices</a></li><li><a href="#extensions" class="table-of-contents__link toc-highlight">Extensions</a></li><li><a href="#modules" class="table-of-contents__link toc-highlight">Modules</a></li><li><a href="#zookeeper" class="table-of-contents__link toc-highlight">ZooKeeper</a></li><li><a href="#tls" class="table-of-contents__link toc-highlight">TLS</a></li><li><a href="#authentication-and-authorization" class="table-of-contents__link toc-highlight">Authentication and Authorization</a></li><li><a href="#startup-logging" class="table-of-contents__link toc-highlight">Startup Logging</a></li><li><a href="#request-logging" class="table-of-contents__link toc-highlight">Request Logging</a></li><li><a href="#audit-logging" class="table-of-contents__link toc-highlight">Audit Logging</a></li><li><a href="#enabling-metrics" class="table-of-contents__link toc-highlight">Enabling Metrics</a></li><li><a href="#metadata-storage" class="table-of-contents__link toc-highlight">Metadata storage</a></li><li><a href="#deep-storage" class="table-of-contents__link toc-highlight">Deep storage</a></li><li><a href="#ingestion-security-configuration" class="table-of-contents__link toc-highlight">Ingestion Security Configuration</a></li><li><a href="#external-data-access-security-configuration" class="table-of-contents__link toc-highlight">External Data Access Security Configuration</a></li><li><a href="#task-logging" class="table-of-contents__link toc-highlight">Task Logging</a></li><li><a href="#api-error-response" class="table-of-contents__link toc-highlight">API error response</a></li><li><a href="#overlord-discovery" class="table-of-contents__link toc-highlight">Overlord Discovery</a></li><li><a href="#coordinator-discovery" class="table-of-contents__link toc-highlight">Coordinator Discovery</a></li><li><a href="#announcing-segments" class="table-of-contents__link toc-highlight">Announcing Segments</a></li><li><a href="#javascript" class="table-of-contents__link toc-highlight">JavaScript</a></li><li><a href="#double-column-storage" class="table-of-contents__link toc-highlight">Double Column storage</a></li><li><a href="#sql-compatible-null-handling" class="table-of-contents__link toc-highlight">SQL compatible null handling</a></li><li><a href="#http-client" class="table-of-contents__link toc-highlight">HTTP Client</a></li><li><a href="#common-endpoints-configuration" class="table-of-contents__link toc-highlight">Common endpoints Configuration</a></li></ul></li><li><a href="#master-server" class="table-of-contents__link toc-highlight">Master Server</a><ul><li><a href="#coordinator" class="table-of-contents__link toc-highlight">Coordinator</a></li><li><a href="#overlord" class="table-of-contents__link toc-highlight">Overlord</a></li></ul></li><li><a href="#data-server" class="table-of-contents__link toc-highlight">Data Server</a><ul><li><a href="#middlemanager-and-peons" class="table-of-contents__link toc-highlight">MiddleManager and Peons</a></li><li><a href="#indexer" class="table-of-contents__link toc-highlight">Indexer</a></li><li><a href="#historical" class="table-of-contents__link toc-highlight">Historical</a></li></ul></li><li><a href="#query-server" class="table-of-contents__link toc-highlight">Query Server</a><ul><li><a href="#broker" class="table-of-contents__link toc-highlight">Broker</a></li></ul></li><li><a href="#cache-configuration" class="table-of-contents__link toc-highlight">Cache Configuration</a><ul><li><a href="#cache-type" class="table-of-contents__link toc-highlight">Cache Type</a></li></ul></li><li><a href="#general-query-configuration" class="table-of-contents__link toc-highlight">General query configuration</a><ul><li><a href="#overriding-default-query-context-values" class="table-of-contents__link toc-highlight">Overriding default query context values</a></li><li><a href="#topn-query-config" class="table-of-contents__link toc-highlight">TopN query config</a></li><li><a href="#search-query-config" class="table-of-contents__link toc-highlight">Search query config</a></li><li><a href="#segmentmetadata-query-config" class="table-of-contents__link toc-highlight">SegmentMetadata query config</a></li><li><a href="#groupby-query-config" class="table-of-contents__link toc-highlight">GroupBy query config</a></li><li><a href="#advanced-configurations" class="table-of-contents__link toc-highlight">Advanced configurations</a></li><li><a href="#router" class="table-of-contents__link toc-highlight">Router</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/img/favicon.png" class="themedImage_ToTc themedImage--light_HNdA footer__logo"><img src="/img/favicon.png" class="themedImage_ToTc themedImage--dark_i4oU footer__logo"></div><div class="footer__copyright">Copyright © 2023 Apache Software Foundation. Except where otherwise noted, licensed under CC BY-SA 4.0. Apache Druid, Druid, and the Druid logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.0dcbfdea.js"></script>
<script src="/assets/js/main.7f6fdf81.js"></script>
</body>
</html>