blob: bda64f3382ae81cf3cb24714280b321e56fb7cc7 [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-tutorials/cluster">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.4.1">
<title data-rh="true">Clustered deployment | 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/26.0.0/tutorials/cluster"><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="Clustered deployment | 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/26.0.0/tutorials/cluster"><link data-rh="true" rel="alternate" href="https://druid.apache.org/docs/26.0.0/tutorials/cluster" hreflang="en"><link data-rh="true" rel="alternate" href="https://druid.apache.org/docs/26.0.0/tutorials/cluster" 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.f80751b3.css">
<link rel="preload" href="/assets/js/runtime~main.38900cbf.js" as="script">
<link rel="preload" href="/assets/js/main.5e106d68.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/26.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"><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/26.0.0/design/">Getting started</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" tabindex="0" href="/docs/26.0.0/design/">Introduction to Apache Druid</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/26.0.0/tutorials/">Quickstart (local)</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/26.0.0/operations/single-server">Single server deployment</a></li><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/26.0.0/tutorials/cluster">Clustered deployment</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/26.0.0/tutorials/tutorial-batch">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/26.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/26.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/26.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/26.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/26.0.0/configuration/">Configuration</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/26.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/26.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/26.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">Getting started</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">Clustered deployment</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>Clustered deployment</h1></header><p>Apache Druid is designed to be deployed as a scalable, fault-tolerant cluster.</p><p>In this document, we&#x27;ll set up a simple cluster and discuss how it can be further configured to meet
your needs.</p><p>This simple cluster will feature:</p><ul><li>A Master server to host the Coordinator and Overlord processes</li><li>Two scalable, fault-tolerant Data servers running Historical and MiddleManager processes</li><li>A query server, hosting the Druid Broker and Router processes</li></ul><p>In production, we recommend deploying multiple Master servers and multiple Query servers in a fault-tolerant configuration based on your specific fault-tolerance needs, but you can get started quickly with one Master and one Query server and add more servers later.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="select-hardware">Select hardware<a href="#select-hardware" class="hash-link" aria-label="Direct link to Select hardware" title="Direct link to Select hardware"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fresh-deployment">Fresh Deployment<a href="#fresh-deployment" class="hash-link" aria-label="Direct link to Fresh Deployment" title="Direct link to Fresh Deployment"></a></h3><p>If you do not have an existing Druid cluster, and wish to start running Druid in a clustered deployment, this guide provides an example clustered deployment with pre-made configurations.</p><h4 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></h4><p>The Coordinator and Overlord processes are responsible for handling the metadata and coordination needs of your cluster. They can be colocated together on the same server.</p><p>In this example, we will be deploying the equivalent of one AWS <a href="https://aws.amazon.com/ec2/instance-types/m5/" target="_blank" rel="noopener noreferrer">m5.2xlarge</a> instance.</p><p>This hardware offers:</p><ul><li>8 vCPUs</li><li>32 GiB RAM</li></ul><p>Example Master server configurations that have been sized for this hardware can be found under <code>conf/druid/cluster/master</code>.</p><h4 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></h4><p>Historicals and MiddleManagers can be colocated on the same server to handle the actual data in your cluster. These servers benefit greatly from CPU, RAM,
and SSDs.</p><p>In this example, we will be deploying the equivalent of two AWS <a href="https://aws.amazon.com/ec2/instance-types/i3/" target="_blank" rel="noopener noreferrer">i3.4xlarge</a> instances.</p><p>This hardware offers:</p><ul><li>16 vCPUs</li><li>122 GiB RAM</li><li>2 * 1.9TB SSD storage</li></ul><p>Example Data server configurations that have been sized for this hardware can be found under <code>conf/druid/cluster/data</code>.</p><h4 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></h4><p>Druid Brokers accept queries and farm them out to the rest of the cluster. They also optionally maintain an
in-memory query cache. These servers benefit greatly from CPU and RAM.</p><p>In this example, we will be deploying the equivalent of one AWS <a href="https://aws.amazon.com/ec2/instance-types/m5/" target="_blank" rel="noopener noreferrer">m5.2xlarge</a> instance.</p><p>This hardware offers:</p><ul><li>8 vCPUs</li><li>32 GiB RAM</li></ul><p>You can consider co-locating any open source UIs or query libraries on the same server that the Broker is running on.</p><p>Example Query server configurations that have been sized for this hardware can be found under <code>conf/druid/cluster/query</code>.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="other-hardware-sizes">Other Hardware Sizes<a href="#other-hardware-sizes" class="hash-link" aria-label="Direct link to Other Hardware Sizes" title="Direct link to Other Hardware Sizes"></a></h4><p>The example cluster above is chosen as a single example out of many possible ways to size a Druid cluster.</p><p>You can choose smaller/larger hardware or less/more servers for your specific needs and constraints.</p><p>If your use case has complex scaling requirements, you can also choose to not co-locate Druid processes (e.g., standalone Historical servers).</p><p>The information in the <a href="/docs/26.0.0/operations/basic-cluster-tuning">basic cluster tuning guide</a> can help with your decision-making process and with sizing your configurations.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="migrating-from-a-single-server-deployment">Migrating from a single-server deployment<a href="#migrating-from-a-single-server-deployment" class="hash-link" aria-label="Direct link to Migrating from a single-server deployment" title="Direct link to Migrating from a single-server deployment"></a></h3><p>If you have an existing single-server deployment, such as the ones from the <a href="/docs/26.0.0/operations/single-server">single-server deployment examples</a>, and you wish to migrate to a clustered deployment of similar scale, the following section contains guidelines for choosing equivalent hardware using the Master/Data/Query server organization.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="master-server-1">Master server<a href="#master-server-1" class="hash-link" aria-label="Direct link to Master server" title="Direct link to Master server"></a></h4><p>The main considerations for the Master server are available CPUs and RAM for the Coordinator and Overlord heaps.</p><p>Sum up the allocated heap sizes for your Coordinator and Overlord from the single-server deployment, and choose Master server hardware with enough RAM for the combined heaps, with some extra RAM for other processes on the machine.</p><p>For CPU cores, you can choose hardware with approximately 1/4th of the cores of the single-server deployment.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="data-server-1">Data server<a href="#data-server-1" class="hash-link" aria-label="Direct link to Data server" title="Direct link to Data server"></a></h4><p>When choosing Data server hardware for the cluster, the main considerations are available CPUs and RAM, and using SSD storage if feasible.</p><p>In a clustered deployment, having multiple Data servers is a good idea for fault-tolerance purposes.</p><p>When choosing the Data server hardware, you can choose a split factor <code>N</code>, divide the original CPU/RAM of the single-server deployment by <code>N</code>, and deploy <code>N</code> Data servers of reduced size in the new cluster.</p><p>Instructions for adjusting the Historical/MiddleManager configs for the split are described in a later section in this guide.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="query-server-1">Query server<a href="#query-server-1" class="hash-link" aria-label="Direct link to Query server" title="Direct link to Query server"></a></h4><p>The main considerations for the Query server are available CPUs and RAM for the Broker heap + direct memory, and Router heap.</p><p>Sum up the allocated memory sizes for your Broker and Router from the single-server deployment, and choose Query server hardware with enough RAM to cover the Broker/Router, with some extra RAM for other processes on the machine.</p><p>For CPU cores, you can choose hardware with approximately 1/4th of the cores of the single-server deployment.</p><p>The <a href="/docs/26.0.0/operations/basic-cluster-tuning">basic cluster tuning guide</a> has information on how to calculate Broker/Router memory usage.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="select-os">Select OS<a href="#select-os" class="hash-link" aria-label="Direct link to Select OS" title="Direct link to Select OS"></a></h2><p>We recommend running your favorite Linux distribution. You will also need </p><ul><li><a href="/docs/26.0.0/operations/java">Java 8 or 11</a>.</li><li>Python 2 or Python 3</li></ul><blockquote><p>If needed, you can specify where to find Java using the environment variables
<code>DRUID_JAVA_HOME</code> or <code>JAVA_HOME</code>. For more details run the <code>bin/verify-java</code> script.</p></blockquote><p>For information about installing Java, see the documentation for your OS package manager. If your Ubuntu-based OS does not have a recent enough version of Java, WebUpd8 offers <a href="http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html" target="_blank" rel="noopener noreferrer">packages for those
OSes</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="download-the-distribution">Download the distribution<a href="#download-the-distribution" class="hash-link" aria-label="Direct link to Download the distribution" title="Direct link to Download the distribution"></a></h2><p>First, download and unpack the release archive. It&#x27;s best to do this on a single machine at first,
since you will be editing the configurations and then copying the modified distribution out to all
of your servers.</p><p><a href="https://www.apache.org/dyn/closer.cgi?path=/druid/26.0.0/apache-druid-26.0.0-bin.tar.gz" target="_blank" rel="noopener noreferrer">Download</a>
the 26.0.0 release.</p><p>Extract Druid by running the following commands in your terminal:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">tar</span><span class="token plain"> -xzf apache-druid-26.0.0-bin.tar.gz</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token builtin class-name" style="color:rgb(255, 203, 107)">cd</span><span class="token plain"> apache-druid-26.0.0</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>In the package, you should find:</p><ul><li><code>LICENSE</code> and <code>NOTICE</code> files</li><li><code>bin/*</code> - scripts related to the <a href="/docs/26.0.0/tutorials/">single-machine quickstart</a></li><li><code>conf/druid/cluster/*</code> - template configurations for a clustered setup</li><li><code>extensions/*</code> - core Druid extensions</li><li><code>hadoop-dependencies/*</code> - Druid Hadoop dependencies</li><li><code>lib/*</code> - libraries and dependencies for core Druid</li><li><code>quickstart/*</code> - files related to the <a href="/docs/26.0.0/tutorials/">single-machine quickstart</a></li></ul><p>We&#x27;ll be editing the files in <code>conf/druid/cluster/</code> in order to get things running.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="migrating-from-single-server-deployments">Migrating from Single-Server Deployments<a href="#migrating-from-single-server-deployments" class="hash-link" aria-label="Direct link to Migrating from Single-Server Deployments" title="Direct link to Migrating from Single-Server Deployments"></a></h3><p>In the following sections we will be editing the configs under <code>conf/druid/cluster</code>.</p><p>If you have an existing single-server deployment, please copy your existing configs to <code>conf/druid/cluster</code> to preserve any config changes you have made.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="configure-metadata-storage-and-deep-storage">Configure metadata storage and deep storage<a href="#configure-metadata-storage-and-deep-storage" class="hash-link" aria-label="Direct link to Configure metadata storage and deep storage" title="Direct link to Configure metadata storage and deep storage"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="migrating-from-single-server-deployments-1">Migrating from Single-Server Deployments<a href="#migrating-from-single-server-deployments-1" class="hash-link" aria-label="Direct link to Migrating from Single-Server Deployments" title="Direct link to Migrating from Single-Server Deployments"></a></h3><p>If you have an existing single-server deployment and you wish to preserve your data across the migration, please follow the instructions at <a href="/docs/26.0.0/operations/metadata-migration">metadata migration</a> and <a href="/docs/26.0.0/operations/deep-storage-migration">deep storage migration</a> before updating your metadata/deep storage configs.</p><p>These guides are targeted at single-server deployments that use the Derby metadata store and local deep storage. If you are already using a non-Derby metadata store in your single-server cluster, you can reuse the existing metadata store for the new cluster.</p><p>These guides also provide information on migrating segments from local deep storage. A clustered deployment requires distributed deep storage like S3 or HDFS. If your single-server deployment was already using distributed deep storage, you can reuse the existing deep storage for the new cluster.</p><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>In <code>conf/druid/cluster/_common/common.runtime.properties</code>, replace
&quot;metadata.storage.*&quot; with the address of the machine that you will use as your metadata store:</p><ul><li><code>druid.metadata.storage.connector.connectURI</code></li><li><code>druid.metadata.storage.connector.host</code></li></ul><p>In a production deployment, we recommend running a dedicated metadata store such as MySQL or PostgreSQL with replication, deployed separately from the Druid servers.</p><p>The <a href="/docs/26.0.0/development/extensions-core/mysql">MySQL extension</a> and <a href="/docs/26.0.0/development/extensions-core/postgresql">PostgreSQL extension</a> docs have instructions for extension configuration and initial database setup.</p><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>Druid relies on a distributed filesystem or large object (blob) store for data storage. The most
commonly used deep storage implementations are S3 (popular for those on AWS) and HDFS (popular if
you already have a Hadoop deployment).</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="s3">S3<a href="#s3" class="hash-link" aria-label="Direct link to S3" title="Direct link to S3"></a></h4><p>In <code>conf/druid/cluster/_common/common.runtime.properties</code>,</p><ul><li><p>Add &quot;druid-s3-extensions&quot; to <code>druid.extensions.loadList</code>.</p></li><li><p>Comment out the configurations for local storage under &quot;Deep Storage&quot; and &quot;Indexing service logs&quot;.</p></li><li><p>Uncomment and configure appropriate values in the &quot;For S3&quot; sections of &quot;Deep Storage&quot; and
&quot;Indexing service logs&quot;.</p></li></ul><p>After this, you should have made the following changes:</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.extensions.loadList=[&quot;druid-s3-extensions&quot;]</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">#druid.storage.type=local</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">#druid.storage.storageDirectory=var/druid/segments</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">druid.storage.type=s3</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.storage.bucket=your-bucket</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.storage.baseKey=druid/segments</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.s3.accessKey=...</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.s3.secretKey=...</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">#druid.indexer.logs.type=file</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">#druid.indexer.logs.directory=var/druid/indexing-logs</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">druid.indexer.logs.type=s3</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.logs.s3Bucket=your-bucket</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.logs.s3Prefix=druid/indexing-logs</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>Please see the <a href="/docs/26.0.0/development/extensions-core/s3">S3 extension</a> documentation for more info.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="hdfs">HDFS<a href="#hdfs" class="hash-link" aria-label="Direct link to HDFS" title="Direct link to HDFS"></a></h4><p>In <code>conf/druid/cluster/_common/common.runtime.properties</code>,</p><ul><li><p>Add &quot;druid-hdfs-storage&quot; to <code>druid.extensions.loadList</code>.</p></li><li><p>Comment out the configurations for local storage under &quot;Deep Storage&quot; and &quot;Indexing service logs&quot;.</p></li><li><p>Uncomment and configure appropriate values in the &quot;For HDFS&quot; sections of &quot;Deep Storage&quot; and
&quot;Indexing service logs&quot;.</p></li></ul><p>After this, you should have made the following changes:</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.extensions.loadList=[&quot;druid-hdfs-storage&quot;]</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">#druid.storage.type=local</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">#druid.storage.storageDirectory=var/druid/segments</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">druid.storage.type=hdfs</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.storage.storageDirectory=/druid/segments</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">#druid.indexer.logs.type=file</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">#druid.indexer.logs.directory=var/druid/indexing-logs</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">druid.indexer.logs.type=hdfs</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.logs.directory=/druid/indexing-logs</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>Also,</p><ul><li>Place your Hadoop configuration XMLs (core-site.xml, hdfs-site.xml, yarn-site.xml,
mapred-site.xml) on the classpath of your Druid processes. You can do this by copying them into
<code>conf/druid/cluster/_common/</code>.</li></ul><p>Please see the <a href="/docs/26.0.0/development/extensions-core/hdfs">HDFS extension</a> documentation for more info.</p><a name="hadoop"></a><h2 class="anchor anchorWithStickyNavbar_LWe7" id="configure-for-connecting-to-hadoop-optional">Configure for connecting to Hadoop (optional)<a href="#configure-for-connecting-to-hadoop-optional" class="hash-link" aria-label="Direct link to Configure for connecting to Hadoop (optional)" title="Direct link to Configure for connecting to Hadoop (optional)"></a></h2><p>If you will be loading data from a Hadoop cluster, then at this point you should configure Druid to be aware
of your cluster:</p><ul><li><p>Update <code>druid.indexer.task.hadoopWorkingPath</code> in <code>conf/druid/cluster/middleManager/runtime.properties</code> to
a path on HDFS that you&#x27;d like to use for temporary files required during the indexing process.
<code>druid.indexer.task.hadoopWorkingPath=/tmp/druid-indexing</code> is a common choice.</p></li><li><p>Place your Hadoop configuration XMLs (core-site.xml, hdfs-site.xml, yarn-site.xml,
mapred-site.xml) on the classpath of your Druid processes. You can do this by copying them into
<code>conf/druid/cluster/_common/core-site.xml</code>, <code>conf/druid/cluster/_common/hdfs-site.xml</code>, and so on.</p></li></ul><p>Note that you don&#x27;t need to use HDFS deep storage in order to load data from Hadoop. For example, if
your cluster is running on Amazon Web Services, we recommend using S3 for deep storage even if you
are loading data using Hadoop or Elastic MapReduce.</p><p>For more info, please see the <a href="/docs/26.0.0/ingestion/hadoop">Hadoop-based ingestion</a> page.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="configure-zookeeper-connection">Configure Zookeeper connection<a href="#configure-zookeeper-connection" class="hash-link" aria-label="Direct link to Configure Zookeeper connection" title="Direct link to Configure Zookeeper connection"></a></h2><p>In a production cluster, we recommend using a dedicated ZK cluster in a quorum, deployed separately from the Druid servers.</p><p>In <code>conf/druid/cluster/_common/common.runtime.properties</code>, set
<code>druid.zk.service.host</code> to a <a href="https://zookeeper.apache.org/doc/current/zookeeperProgrammers.html" target="_blank" rel="noopener noreferrer">connection string</a>
containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server in your ZK quorum.
(e.g. &quot;127.0.0.1:4545&quot; or &quot;127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002&quot;)</p><p>You can also choose to run ZK on the Master servers instead of having a dedicated ZK cluster. If doing so, we recommend deploying 3 Master servers so that you have a ZK quorum.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="configuration-tuning">Configuration Tuning<a href="#configuration-tuning" class="hash-link" aria-label="Direct link to Configuration Tuning" title="Direct link to Configuration Tuning"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="migrating-from-a-single-server-deployment-1">Migrating from a Single-Server Deployment<a href="#migrating-from-a-single-server-deployment-1" class="hash-link" aria-label="Direct link to Migrating from a Single-Server Deployment" title="Direct link to Migrating from a Single-Server Deployment"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="master">Master<a href="#master" class="hash-link" aria-label="Direct link to Master" title="Direct link to Master"></a></h4><p>If you are using an example configuration from <a href="/docs/26.0.0/operations/single-server">single-server deployment examples</a>, these examples combine the Coordinator and Overlord processes into one combined process.</p><p>The example configs under <code>conf/druid/cluster/master/coordinator-overlord</code> also combine the Coordinator and Overlord processes.</p><p>You can copy your existing <code>coordinator-overlord</code> configs from the single-server deployment to <code>conf/druid/cluster/master/coordinator-overlord</code>.</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="data">Data<a href="#data" class="hash-link" aria-label="Direct link to Data" title="Direct link to Data"></a></h4><p>Suppose we are migrating from a single-server deployment that had 32 CPU and 256GiB RAM. In the old deployment, the following configurations for Historicals and MiddleManagers were applied:</p><p>Historical (Single-server)</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.processing.buffer.sizeBytes=500MiB</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.processing.numMergeBuffers=8</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.processing.numThreads=31</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>MiddleManager (Single-server)</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.worker.capacity=8</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.fork.property.druid.processing.numMergeBuffers=2</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.fork.property.druid.processing.buffer.sizeBytes=100MiB</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.fork.property.druid.processing.numThreads=1</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>In the clustered deployment, we can choose a split factor (2 in this example), and deploy 2 Data servers with 16CPU and 128GiB RAM each. The areas to scale are the following:</p><p>Historical</p><ul><li><code>druid.processing.numThreads</code>: Set to <code>(num_cores - 1)</code> based on the new hardware</li><li><code>druid.processing.numMergeBuffers</code>: Divide the old value from the single-server deployment by the split factor</li><li><code>druid.processing.buffer.sizeBytes</code>: Keep this unchanged</li></ul><p>MiddleManager:</p><ul><li><code>druid.worker.capacity</code>: Divide the old value from the single-server deployment by the split factor</li><li><code>druid.indexer.fork.property.druid.processing.numMergeBuffers</code>: Keep this unchanged</li><li><code>druid.indexer.fork.property.druid.processing.buffer.sizeBytes</code>: Keep this unchanged</li><li><code>druid.indexer.fork.property.druid.processing.numThreads</code>: Keep this unchanged</li></ul><p>The resulting configs after the split:</p><p>New Historical (on 2 Data servers)</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.processing.buffer.sizeBytes=500MiB</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.processing.numMergeBuffers=4</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.processing.numThreads=15</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>New MiddleManager (on 2 Data servers)</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.worker.capacity=4</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.fork.property.druid.processing.numMergeBuffers=2</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.fork.property.druid.processing.buffer.sizeBytes=100MiB</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">druid.indexer.fork.property.druid.processing.numThreads=1</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="query">Query<a href="#query" class="hash-link" aria-label="Direct link to Query" title="Direct link to Query"></a></h4><p>You can copy your existing Broker and Router configs to the directories under <code>conf/druid/cluster/query</code>, no modifications are needed, as long as the new hardware is sized accordingly.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="fresh-deployment-1">Fresh deployment<a href="#fresh-deployment-1" class="hash-link" aria-label="Direct link to Fresh deployment" title="Direct link to Fresh deployment"></a></h3><p>If you are using the example cluster described above:</p><ul><li>1 Master server (m5.2xlarge)</li><li>2 Data servers (i3.4xlarge)</li><li>1 Query server (m5.2xlarge)</li></ul><p>The configurations under <code>conf/druid/cluster</code> have already been sized for this hardware and you do not need to make further modifications for general use cases.</p><p>If you have chosen different hardware, the <a href="/docs/26.0.0/operations/basic-cluster-tuning">basic cluster tuning guide</a> can help you size your configurations.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="open-ports-if-using-a-firewall">Open ports (if using a firewall)<a href="#open-ports-if-using-a-firewall" class="hash-link" aria-label="Direct link to Open ports (if using a firewall)" title="Direct link to Open ports (if using a firewall)"></a></h2><p>If you&#x27;re using a firewall or some other system that only allows traffic on specific ports, allow
inbound connections on the following:</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="master-server-2">Master Server<a href="#master-server-2" class="hash-link" aria-label="Direct link to Master Server" title="Direct link to Master Server"></a></h3><ul><li>1527 (Derby metadata store; not needed if you are using a separate metadata store like MySQL or PostgreSQL)</li><li>2181 (ZooKeeper; not needed if you are using a separate ZooKeeper cluster)</li><li>8081 (Coordinator)</li><li>8090 (Overlord)</li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="data-server-2">Data Server<a href="#data-server-2" class="hash-link" aria-label="Direct link to Data Server" title="Direct link to Data Server"></a></h3><ul><li>8083 (Historical)</li><li>8091, 8100<!-- --><!-- -->8199 (Druid Middle Manager; you may need higher than port 8199 if you have a very high <code>druid.worker.capacity</code>)</li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="query-server-2">Query Server<a href="#query-server-2" class="hash-link" aria-label="Direct link to Query Server" title="Direct link to Query Server"></a></h3><ul><li>8082 (Broker)</li><li>8088 (Router, if used)</li></ul><blockquote><p>In production, we recommend deploying ZooKeeper and your metadata store on their own dedicated hardware,
rather than on the Master server.</p></blockquote><h2 class="anchor anchorWithStickyNavbar_LWe7" id="start-master-server">Start Master Server<a href="#start-master-server" class="hash-link" aria-label="Direct link to Start Master Server" title="Direct link to Start Master Server"></a></h2><p>Copy the Druid distribution and your edited configurations to your Master server.</p><p>If you have been editing the configurations on your local machine, you can use <em>rsync</em> to copy them:</p><div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token function" style="color:rgb(130, 170, 255)">rsync</span><span class="token plain"> -az apache-druid-26.0.0/ MASTER_SERVER:apache-druid-26.0.0/</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="no-zookeeper-on-master">No Zookeeper on Master<a href="#no-zookeeper-on-master" class="hash-link" aria-label="Direct link to No Zookeeper on Master" title="Direct link to No Zookeeper on Master"></a></h3><p>From the distribution root, run the following command to start the Master server:</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">bin/start-cluster-master-no-zk-server</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="with-zookeeper-on-master">With Zookeeper on Master<a href="#with-zookeeper-on-master" class="hash-link" aria-label="Direct link to With Zookeeper on Master" title="Direct link to With Zookeeper on Master"></a></h3><p>If you plan to run ZK on Master servers, first update <code>conf/zoo.cfg</code> to reflect how you plan to run ZK. Then, you
can start the Master server processes together with ZK using:</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">bin/start-cluster-master-with-zk-server</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><blockquote><p>In production, we also recommend running a ZooKeeper cluster on its own dedicated hardware.</p></blockquote><h2 class="anchor anchorWithStickyNavbar_LWe7" id="start-data-server">Start Data Server<a href="#start-data-server" class="hash-link" aria-label="Direct link to Start Data Server" title="Direct link to Start Data Server"></a></h2><p>Copy the Druid distribution and your edited configurations to your Data servers.</p><p>From the distribution root, run the following command to start the Data server:</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">bin/start-cluster-data-server</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 add more Data servers as needed.</p><blockquote><p>For clusters with complex resource allocation needs, you can break apart Historicals and MiddleManagers and scale the components individually.
This also allows you take advantage of Druid&#x27;s built-in MiddleManager autoscaling facility.</p></blockquote><h2 class="anchor anchorWithStickyNavbar_LWe7" id="start-query-server">Start Query Server<a href="#start-query-server" class="hash-link" aria-label="Direct link to Start Query Server" title="Direct link to Start Query Server"></a></h2><p>Copy the Druid distribution and your edited configurations to your Query servers.</p><p>From the distribution root, run the following command to start the Query server:</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">bin/start-cluster-query-server</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 add more Query servers as needed based on query load. If you increase the number of Query servers, be sure to adjust the connection pools on your Historicals and Tasks as described in the <a href="/docs/26.0.0/operations/basic-cluster-tuning">basic cluster tuning guide</a>.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="loading-data">Loading data<a href="#loading-data" class="hash-link" aria-label="Direct link to Loading data" title="Direct link to Loading data"></a></h2><p>Congratulations, you now have a Druid cluster! The next step is to learn about recommended ways to load data into
Druid based on your use case. Read more about <a href="/docs/26.0.0/ingestion/">loading data</a>.</p></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/26.0.0/operations/single-server"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Single server deployment</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/26.0.0/tutorials/tutorial-batch"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Load files natively</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="#select-hardware" class="table-of-contents__link toc-highlight">Select hardware</a><ul><li><a href="#fresh-deployment" class="table-of-contents__link toc-highlight">Fresh Deployment</a></li><li><a href="#migrating-from-a-single-server-deployment" class="table-of-contents__link toc-highlight">Migrating from a single-server deployment</a></li></ul></li><li><a href="#select-os" class="table-of-contents__link toc-highlight">Select OS</a></li><li><a href="#download-the-distribution" class="table-of-contents__link toc-highlight">Download the distribution</a><ul><li><a href="#migrating-from-single-server-deployments" class="table-of-contents__link toc-highlight">Migrating from Single-Server Deployments</a></li></ul></li><li><a href="#configure-metadata-storage-and-deep-storage" class="table-of-contents__link toc-highlight">Configure metadata storage and deep storage</a><ul><li><a href="#migrating-from-single-server-deployments-1" class="table-of-contents__link toc-highlight">Migrating from Single-Server Deployments</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></ul></li><li><a href="#configure-for-connecting-to-hadoop-optional" class="table-of-contents__link toc-highlight">Configure for connecting to Hadoop (optional)</a></li><li><a href="#configure-zookeeper-connection" class="table-of-contents__link toc-highlight">Configure Zookeeper connection</a></li><li><a href="#configuration-tuning" class="table-of-contents__link toc-highlight">Configuration Tuning</a><ul><li><a href="#migrating-from-a-single-server-deployment-1" class="table-of-contents__link toc-highlight">Migrating from a Single-Server Deployment</a></li><li><a href="#fresh-deployment-1" class="table-of-contents__link toc-highlight">Fresh deployment</a></li></ul></li><li><a href="#open-ports-if-using-a-firewall" class="table-of-contents__link toc-highlight">Open ports (if using a firewall)</a><ul><li><a href="#master-server-2" class="table-of-contents__link toc-highlight">Master Server</a></li><li><a href="#data-server-2" class="table-of-contents__link toc-highlight">Data Server</a></li><li><a href="#query-server-2" class="table-of-contents__link toc-highlight">Query Server</a></li></ul></li><li><a href="#start-master-server" class="table-of-contents__link toc-highlight">Start Master Server</a><ul><li><a href="#no-zookeeper-on-master" class="table-of-contents__link toc-highlight">No Zookeeper on Master</a></li><li><a href="#with-zookeeper-on-master" class="table-of-contents__link toc-highlight">With Zookeeper on Master</a></li></ul></li><li><a href="#start-data-server" class="table-of-contents__link toc-highlight">Start Data Server</a></li><li><a href="#start-query-server" class="table-of-contents__link toc-highlight">Start Query Server</a></li><li><a href="#loading-data" class="table-of-contents__link toc-highlight">Loading data</a></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.38900cbf.js"></script>
<script src="/assets/js/main.5e106d68.js"></script>
</body>
</html>