test environment
test version
- java version "1.7.0_10" 64位
- zookeeper 3.4.5 xmx2G
zookeeper Server 3台
192.168.100.53 service port 2181
192.168.100.54 service port 2181
192.168.100.55 service port 2181
64G memory, 12 cores
function test
event consumer
192.168.100.53
192.168.100.54
192.168.100.55
Operation: Listen to the events of the registered node and do the corresponding operations.
event producer
192.168.100.53
Operation: add node, delete node, modify node data
Test Case:
- Check the zookeeper role through the zkServer.sh status command, stop the leader, the zookeeper can work normally, and re-elect a leader.
- View the zookeeper role through the zkServer.sh status command, stop the follower, and the zookeeper can work normally.
- Stop any two zookeeper servers, and the zookeeper will not work properly.
- The last one monitors the running status of the zookeeper Server. zkServer.sh status
- Cluster B has been adding nodes, modifying node data, and deleting nodes for a long time. Cluster A can normally monitor cluster B events.
- Start: 2013-04-03 20:00:00 End: 2013-04-07 10:00:00 Interval per event: 100ms Total number of events: 2932992
- Any one of cluster A restarts, re-registers with the zookeeper cluster, and can obtain the latest node information of cluster B.
Performance Testing
test one
3 processes, one process opens 1 connection, 50 threads, the node is not subscribed
A process is under a zk node, first create EPHEMERAL node, then delete, create and delete each count an update.
DataSize (bytes) | totalReq (10,000 times) | totalTime (seconds) | SuccReq (10,000 times) | FailReq (10,000 times) | avgSuccTPS (times/second) | avgFailTPS (times/second) |
255 | 600 | 1380 | 600 | 0 | 4346 | 0 |
510 | 600 | 1509 | 600 | 0 | 3976 | 0 |
1020 | 600 | 1536 | 600 | 0 | 3906 | 0 |
Test two
3 sub connections under a zk node, 1 pub
A process operates 33 zk nodes, executes the creation of an EPHEMERAL node, and does not delete it
A total of 3 processes are started
DataSize (bytes) | totalReq (10,000 times) | totalTime (seconds) | SuccReq (10,000 times) | FailReq (10,000 times) | avgSuccTPS (times/second) | avgFailTPS (times/second) |
255 | 19.8 | 83 | 19.8 | 0 | 2385 | 0 |
510 | 19.8 | 83 | 19.8 | 0 | 2385 | 0 |
1020 | 19.8 | 86 | 19.8 | 0 | 2302 | 0 |