blob: 984bac2570ff11b7e4703ec554ea2719b27ddf52 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<title>Pacemaker</title>
<!-- Bootstrap core CSS -->
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="/assets/css/bootstrap-theme.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link rel="stylesheet" href="http://fortawesome.github.io/Font-Awesome/assets/font-awesome/css/font-awesome.css">
<link href="/css/style.css" rel="stylesheet">
<link href="/assets/css/owl.theme.css" rel="stylesheet">
<link href="/assets/css/owl.carousel.css" rel="stylesheet">
<script type="text/javascript" src="/assets/js/jquery.min.js"></script>
<script type="text/javascript" src="/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/assets/js/owl.carousel.min.js"></script>
<script type="text/javascript" src="/assets/js/storm.js"></script>
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<header>
<div class="container-fluid">
<div class="row">
<div class="col-md-5">
<a href="/index.html"><img src="/images/logo.png" class="logo" /></a>
</div>
<div class="col-md-5">
<h1>Version: 1.2.3</h1>
</div>
<div class="col-md-2">
<a href="/downloads.html" class="btn-std btn-block btn-download">Download</a>
</div>
</div>
</div>
</header>
<!--Header End-->
<!--Navigation Begin-->
<div class="navbar" role="banner">
<div class="container-fluid">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
<ul class="nav navbar-nav">
<li><a href="/index.html" id="home">Home</a></li>
<li><a href="/getting-help.html" id="getting-help">Getting Help</a></li>
<li><a href="/about/integrates.html" id="project-info">Project Information</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="documentation">Documentation <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/releases/2.3.0/index.html">2.3.0</a></li>
<li><a href="/releases/2.2.0/index.html">2.2.0</a></li>
<li><a href="/releases/2.1.0/index.html">2.1.0</a></li>
<li><a href="/releases/2.0.0/index.html">2.0.0</a></li>
<li><a href="/releases/1.2.3/index.html">1.2.3</a></li>
</ul>
</li>
<li><a href="/talksAndVideos.html">Talks and Slideshows</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" id="contribute">Community <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/contribute/Contributing-to-Storm.html">Contributing</a></li>
<li><a href="/contribute/People.html">People</a></li>
<li><a href="/contribute/BYLAWS.html">ByLaws</a></li>
</ul>
</li>
<li><a href="/2021/09/27/storm230-released.html" id="news">News</a></li>
</ul>
</nav>
</div>
</div>
<div class="container-fluid">
<h1 class="page-title">Pacemaker</h1>
<div class="row">
<div class="col-md-12">
<!-- Documentation -->
<p class="post-meta"></p>
<div class="documentation-content"><h3 id="introduction">Introduction</h3>
<p>Pacemaker is a storm daemon designed to process heartbeats from workers. As Storm is scaled up, ZooKeeper begins to become a bottleneck due to high volumes of writes from workers doing heartbeats. Lots of writes to disk and too much traffic across the network is generated as ZooKeeper tries to maintain consistency.</p>
<p>Because heartbeats are of an ephemeral nature, they do not need to be persisted to disk or synced across nodes; an in-memory store will do. This is the role of Pacemaker. Pacemaker functions as a simple in-memory key/value store with ZooKeeper-like, directory-style keys and byte array values.</p>
<p>The corresponding Pacemaker client is a plugin for the <code>ClusterState</code> interface, <code>org.apache.storm.pacemaker.pacemaker_state_factory</code>. Heartbeat calls are funneled by the <code>ClusterState</code> produced by <code>pacemaker_state_factory</code> into the Pacemaker daemon, while other set/get operations are forwarded to ZooKeeper.</p>
<hr>
<h3 id="configuration">Configuration</h3>
<ul>
<li><code>pacemaker.host</code> : (deprecated) The host that the Pacemaker daemon is running on</li>
<li><code>pacemaker.servers</code> : The hosts that the Pacemaker daemons are running on - This supercedes <code>pacemaker.host</code></li>
<li><code>pacemaker.port</code> : The port that Pacemaker will listen on</li>
<li><code>pacemaker.max.threads</code> : Maximum number of threads Pacemaker daemon will use to handle requests.</li>
<li><code>pacemaker.childopts</code> : Any JVM parameters that need to go to the Pacemaker. (used by storm-deploy project)</li>
<li><code>pacemaker.auth.method</code> : The authentication method that is used (more info below)</li>
</ul>
<h4 id="example">Example</h4>
<p>To get Pacemaker up and running, set the following option in the cluster config on all nodes:
<code>
storm.cluster.state.store: &quot;org.apache.storm.pacemaker.pacemaker_state_factory&quot;
</code></p>
<p>The Pacemaker servers also need to be set on all nodes:
<code>
pacemaker.servers:
- somehost.mycompany.com
- someotherhost.mycompany.com
</code>
The pacemaker.host config still works for a single pacemaker, although it has been deprecated.
<code>
pacemaker.host: single_pacemaker.mycompany.com
</code></p>
<p>And then start all of your daemons</p>
<p>(including Pacemaker):
<code>
$ storm pacemaker
</code></p>
<p>The Storm cluster should now be pushing all worker heartbeats through Pacemaker.</p>
<h3 id="security">Security</h3>
<p>Currently digest (password-based) and Kerberos security are supported. Security is currently only around reads, not writes. Writes may be performed by anyone, whereas reads may only be performed by authorized and authenticated users. This is an area for future development, as it leaves the cluster open to DoS attacks, but it prevents any sensitive information from reaching unauthorized eyes, which was the main goal.</p>
<h4 id="digest">Digest</h4>
<p>To configure digest authentication, set <code>pacemaker.auth.method: DIGEST</code> in the cluster config on the nodes hosting Nimbus and Pacemaker.
The nodes must also have <code>java.security.auth.login.config</code> set to point to a JAAS config file containing the following structure:
<code>
PacemakerDigest {
username=&quot;some username&quot;
password=&quot;some password&quot;;
};
</code></p>
<p>Any node with these settings configured will be able to read from Pacemaker.
Worker nodes need not have these configs set, and may keep <code>pacemaker.auth.method: NONE</code> set, since they do not need to read from the Pacemaker daemon.</p>
<h4 id="kerberos">Kerberos</h4>
<p>To configure Kerberos authentication, set <code>pacemaker.auth.method: KERBEROS</code> in the cluster config on the nodes hosting Nimbus and Pacemaker.
The nodes must also have <code>java.security.auth.login.config</code> set to point to a JAAS config.</p>
<p>The JAAS config on Nimbus must look something like this:
```
PacemakerClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab=&quot;/etc/keytabs/nimbus.keytab&quot;
storeKey=true
useTicketCache=false
serviceName=&quot;pacemaker&quot;
principal=&quot;<a href="mailto:nimbus@MY.COMPANY.COM">nimbus@MY.COMPANY.COM</a>&quot;;
};</p>
<div class="highlight"><pre><code class="language-" data-lang="">
The JAAS config on Pacemaker must look something like this:
</code></pre></div>
<p>PacemakerServer {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab=&quot;/etc/keytabs/pacemaker.keytab&quot;
storeKey=true
useTicketCache=false
principal=&quot;<a href="mailto:pacemaker@MY.COMPANY.COM">pacemaker@MY.COMPANY.COM</a>&quot;;
};
```</p>
<ul>
<li>The client&#39;s user principal in the <code>PacemakerClient</code> section on the Nimbus host must match the <code>nimbus.daemon.user</code> storm cluster config value.</li>
<li>The client&#39;s <code>serviceName</code> value must match the server&#39;s user principal in the <code>PacemakerServer</code> section on the Pacemaker host.</li>
</ul>
<h3 id="fault-tolerance">Fault Tolerance</h3>
<p>Pacemaker runs as a single daemon instance, making it a potential Single Point of Failure.</p>
<p>If Pacemaker becomes unreachable by Nimbus, through crash or network partition, the workers will continue to run, and Nimbus will repeatedly attempt to reconnect. Nimbus functionality will be disrupted, but the topologies themselves will continue to run.
In case of partition of the cluster where Nimbus and Pacemaker are on the same side of the partition, the workers that are on the other side of the partition will not be able to heartbeat, and Nimbus will reschedule the tasks elsewhere. This is probably what we want to happen anyway.</p>
<h3 id="zookeeper-comparison">ZooKeeper Comparison</h3>
<p>Compared to ZooKeeper, Pacemaker uses less CPU, less memory, and of course no disk for the same load, thanks to lack of overhead from maintaining consistency between nodes.
On Gigabit networking, there is a theoretical limit of about 6000 nodes. However, the real limit is likely around 2000-3000 nodes. These limits have not yet been tested.
On a 270 supervisor cluster, fully scheduled with topologies, Pacemaker resource utilization was 70% of one core and nearly 1GiB of RAM on a machine with 4 <code>Intel(R) Xeon(R) CPU E5530 @ 2.40GHz</code> and 24GiB of RAM.</p>
<p>Pacemaker now supports HA. Multiple Pacemaker instances can be used at once in a storm cluster to allow massive scalability. Just include the names of the Pacemaker hosts in the pacemaker.servers config and workers and Nimbus will start communicating with them. They&#39;re fault tolerant as well. The system keeps on working as long as there is at least one pacemaker left running - provided it can handle the load.</p>
</div>
</div>
</div>
</div>
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<div class="footer-widget">
<h5>Meetups</h5>
<ul class="latest-news">
<li><a href="http://www.meetup.com/Apache-Storm-Apache-Kafka/">Apache Storm & Apache Kafka</a> <span class="small">(Sunnyvale, CA)</span></li>
<li><a href="http://www.meetup.com/Apache-Storm-Kafka-Users/">Apache Storm & Kafka Users</a> <span class="small">(Seattle, WA)</span></li>
<li><a href="http://www.meetup.com/New-York-City-Storm-User-Group/">NYC Storm User Group</a> <span class="small">(New York, NY)</span></li>
<li><a href="http://www.meetup.com/Bay-Area-Stream-Processing">Bay Area Stream Processing</a> <span class="small">(Emeryville, CA)</span></li>
<li><a href="http://www.meetup.com/Boston-Storm-Users/">Boston Realtime Data</a> <span class="small">(Boston, MA)</span></li>
<li><a href="http://www.meetup.com/storm-london">London Storm User Group</a> <span class="small">(London, UK)</span></li>
<!-- <li><a href="http://www.meetup.com/Apache-Storm-Kafka-Users/">Seatle, WA</a> <span class="small">(27 Jun 2015)</span></li> -->
</ul>
</div>
</div>
<div class="col-md-3">
<div class="footer-widget">
<h5>About Apache Storm</h5>
<p>Apache Storm integrates with any queueing system and any database system. Apache Storm's spout abstraction makes it easy to integrate a new queuing system. Likewise, integrating Apache Storm with database systems is easy.</p>
</div>
</div>
<div class="col-md-3">
<div class="footer-widget">
<h5>First Look</h5>
<ul class="footer-list">
<li><a href="/releases/current/Rationale.html">Rationale</a></li>
<li><a href="/releases/current/Tutorial.html">Tutorial</a></li>
<li><a href="/releases/current/Setting-up-development-environment.html">Setting up development environment</a></li>
<li><a href="/releases/current/Creating-a-new-Storm-project.html">Creating a new Apache Storm project</a></li>
</ul>
</div>
</div>
<div class="col-md-3">
<div class="footer-widget">
<h5>Documentation</h5>
<ul class="footer-list">
<li><a href="/releases/current/index.html">Index</a></li>
<li><a href="/releases/current/javadocs/index.html">Javadoc</a></li>
<li><a href="/releases/current/FAQ.html">FAQ</a></li>
</ul>
</div>
</div>
</div>
<hr/>
<div class="row">
<div class="col-md-12">
<p align="center">Copyright © 2019 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
<br>Apache Storm, Apache, the Apache feather logo, and the Apache Storm project logos are trademarks of The Apache Software Foundation.
<br>All other marks mentioned may be trademarks or registered trademarks of their respective owners.</p>
</div>
</div>
</div>
</footer>
<!--Footer End-->
<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="fa fa-angle-up"></i></a></span>
</body>
</html>