Module 10b - Apache ZooKeeper Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is ZooKeeper?

A

ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.

ZK is a high performance coordination service for distributed applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does CAP stand for?

A

Consistency, Availability, Partition tolerance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In a distributed system following a hierarchical structure, the master is prone to ______, and so we may want to spin up a ______ master. This is facilitated by a _______ service

A

failures
backup
coordination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ZooKeeper’s architecture supports high ________ through ________ services. The clients can thus ask another ZooKeeper leader if the first fails to answer.

A

availability

redundant/replicated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What protocols can you implement with ZooKeeper in a distributed system?

A
  • Consensus
  • Group Management
  • Leader election
  • Presence Protocols
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ZooKeeper exposes a simple set of ______ that ______ applications can build upon to implement ______ level services.

A

primitives
distributed
higher

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What high level services can the ZooKeeper primitives be used to implement?

A
  • Synchronization
  • Configuration Maintenance
  • Groups
  • Naming
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are ZNodes?

A

Data registers. They are similar to files and directories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Filesystem files are designed for storage, whereas ZooKeeper data is kept _______, allowing Zookeeper to achieve high _______ and low _______.

A

in-memory
throughput
latency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Like the distributed processes it coordinates, ZooKeeper itself is intended to be _______ over a set of hosts called an ensemble.

A

replicated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The servers that make up the ZooKeeper service must all know about each other. As long as a ______ of the servers are available, the ZooKeeper service will be available

A

majority

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Clients connect to a single ZooKeeper server. The client maintains a ___ connection. If the TCP connection to the server breaks, the client will connect to a _____ server.

A

TCP

different

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

ZooKeeper is fast in ______ dominant workloads

A

read

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The data stored at each ZNode is _____ in size

A

small

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

ZNodes have a _______ number associated with them which is maintained with a stat structure. Each time a ZNode’s ______ is changed, this number is number increases

A

version

data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The data stored at each ZNode in a namespace is read and written _____. A write to a ZNode _____ all the data

A

atomically

replaces

17
Q

Each ZNode has an ACL. What is an ACL?

A

Access Control List. Restricts who can do what

18
Q

ZooKeper has the concept of ephemeral nodes. What are ephemeral nodes?

A

They are Znodes that exists as long as the session that created that znode is active. When the session expires, the znode is deleted.

19
Q

Describe the concept of “watches” in ZooKeeper

A

Clients can set a “watch” on a znode. A watch will be triggered and removed when a znode changes. When a watch is triggered, the client receives a packet saying that the znode has changed.

20
Q

A guarantee that ZooKeeper provides is Sequential Consistency. Describe the term “sequential consistency” with respect to ZooKeeper

A

Updates from a client will be applied in the order that they were sent

21
Q

In ZooKeeper, what does atomicity mean with regards to updating data

A

Multiple clients updating a single resource will not encounter a race condition. An update will either succeed or fail. No partial Results

22
Q

What is it mean in ZooKeeper when we say it is a “Single System Image”?

A

A client will see the same view of the service regardless of the server that it connects to.

A client will never see an older view of the system even if the client fails over a different server with the same session.

23
Q

In ZooKeeper, once an ______ has been applied, it will ______ from that time forward until a client ______ the update

A

update
persist
overwrites

24
Q

We say that ZooKeeper is guaranteed to be “timeless” what does this mean?

A

The client’s view of the system is guaranteed to be up-to-date within a certain time bound

25
Q

Why is ZooKeeper very highly performant when reads outnumber writes?

A

Writes involve synchronizing the state of all servers - which has significant overhead

26
Q

In ZooKeeper, all write requests from clients are forwarded to a single server called the _____. The rest of the ZooKeeper servers are called ______

A

leader

followers

27
Q

What is the Curator API for ZooKeeper?

A

The Curator is a high-level API built on top of ZooKeeper’s official API. It handles the complexity of managing connections and provides a cleaner interface to the programmer

28
Q

What is the consistency model used by ZooKeeper?

A

Sequential consistency and linearizability (for writes)