Book Image

Apache ZooKeeper Essentials

By : Saurav Haloi
Book Image

Apache ZooKeeper Essentials

By: Saurav Haloi

Overview of this book

Table of Contents (14 chapters)
Apache ZooKeeper Essentials
About the Author
About the Reviewers
Performing Common Distributed System Tasks

Chapter 1. A Crash Course in Apache ZooKeeper

In the past couple of decades, the Internet has changed the way we live our lives. Services offered over the Internet are often backed up by complex software systems, which span over a large number of servers and are often located geographically apart. Such systems are known as distributed systems in computer science terminology. In order to run these large systems correctly and efficiently, processes within these systems should have some sort of agreement among themselves; this agreement is also known as distributed coordination. An agreement by the components that constitute the distributed system includes the overall goal of the distributed system or an agreement to accomplish some subtasks that ultimately lead to the goal. This is not as simple as it sounds, because the processes must not only agree but also know and be sure about what their peers agree to.

Although coordinating tasks and processes in a large distributed system sounds easy, it is a very tough problem when it comes to implementing them correctly in a fault-tolerant manner. Apache ZooKeeper, a project of the Apache Software Foundation, aims to solve these coordination problems in the design and development of distributed systems by providing a set of reliable primitives through simple APIs.

In this chapter, we will cover the following topics:

  • What a distributed system is and its characteristics

  • Why coordination in a distributed system is hard

  • An introduction to Apache ZooKeeper

  • Downloading and installing Apache ZooKeeper

  • Connecting to ZooKeeper with the ZooKeeper shell

  • Multinode ZooKeeper cluster configuration