What Apache ZooKeeper is and when should it be used?
2023-09-11 14:18:40 时间
Today I’ve got a sudden speech about Apache Zookeeper in corporate architects community. There should have been another speaker, but he did not arrive. So, I’ve tried to introduce the tool to community. I was asked number of interesting question that can introduce Zookeeper to a person who know nothing about it. I’ve decided that such a introduction FAQ can be useful for general public, so here it is.
-
What is Apache Zookeeper?
It’s distributed coordination service. Is it much clearer now? :-) See next Qs for practical answers. -
What is it good for?
Reliable and HA locks, semaphores, latches, leader election, atomic counters, barriers, queues (but see limitations). See recipes. -
What are the wrong usages of Zookeeper?
Data transfer, Data storage, fast in-memory operations. It looks like file system, but don’t be fooled. It is not file system. -
Why should not it be used for data transfer or storage?
Single element (node) can hold only 1MB of data. All the data is in memory on all the servers (no sharding, no disk overflow). -
How fast is it?
Depends on your hardware. Usually ~10K write ops. More important is that write speed does not scale when you increase number of severs. Read speed scales. Every your action is written to disk with flush. Sometimes I want for this to be optional :-) -
Are there other limitations?
You should not make too many children in the single “folder” (parent node) if you want to get children list. The children list should not overflow 1MB limit to be returned to you. -
What are those recipes?
Zookeeper provides low-level primitives to implement different things, like locks. Such an implementation is usually named recipe. While Zookeeper documentation has some simple recipes, they are too simple to be fully correct and efficient. It’s highly recommended to use some good recipes library, like Apache Curator. -
Is Zookeeper stable?
It’s used in enterprises level solutions, like HBase or Fuse Fabric. -
Is it Java-only?
Zookeeper is written in java, but has well defined protocol and clients for other languages.
相关文章
- ORA-04091: table xxxx is mutating, trigger/function may not see it
- it 建设工具一览
- [AWS] Creating a Private Hosted Zone and Associating It with Multiple VPCs
- ESX VCENTER从模板快速布置IT应用
- [AWS] Lab - Create a SNS and subscribe it
- 解决 Jenkins 中无法展示 HTML 样式的问题,csp问题,Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'".
- minikube报错:This computer doesn’t have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory.
- containerd :cannot validate certificate for 192.168.111.11 because it doesn‘t contain any IP SANs
- how does eclipse know what tasks it should do when we select Maven build
- atitit.《金刚经》与it软件项目管理的启发 读后感attilax
- 成功解决building ‘snappy._snappy‘ extension error: Microsoft Visual C++ 14.0 is required. Get it with “B
- pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
- 求职时这样回答问题你就输了!来自IT类面试官视角的深度解读
- 作为一名成功的IT程序员,需要哪些必备技能呢?
- 最高薪资16400元!乘着数字经济的东风,转行IT拿高薪不是梦!
- 已解决Could not find file with URI “/opt/data-integrationugins“ because it is a relative path
- U-GAT-IT整体流程分析
- 120个IT冷知识,看完就不愁做选择题了