zookeeperOver.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta content="Apache Forrest" name="Generator">
  6. <meta name="Forrest-version" content="0.8">
  7. <meta name="Forrest-skin-name" content="pelt">
  8. <title>ZooKeeper</title>
  9. <link type="text/css" href="skin/basic.css" rel="stylesheet">
  10. <link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
  11. <link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
  12. <link type="text/css" href="skin/profile.css" rel="stylesheet">
  13. <script src="skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="skin/fontsize.js" language="javascript" type="text/javascript"></script>
  14. <link rel="shortcut icon" href="images/favicon.ico">
  15. </head>
  16. <body onload="init()">
  17. <script type="text/javascript">ndeSetTextSize();</script>
  18. <div id="top">
  19. <!--+
  20. |breadtrail
  21. +-->
  22. <div class="breadtrail">
  23. <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://hadoop.apache.org/">Hadoop</a> &gt; <a href="http://hadoop.apache.org/zookeeper/">ZooKeeper</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
  24. </div>
  25. <!--+
  26. |header
  27. +-->
  28. <div class="header">
  29. <!--+
  30. |start group logo
  31. +-->
  32. <div class="grouplogo">
  33. <a href="http://hadoop.apache.org/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Apache Hadoop"></a>
  34. </div>
  35. <!--+
  36. |end group logo
  37. +-->
  38. <!--+
  39. |start Project Logo
  40. +-->
  41. <div class="projectlogo">
  42. <a href="http://hadoop.apache.org/zookeeper/"><img class="logoImage" alt="ZooKeeper" src="images/zookeeper_small.gif" title="ZooKeeper: distributed coordination"></a>
  43. </div>
  44. <!--+
  45. |end Project Logo
  46. +-->
  47. <!--+
  48. |start Search
  49. +-->
  50. <div class="searchbox">
  51. <form action="http://www.google.com/search" method="get" class="roundtopsmall">
  52. <input value="hadoop.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp;
  53. <input name="Search" value="Search" type="submit">
  54. </form>
  55. </div>
  56. <!--+
  57. |end search
  58. +-->
  59. <!--+
  60. |start Tabs
  61. +-->
  62. <ul id="tabs">
  63. <li>
  64. <a class="unselected" href="http://hadoop.apache.org/zookeeper/">Project</a>
  65. </li>
  66. <li>
  67. <a class="unselected" href="http://wiki.apache.org/hadoop/ZooKeeper">Wiki</a>
  68. </li>
  69. <li class="current">
  70. <a class="selected" href="index.html">ZooKeeper 3.2 Documentation</a>
  71. </li>
  72. </ul>
  73. <!--+
  74. |end Tabs
  75. +-->
  76. </div>
  77. </div>
  78. <div id="main">
  79. <div id="publishedStrip">
  80. <!--+
  81. |start Subtabs
  82. +-->
  83. <div id="level2tabs"></div>
  84. <!--+
  85. |end Endtabs
  86. +-->
  87. <script type="text/javascript"><!--
  88. document.write("Last Published: " + document.lastModified);
  89. // --></script>
  90. </div>
  91. <!--+
  92. |breadtrail
  93. +-->
  94. <div class="breadtrail">
  95. &nbsp;
  96. </div>
  97. <!--+
  98. |start Menu, mainarea
  99. +-->
  100. <!--+
  101. |start Menu
  102. +-->
  103. <div id="menu">
  104. <div onclick="SwitchMenu('menu_selected_1.1', 'skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('skin/images/chapter_open.gif');">Overview</div>
  105. <div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
  106. <div class="menuitem">
  107. <a href="index.html">Welcome</a>
  108. </div>
  109. <div class="menupage">
  110. <div class="menupagetitle">Overview</div>
  111. </div>
  112. <div class="menuitem">
  113. <a href="zookeeperStarted.html">Getting Started</a>
  114. </div>
  115. <div class="menuitem">
  116. <a href="releasenotes.html">Release Notes</a>
  117. </div>
  118. </div>
  119. <div onclick="SwitchMenu('menu_1.2', 'skin/')" id="menu_1.2Title" class="menutitle">Developer</div>
  120. <div id="menu_1.2" class="menuitemgroup">
  121. <div class="menuitem">
  122. <a href="api/index.html">API Docs</a>
  123. </div>
  124. <div class="menuitem">
  125. <a href="zookeeperProgrammers.html">Programmer's Guide</a>
  126. </div>
  127. <div class="menuitem">
  128. <a href="javaExample.html">Java Example</a>
  129. </div>
  130. <div class="menuitem">
  131. <a href="zookeeperTutorial.html">Barrier and Queue Tutorial</a>
  132. </div>
  133. <div class="menuitem">
  134. <a href="recipes.html">Recipes</a>
  135. </div>
  136. </div>
  137. <div onclick="SwitchMenu('menu_1.3', 'skin/')" id="menu_1.3Title" class="menutitle">BookKeeper</div>
  138. <div id="menu_1.3" class="menuitemgroup">
  139. <div class="menuitem">
  140. <a href="bookkeeperStarted.html">Getting started</a>
  141. </div>
  142. <div class="menuitem">
  143. <a href="bookkeeperOverview.html">Overview</a>
  144. </div>
  145. <div class="menuitem">
  146. <a href="bookkeeperConfig.html">Setup guide</a>
  147. </div>
  148. <div class="menuitem">
  149. <a href="bookkeeperProgrammer.html">Programmer's guide</a>
  150. </div>
  151. </div>
  152. <div onclick="SwitchMenu('menu_1.4', 'skin/')" id="menu_1.4Title" class="menutitle">Admin &amp; Ops</div>
  153. <div id="menu_1.4" class="menuitemgroup">
  154. <div class="menuitem">
  155. <a href="zookeeperAdmin.html">Administrator's Guide</a>
  156. </div>
  157. <div class="menuitem">
  158. <a href="zookeeperQuotas.html">Quota Guide</a>
  159. </div>
  160. <div class="menuitem">
  161. <a href="zookeeperJMX.html">JMX</a>
  162. </div>
  163. </div>
  164. <div onclick="SwitchMenu('menu_1.5', 'skin/')" id="menu_1.5Title" class="menutitle">Contributor</div>
  165. <div id="menu_1.5" class="menuitemgroup">
  166. <div class="menuitem">
  167. <a href="zookeeperInternals.html">ZooKeeper Internals</a>
  168. </div>
  169. </div>
  170. <div onclick="SwitchMenu('menu_1.6', 'skin/')" id="menu_1.6Title" class="menutitle">Miscellaneous</div>
  171. <div id="menu_1.6" class="menuitemgroup">
  172. <div class="menuitem">
  173. <a href="http://wiki.apache.org/hadoop/ZooKeeper">Wiki</a>
  174. </div>
  175. <div class="menuitem">
  176. <a href="http://wiki.apache.org/hadoop/ZooKeeper/FAQ">FAQ</a>
  177. </div>
  178. <div class="menuitem">
  179. <a href="http://hadoop.apache.org/zookeeper/mailing_lists.html">Mailing Lists</a>
  180. </div>
  181. </div>
  182. <div id="credit"></div>
  183. <div id="roundbottom">
  184. <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
  185. <!--+
  186. |alternative credits
  187. +-->
  188. <div id="credit2"></div>
  189. </div>
  190. <!--+
  191. |end Menu
  192. +-->
  193. <!--+
  194. |start content
  195. +-->
  196. <div id="content">
  197. <div title="Portable Document Format" class="pdflink">
  198. <a class="dida" href="zookeeperOver.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
  199. PDF</a>
  200. </div>
  201. <h1>ZooKeeper</h1>
  202. <div id="minitoc-area">
  203. <ul class="minitoc">
  204. <li>
  205. <a href="#ch_DesignOverview">ZooKeeper: A Distributed Coordination Service for Distributed
  206. Applications</a>
  207. <ul class="minitoc">
  208. <li>
  209. <a href="#sc_designGoals">Design Goals</a>
  210. </li>
  211. <li>
  212. <a href="#sc_dataModelNameSpace">Data model and the hierarchical namespace</a>
  213. </li>
  214. <li>
  215. <a href="#Nodes+and+ephemeral+nodes">Nodes and ephemeral nodes</a>
  216. </li>
  217. <li>
  218. <a href="#Conditional+updates+and+watches">Conditional updates and watches</a>
  219. </li>
  220. <li>
  221. <a href="#Guarantees">Guarantees</a>
  222. </li>
  223. <li>
  224. <a href="#Simple+API">Simple API</a>
  225. </li>
  226. <li>
  227. <a href="#Implementation">Implementation</a>
  228. </li>
  229. <li>
  230. <a href="#Uses">Uses</a>
  231. </li>
  232. <li>
  233. <a href="#Performance">Performance</a>
  234. </li>
  235. <li>
  236. <a href="#Reliability">Reliability</a>
  237. </li>
  238. <li>
  239. <a href="#The+ZooKeeper+Project">The ZooKeeper Project</a>
  240. </li>
  241. </ul>
  242. </li>
  243. </ul>
  244. </div>
  245. <a name="N10009"></a><a name="ch_DesignOverview"></a>
  246. <h2 class="h3">ZooKeeper: A Distributed Coordination Service for Distributed
  247. Applications</h2>
  248. <div class="section">
  249. <p>ZooKeeper is a distributed, open-source coordination service for
  250. distributed applications. It exposes a simple set of primitives that
  251. distributed applications can build upon to implement higher level services
  252. for synchronization, configuration maintenance, and groups and naming. It
  253. is designed to be easy to program to, and uses a data model styled after
  254. the familiar directory tree structure of file systems. It runs in Java and
  255. has bindings for both Java and C.</p>
  256. <p>Coordination services are notoriously hard to get right. They are
  257. especially prone to errors such as race conditions and deadlock. The
  258. motivation behind ZooKeeper is to relieve distributed applications the
  259. responsibility of implementing coordination services from scratch.</p>
  260. <a name="N10015"></a><a name="sc_designGoals"></a>
  261. <h3 class="h4">Design Goals</h3>
  262. <p>
  263. <strong>ZooKeeper is simple.</strong> ZooKeeper
  264. allows distributed processes to coordinate with each other through a
  265. shared hierarchal namespace which is organized similarly to a standard
  266. file system. The name space consists of data registers - called znodes,
  267. in ZooKeeper parlance - and these are similar to files and directories.
  268. Unlike a typical file system, which is designed for storage, ZooKeeper
  269. data is kept in-memory, which means ZooKeeper can acheive high
  270. throughput and low latency numbers.</p>
  271. <p>The ZooKeeper implementation puts a premium on high performance,
  272. highly available, strictly ordered access. The performance aspects of
  273. ZooKeeper means it can be used in large, distributed systems. The
  274. reliability aspects keep it from being a single point of failure. The
  275. strict ordering means that sophisticated synchronization primitives can
  276. be implemented at the client.</p>
  277. <p>
  278. <strong>ZooKeeper is replicated.</strong> Like the
  279. distributed processes it coordinates, ZooKeeper itself is intended to be
  280. replicated over a sets of hosts called an ensemble.</p>
  281. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  282. <tr>
  283. <td>ZooKeeper Service</td>
  284. </tr>
  285. <tr>
  286. <td>
  287. <img alt="" src="images/zkservice.jpg">
  288. </td>
  289. </tr>
  290. </table>
  291. <p>The servers that make up the ZooKeeper service must all know about
  292. each other. They maintain an in-memory image of state, along with a
  293. transaction logs and snapshots in a persistent store. As long as a
  294. majority of the servers are available, the ZooKeeper service will be
  295. available.</p>
  296. <p>Clients connect to a single ZooKeeper server. The client maintains
  297. a TCP connection through which it sends requests, gets responses, gets
  298. watch events, and sends heart beats. If the TCP connection to the server
  299. breaks, the client will connect to a different server.</p>
  300. <p>
  301. <strong>ZooKeeper is ordered.</strong> ZooKeeper
  302. stamps each update with a number that reflects the order of all
  303. ZooKeeper transactions. Subsequent operations can use the order to
  304. implement higher-level abstractions, such as synchronization
  305. primitives.</p>
  306. <p>
  307. <strong>ZooKeeper is fast.</strong> It is
  308. especially fast in "read-dominant" workloads. ZooKeeper applications run
  309. on thousands of machines, and it performs best where reads are more
  310. common than writes, at ratios of around 10:1.</p>
  311. <a name="N10045"></a><a name="sc_dataModelNameSpace"></a>
  312. <h3 class="h4">Data model and the hierarchical namespace</h3>
  313. <p>The name space provided by ZooKeeper is much like that of a
  314. standard file system. A name is a sequence of path elements separated by
  315. a slash (/). Every node in ZooKeeper's name space is identified by a
  316. path.</p>
  317. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  318. <tr>
  319. <td>ZooKeeper's Hierarchical Namespace</td>
  320. </tr>
  321. <tr>
  322. <td>
  323. <img alt="" src="images/zknamespace.jpg">
  324. </td>
  325. </tr>
  326. </table>
  327. <a name="N1005B"></a><a name="Nodes+and+ephemeral+nodes"></a>
  328. <h3 class="h4">Nodes and ephemeral nodes</h3>
  329. <p>Unlike is standard file systems, each node in a ZooKeeper
  330. namespace can have data associated with it as well as children. It is
  331. like having a file-system that allows a file to also be a directory.
  332. (ZooKeeper was designed to store coordination data: status information,
  333. configuration, location information, etc., so the data stored at each
  334. node is usually small, in the byte to kilobyte range.) We use the term
  335. <em>znode</em> to make it clear that we are talking about
  336. ZooKeeper data nodes.</p>
  337. <p>Znodes maintain a stat structure that includes version numbers for
  338. data changes, ACL changes, and timestamps, to allow cache validations
  339. and coordinated updates. Each time a znode's data changes, the version
  340. number increases. For instance, whenever a client retrieves data it also
  341. receives the version of the data.</p>
  342. <p>The data stored at each znode in a namespace is read and written
  343. atomically. Reads get all the data bytes associated with a znode and a
  344. write replaces all the data. Each node has an Access Control List (ACL)
  345. that restricts who can do what.</p>
  346. <p>ZooKeeper also has the notion of ephemeral nodes. These znodes
  347. exists as long as the session that created the znode is active. When the
  348. session ends the znode is deleted. Ephemeral nodes are useful when you
  349. want to implement <em>[tbd]</em>.</p>
  350. <a name="N10074"></a><a name="Conditional+updates+and+watches"></a>
  351. <h3 class="h4">Conditional updates and watches</h3>
  352. <p>ZooKeeper supports the concept of <em>watches</em>.
  353. Clients can set a watch on a znodes. A watch will be triggered and
  354. removed when the znode changes. When a watch is triggered the client
  355. receives a packet saying that the znode has changed. And if the
  356. connection between the client and one of the Zoo Keeper servers is
  357. broken, the client will receive a local notification. These can be used
  358. to <em>[tbd]</em>.</p>
  359. <a name="N10084"></a><a name="Guarantees"></a>
  360. <h3 class="h4">Guarantees</h3>
  361. <p>ZooKeeper is very fast and very simple. Since its goal, though, is
  362. to be a basis for the construction of more complicated services, such as
  363. synchronization, it provides a set of guarantees. These are:</p>
  364. <ul>
  365. <li>
  366. <p>Sequential Consistency - Updates from a client will be applied
  367. in the order that they were sent.</p>
  368. </li>
  369. <li>
  370. <p>Atomicity - Updates either succeed or fail. No partial
  371. results.</p>
  372. </li>
  373. <li>
  374. <p>Single System Image - A client will see the same view of the
  375. service regardless of the server that it connects to.</p>
  376. </li>
  377. </ul>
  378. <ul>
  379. <li>
  380. <p>Reliability - Once an update has been applied, it will persist
  381. from that time forward until a client overwrites the update.</p>
  382. </li>
  383. </ul>
  384. <ul>
  385. <li>
  386. <p>Timeliness - The clients view of the system is guaranteed to
  387. be up-to-date within a certain time bound.</p>
  388. </li>
  389. </ul>
  390. <p>For more information on these, and how they can be used, see
  391. <em>[tbd]</em>
  392. </p>
  393. <a name="N100BA"></a><a name="Simple+API"></a>
  394. <h3 class="h4">Simple API</h3>
  395. <p>One of the design goals of ZooKeeper is provide a very simple
  396. programming interface. As a result, it supports only these
  397. operations:</p>
  398. <dl>
  399. <dt>
  400. <term>create</term>
  401. </dt>
  402. <dd>
  403. <p>creates a node at a location in the tree</p>
  404. </dd>
  405. <dt>
  406. <term>delete</term>
  407. </dt>
  408. <dd>
  409. <p>deletes a node</p>
  410. </dd>
  411. <dt>
  412. <term>exists</term>
  413. </dt>
  414. <dd>
  415. <p>tests if a node exists at a location</p>
  416. </dd>
  417. <dt>
  418. <term>get data</term>
  419. </dt>
  420. <dd>
  421. <p>reads the data from a node</p>
  422. </dd>
  423. <dt>
  424. <term>set data</term>
  425. </dt>
  426. <dd>
  427. <p>writes data to a node</p>
  428. </dd>
  429. <dt>
  430. <term>get children</term>
  431. </dt>
  432. <dd>
  433. <p>retrieves a list of children of a node</p>
  434. </dd>
  435. <dt>
  436. <term>sync</term>
  437. </dt>
  438. <dd>
  439. <p>waits for data to be propagated</p>
  440. </dd>
  441. </dl>
  442. <p>For a more in-depth discussion on these, and how they can be used
  443. to implement higher level operations, please refer to
  444. <em>[tbd]</em>
  445. </p>
  446. <a name="N100FD"></a><a name="Implementation"></a>
  447. <h3 class="h4">Implementation</h3>
  448. <p>
  449. <a href="#fg_zkComponents">ZooKeeper Components</a> shows the high-level components
  450. of the ZooKeeper service. With the exception of the request processor,
  451. each of
  452. the servers that make up the ZooKeeper service replicates its own copy
  453. of each of components.</p>
  454. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  455. <tr>
  456. <td>ZooKeeper Components</td>
  457. </tr>
  458. <tr>
  459. <td>
  460. <img alt="" src="images/zkcomponents.jpg">
  461. </td>
  462. </tr>
  463. </table>
  464. <p>The replicated database is an in-memory database containing the
  465. entire data tree. Updates are logged to disk for recoverability, and
  466. writes are serialized to disk before they are applied to the in-memory
  467. database.</p>
  468. <p>Every ZooKeeper server services clients. Clients connect to
  469. exactly one server to submit irequests. Read requests are serviced from
  470. the local replica of each server database. Requests that change the
  471. state of the service, write requests, are processed by an agreement
  472. protocol.</p>
  473. <p>As part of the agreement protocol all write requests from clients
  474. are forwarded to a single server, called the
  475. <em>leader</em>. The rest of the ZooKeeper servers, called
  476. <em>followers</em>, receive message proposals from the
  477. leader and agree upon message delivery. The messaging layer takes care
  478. of replacing leaders on failures and syncing followers with
  479. leaders.</p>
  480. <p>ZooKeeper uses a custom atomic messaging protocol. Since the
  481. messaging layer is atomic, ZooKeeper can guarantee that the local
  482. replicas never diverge. When the leader receives a write request, it
  483. calculates what the state of the system is when the write is to be
  484. applied and transforms this into a transaction that captures this new
  485. state.</p>
  486. <a name="N10128"></a><a name="Uses"></a>
  487. <h3 class="h4">Uses</h3>
  488. <p>The programming interface to ZooKeeper is deliberately simple.
  489. With it, however, you can implement higher order operations, such as
  490. synchronizations primitives, group membership, ownership, etc. Some
  491. distributed applications have used it to: <em>[tbd: add uses from
  492. white paper and video presentation.]</em> For more information, see
  493. <em>[tbd]</em>
  494. </p>
  495. <a name="N10137"></a><a name="Performance"></a>
  496. <h3 class="h4">Performance</h3>
  497. <p>ZooKeeper is designed to be highly performant. But is it? The
  498. results of the ZooKeeper's development team at Yahoo! Research indicate
  499. that it is. (See <a href="#fg_zkPerfRW">ZooKeeper Throughput as the Read-Write Ratio Varies</a>.) It is especially high
  500. performance in applications where reads outnumber writes, since writes
  501. involve synchronizing the state of all servers. (Reads outnumbering
  502. writes is typically the case for a coordination service.)</p>
  503. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  504. <tr>
  505. <td>ZooKeeper Throughput as the Read-Write Ratio Varies</td>
  506. </tr>
  507. <tr>
  508. <td>
  509. <img alt="" src="images/zkperfRW.jpg">
  510. </td>
  511. </tr>
  512. </table>
  513. <p>Benchmarks also indicate that it is reliable, too. <a href="#fg_zkPerfReliability">Reliability in the Presence of Errors</a> shows how a deployment responds to
  514. various failures. The events marked in the figure are the
  515. following:</p>
  516. <ol>
  517. <li>
  518. <p>Failure and recovery of a follower</p>
  519. </li>
  520. <li>
  521. <p>Failure and recovery of a different follower</p>
  522. </li>
  523. <li>
  524. <p>Failure of the leader</p>
  525. </li>
  526. <li>
  527. <p>Failure and recovery of two followers</p>
  528. </li>
  529. <li>
  530. <p>Failure of another leader</p>
  531. </li>
  532. </ol>
  533. <a name="N10179"></a><a name="Reliability"></a>
  534. <h3 class="h4">Reliability</h3>
  535. <p>To show the behavior of the system over time as
  536. failures are injected we ran a ZooKeeper service made up of
  537. 7 machines. We ran the same saturation benchmark as before,
  538. but this time we kept the write percentage at a constant
  539. 30%, which is a conservative ratio of our expected
  540. workloads.
  541. </p>
  542. <table class="ForrestTable" cellspacing="1" cellpadding="4">
  543. <tr>
  544. <td>Reliability in the Presence of Errors</td>
  545. </tr>
  546. <tr>
  547. <td>
  548. <img alt="" src="images/zkperfreliability.jpg">
  549. </td>
  550. </tr>
  551. </table>
  552. <p>The are a few important observations from this graph. First, if
  553. followers fail and recover quickly, then ZooKeeper is able to sustain a
  554. high throughput despite the failure. But maybe more importantly, the
  555. leader election algorithm allows for the system to recover fast enough
  556. to prevent throughput from dropping substantially. In our observations,
  557. ZooKeeper takes less than 200ms to elect a new leader. Third, as
  558. followers recover, ZooKeeper is able to raise throughput again once they
  559. start processing requests.</p>
  560. <a name="N10192"></a><a name="The+ZooKeeper+Project"></a>
  561. <h3 class="h4">The ZooKeeper Project</h3>
  562. <p>ZooKeeper has been
  563. <a href="http://wiki.apache.org/hadoop/ZooKeeper/PoweredBy">
  564. successfully used
  565. </a>
  566. in many industrial applications. It is used at Yahoo! as the
  567. coordination and failure recovery service for Yahoo! Message
  568. Broker, which is a highly scalable publish-subscribe system
  569. managing thousands of topics for replication and data
  570. delivery. It is used by the Fetching Service for Yahoo!
  571. crawler, where it also manages failure recovery. A number of
  572. Yahoo! advertising systems also use ZooKeeper to implement
  573. reliable services.
  574. </p>
  575. <p>All users and developers are encouraged to join the
  576. community and contribute their expertise. See the
  577. <a href="http://hadoop.apache.org/zookeeper/">
  578. Zookeeper Project on Apache
  579. </a>
  580. for more information.
  581. </p>
  582. </div>
  583. <p align="right">
  584. <font size="-2"></font>
  585. </p>
  586. </div>
  587. <!--+
  588. |end content
  589. +-->
  590. <div class="clearboth">&nbsp;</div>
  591. </div>
  592. <div id="footer">
  593. <!--+
  594. |start bottomstrip
  595. +-->
  596. <div class="lastmodified">
  597. <script type="text/javascript"><!--
  598. document.write("Last Published: " + document.lastModified);
  599. // --></script>
  600. </div>
  601. <div class="copyright">
  602. Copyright &copy;
  603. 2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
  604. </div>
  605. <!--+
  606. |end bottomstrip
  607. +-->
  608. </div>
  609. </body>
  610. </html>