Upload
julia-proskurnia
View
2.993
Download
1
Tags:
Embed Size (px)
DESCRIPTION
ZooKeeper is a service for coordinating processes within distributed systems. Stress test of the tool was applied. Reliable Multicast and Dynamic LogBack system Configuration management were implemented with ZooKeeper. More details: http://proskurnia.in.ua/wiki/zookeeper_research
Citation preview
ZooKeeperIuliia Proskurnia, Zygimantas Bruzgys
Outline
• ZooKeeper?
• ZooKeeper Service
• ZooKeeper Usage
• Key Points
• Installation
• Experiments
• Configuration
• Reliable Multicast
• Stress Test
• Conclusions
2
Key features
ZooKeeper is:
•Service for coordinating processes in distributed applications.
•Key/value table.
•No locks service.
3
Features are:
•High Throughput
•Low Latency
•Highly Available
•Strictly ordered access to the nodes
Architecture4
ZooKeeper Service
• Znodes
• Regular & Ephemeral
• Watches
• Synchronous and Asynchronous methods
• Guarantees:
• Linearizable writes
• FIFO client order
• Handling shared configuration updates
• Liveness and durability
5
ZooKeeper Usage
• Configuration Management
• Group membership
• Leader Election
• Simple Locks
• Simple Locks without Herd Effect
• Read/Write Locks
• Double Barrier
6
Key Points
• Wait-free protocol
• No Locks
• Support Applications:
• Configuration Management
• Leader Election
• Group Membership
7
• But...
• State Based System
• Last changes visible
• Limited total size of data
Installation
8
Sample Configuration File:tickTime=2000initLimit=10syncLimit=5clientPort=2181dataDir=/home/ubuntu/zoodata
server.1=10.227.206.23:2888:3888server.2=10.58.190.233:2888:3888server.3=10.234.121.38:2888:3888
To install you need to:•Install Java•Download and extract ZooKeeper•Write a configuration file•Write node ID in data directory (filename myid)•Start ZooKeeper
Experiments9
Configuration Management
10
Reliable Multicast: Main
11
Reliable Multicast: Leader Election
12
Reliable Multicast:Send Message
13
Reliable Multicast: Receive Message
14
Reliable Multicast:Interesting Cases
15
• New client connects while a message is multicasted
• Recipient fails before receiving a message
• Leader fails
Stress Tests
• Done with zk-latencies Python script
• Run with the following configuration
16
./zk-latencies.py --servers "CONNECTION_STRING" --znode_count=ZNODE_COUNT \--znode_size=100 --timeout=5000 --watch_multiple=2
Stress Tests
17
0"
2000"
4000"
6000"
8000"
10000"
12000"
14000"
1" 2" 3" 4" 5"
ms#
Number#of#Servers#in#ZooKeeper#Cluster#
Time#for#10.000#Async#Opera>ons#
Read"
Write"
Watch"
1 client,multiple servers
Stress Tests
18
0"
1"
2"
3"
4"
5"
6"
7"
1" 2" 3" 4"
ms/op
era)
on+
Number+of+Servers+in+ZooKeeper+Cluster+
Synchronous+Opera)ons+
Read"
Write"
Watch"
1 client,multiple servers
Stress Tests
19
5 servers,1 client
0"
0,2"
0,4"
0,6"
0,8"
1"
1,2"
1" 2" 4" 6" 8" 10" 12" 14" 16"
ms/op
era)
on+
Thousands+of+Async+Opera)ons+
Writes+per+ms+
Conclusions
20
• ZooKeeper is:
• Coordination Service
• Highly Available
• Low Latency
• Wait-Free
• We Showed Several Examples:
• Configuration Management
• Reliable Multicast
• Stress Tests Shows:
• Prefer more servers for high availability and higher reads/write ratio
• With more servers it is still low latency
ZooKeeperIuliia Proskurnia, Zygimantas Bruzgys