Apache zookeeper 101

QuachTung1 271 views 16 slides Sep 24, 2018
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

That's provide Apach Zookeeper introduction.


Slide Content

Apache Zookeeper 101 By TungQD

AGENDA What is Zookeeper Zookeeper Architecture Zookeeper Data Model Leader Election Demo FAQ

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

What problems can it solve? Group membership Distributed data structures Reliable configuration service Distributed workflow

What is a Distributed System? “ A distributed system consists of multiple computers that communicate through a computer network and interact with each other to achieve a common goal. ” - Wikipedia-

A R C H I T E C T U R E

The Zookeeper Data Model D A T A M O D E L

ZNODE Ephemeral Znodes: Ephemeral Znodes are deleted when the creating client's session ends. Ephemeral znodes also cannot have any child znodes attached to it. Persistent znodes : Persistent znodes on the other hand,can have child znodes and are only deleted by any client, even the one that wasn’t the creator, subject to the znode’s access control list. Sequential znodes: Sequential znode is given a 10-digit number in a numerical order at the end of its name. Let’s say client1 created a sznode1. In the ZooKeeper server, the sznode1 will be named like sznode0000000001

➤ Creating a Znode create -<options> /<znode-name> <znode-data> Ex: Persistent (Default): create /znode mydata Ephemeral: create –e /eznode mydata Sequential: create –s /sznode mydata ➤ Deleting a Znode delete /<znode> rmr /<znode-with-child> ➤ Reading a Znode Data get /<znode-name> ➤ ( Re) Writing a Znode Data set /<znode-name> <new-data> Zookeeper Command Line Interface (CLI)

ZNode Watches ● Clients can set watches on znodes: o NodeChildrenChanged o NodeCreated o NodeDataChanged o NodeDeleted ● Changes to a znode trigger the watch and ZooKeeper sends the client a notification. ● Watches are one time triggers. ● Watches are always ordered. ● Client sees watched event before new znode data. ● Client should handle cases of latency between getting the event and sending a new request to get a watch.

ZooKeeper - Consistency Guarantees ➤ Sequential Consistency ➤ Atomicity ➤ Single System Image ➤ Reliability ➤ Timeliness

L E A D E R E L E C T I O N

Zookeeper Management tools Netflix Exhibitor Zookeeper UI(web) Zookeeper GUI (desktop - Windows) ZK-web Zoo Navigator

Who uses Zookeepers? COMPANIES: Yahoo Netflix LinkedIn Rackspace Zynga And many more…. PROJECTS IN FOSS : Apache Map/Reduce (Yarn) Apache Hbase Apache Solr Neo4j Katta And many more….

DEMO & FAQ

THANK YOU