Jump to ratings and reviews
Rate this book

ZooKeeper: Distributed Process Coordination

Rate this book
Building distributed applications is difficult enough without having to coordinate the actions that make them work. This practical guide shows how Apache ZooKeeper helps you manage distributed systems, so you can focus mainly on application logic. Even with ZooKeeper, implementing coordination tasks is not trivial, but this book provides good practices to give you a head start, and points out caveats that developers and administrators alike need to watch for along the way. In three separate sections, ZooKeeper contributors Flavio Junqueira and Benjamin Reed introduce the principles of distributed systems, provide ZooKeeper programming techniques, and include the information you need to administer this service.

243 pages, Paperback

First published January 1, 2013

44 people are currently reading
156 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
28 (24%)
4 stars
54 (46%)
3 stars
27 (23%)
2 stars
7 (6%)
1 star
0 (0%)
Displaying 1 - 7 of 7 reviews
Profile Image for Sebastian Gebski.
1,209 reviews1,390 followers
January 21, 2014
Almost flawless:
* straight to the point
* describes both dev APIs and ops commands
* doesn't escape the questions about what's under the hood
* very illustrative: code samples + diagrams
What did I miss? The chapter about Curator was FAR too short: it really deserves some more love.
Anyway, the book is highly recommended - the best resource about ZooKeeper I've ever seen.
Profile Image for Anton Antonov.
356 reviews52 followers
August 8, 2024
Disclaimer, not a happy review, not a happy review! 😠

One of the most, indeed the most, overrated technologies. In 2017, I was deeply in the trenches of a new project with Java, Scala, IoT, distributed systems, Kafka, etc. You needed to have ZooKeeper for Kafka. Kafka, until very recently, as of 2023-2024, if my memory serves me well, still relied on ZooKeeper before their significant milestone, which is the KRaft consensus protocol. KRaft is just a fancy term for Kafka with Raft consensus protocol, not really a unique consensus protocol name worthy of the hype, but whatever sells. 😉

So, what was the book for? It was part of my agony of trying to satisfy my curiosity as to why this “novel” and “industry-proven” technology is so extremely slow and can only work with 3-5-7 nodes in most setups. I focused on the “Zookeeper Internals” part and “Dealing with State Change.” All these answered my questions related to “Zookeeper Atomic Broadcast”. 🤨
The book is very focused on teaching you API calls, how to program small snippets. Sure, this is handy. For what I wanted to learn, it served its job well. It can't wash my experiences and therefore, I am penalizing it with such a rating. 😠

Legacy Java projects and Java engineers’ lazy approach to technology choices are the reasons ZooKeeper lasted past 2015, when etcd was production-ready and mature.

Nowadays, for everything that’s good for you and your colleagues, from the choices of Paxos, ZAB, and Raft consensus protocols, go straight for Raft. It's simpler, more performant, nowadays way more widely adopted. 😮‍💨
Profile Image for Yury.
10 reviews1 follower
February 2, 2015
Отличная книга. Оглавлением разбита на 3 части: первая часть посвящена основным принципам работы фреймворка и объяснению, как это все работает на примере простого приложения типа Master-Worker (есть несколько воркеров и несколько клиентов, клиенты размещают таски в ZooKeeper, воркеры их оттуда берут, выполняют, результат кладут туда же). Главная мысль - ZooKeeper не предоставляет вам никакой магии, при его использовании ваши сервисы не начнут вдруг по волшебству взаимокоординироваться. Все механизмы координации лежат на совести разработчика, а ZooKeeper, в свою очередь, облегчает реализацию этих механизмов, предоставляя нечто вроде распределенной файловой системы со строгими гарантиями доставки, fault tolerancy и прочим.

Во второй части нам рассказывают, как это приложение реализовать, используя клиент на Java. Объясняют очень интересно, приводится код только тех элементов, которые имеют отношение к синхронизации процессов, ничего лишнего. Разбираются типичные ошибки реализации. Все это снабжено понятными временными диаграммами и примечаниями к коду. В конце части кратко описывается реализация того же приложения на C и немного рассказывается про Curator - это такая API-обертка над ZooKeeper от NetFlix, упрощающая наиболее часто используемые паттерны.

Третья часть посвящена внутренностям ZooKeeper, описывается протокол, алгоритмы синхронизации, даже приводятся имена классов из исходников, чтобы читатель при желании мог сам разобраться в реализации. Затем описывается процесс установки и настройки кластера, объясняются самые важные параметры конфигурации, по каждому параметру приводится краткая информация, зачем он нужен, к чему может его изменение привести, а зачастую - и советы по использованию.

В целом, книга просто переполнена полезной информацией, и при этом содержит всего 238 страниц - а это значит, никакой воды, никаких долгих объяснений "а зачем это нужно" или "а как делали раньше" (на самом деле я сейчас проверил, и такой пункт в оглавлении есть, он начинается на странице 6 и заканчивается через 3 абзаца на ней же :), книга предполагает достаточный уровень подготовки читателя, который знает, зачем ее читает.
Profile Image for Ha Truong.
61 reviews54 followers
January 31, 2015
Five stars for this book and even six of seven if Goodreads allows me to.

The book gives a simple example of master-worker distributed computing model. Then it implements this sample with command line util so readers can understand basic concepts behinds ZooKeeper. Next it implements with Java API to show how readers will do in reality. This paradigm approach really helps, you don't feel lost in the jungle of concepts or get bored with tedious source codes.

There are some deep underground sections to get ZooKeeper's insights along with entry points to its source code. Open source guys would love to read these sections.

Also, there is a section dedicated for configurations and tweaks to make most out of ZooKeeper.
Profile Image for Mark McGranaghan.
25 reviews20 followers
May 27, 2014
A very solid book on the Zookeeper distributed coordination service.

Covers the motivation and philosophy of Zookeeper, the practicalities of using it from various clients, Zookeeper internals, and how to admin/operate it in production.

I especially liked the focus on failure modes and corner cases, which are so important for a distributed service like Zookeeper.

Highly recommended for anyone using / thinking of using Zookeeper.
Displaying 1 - 7 of 7 reviews

Can't find what you're looking for?

Get help and learn more about the design.