Zookeeper 的实际使用

发布于 2024-08-05 08:34:55 字数 167 浏览 4 评论 0 原文

我最近一直在研究 Zookeeper,想知道目前是否有人在使用它以及他们的具体用途使用它来存储。

最常见的用例是配置信息,但是您要存储什么类型的数据以及多少数据?

I've been looking at Zookeeper recently and wondered whether anybody was using it currently and what they were specifically using it for storing.

The most common use case is for configuration information, but what kind of data and how much data are you storing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

瀟灑尐姊 2024-08-12 08:34:55

HBase 使用 Zookeeper 来协调其“头节点”在当前版本之前负责的活动。转向使用 Zookeeper 意味着中央控制不再是单点故障。

Zookeeper 的用途非常广泛;这是使用它构建分布式并发队列的示例:

http://blog.cloudera.com/blog/2009/05/building-a-distributed-concurrent-queue-with-apache-zookeeper/

你当然也可以用它在分布式系统中创建资源锁等。

HBase uses Zookeeper for coordinating activities its "head node" was responsible for prior to the current version. The move to using Zookeeper means the central control is no longer a single point of failure.

Zookeeper is very versatile; here is an example of using it to build a distributed concurrent queue:

http://blog.cloudera.com/blog/2009/05/building-a-distributed-concurrent-queue-with-apache-zookeeper/

You can of course also use it to create resource locks, etc, in a distributed system.

泪痕残 2024-08-12 08:34:55

老问题,但由于此页面首先出现在谷歌搜索动物园管理员用例时,我认为最好提供更新的列表

  1. 维基百科
  2. zookeeper wiki
  3. 真实用户

Old question, but since this page comes up first on a google search for zookeeper use cases, I figured it would be best to give an updated listing

  1. wikipedia
  2. zookeeper wiki
  3. real users
安静被遗忘 2024-08-12 08:34:55

DOSGi 的Apache CXF 实现使用zookeeper 作为其服务注册存储库。各个容器都有一个分布式软件 (dsw) 捆绑包,用于侦听所有服务事件,并且当服务状态发生变化时,该捆绑包具有指示分发的属性。 dsw 与发现包进行通信,在参考实现案例中,发现包使用 Zookeeper 将服务存储为临时节点。其他实例将查找节点结构的更改并在其本地系统上注册代理。最终结果是您可以编写普通的 OSGi 代码并最终获得透明的分发。

The Apache CXF implementation of DOSGi uses zookeeper for its service registration repository. Individual containers have a distributed software (dsw) bundle that listens for all service events and when a service status changes that has a property indicating distribution. The dsw talks to the discovery bundle which, in the reference implementation case, uses zookeeper to store service as ephemeral nodes. Other instances will look for changes to the node structure and register proxies on their local systems. The end result is you can code to plain OSGi and end up with transparent distribution.

我很OK 2024-08-12 08:34:55

Norbert 是可扩展生产系统的一个很好的例子。总的来说,它集成了 Netty、Protocol Buffers 和 Zookeeper
成为运行集群服务的轻量级框架。 Protocol Buffers 用于指定服务 API,Netty 实现传输层抽象,Zookeeper 本质上是一个容错发现服务。

每次启动服务实例时,Norbert 都会将其注册为特定服务类型的可用实例。从实现的角度来看,它创建了两个 Zookeeper 树:

  • “/ServiceName/members”列出了服务的所有已知实例
  • “/ServiceName/available”列出了服务的当前可用实例

每个节点最重要的属性是要使用的 url连接到相应的服务实例。它支持客户端负载平衡 - Norbert 客户端查找给定服务名称的 URL 列表,并尝试以某种顺序(例如循环或随机)连接到其中一个。

Norbert is a good example from a scalable production system. I general, it integrates Netty, Protocol Buffers and Zookeeper
into a lightweight framework for running clustered services. Protocol Buffers are used to specify your service API, Netty implements transport-layer abstractions and Zookeeper is essentially a fault-tolerant discovery service.

Every time a service instance is started Norbert registers it as available instance of a particular service type. From implementation perspective, it creates two Zookeeper trees:

  • "/ServiceName/members" which lists all known instances of the service
  • "/ServiceName/available" which lists currently available instances of the service

The most important property for each node is the url to use to connect to the corresponding service instance. It enables client-side load balancing - a Norbert client finds the list of urls for a given service name and attempt to connect to one of them is some order (e.g. round-robin or random).

我还不会笑 2024-08-12 08:34:55

有一篇关于 ZooKeeper - 协调之王的好文章 ZooKeeper - 协调之王 Elastic Cloud 的 ZooKeeper。

例如,在 Found 中,我们广泛使用 ZooKeeper 进行发现,
资源分配、领导者选举和高优先级通知。
在这篇文章中,我们将向您介绍这位协调之王
仔细看看 Found 中我们如何使用 ZooKeeper

There is a good article ZooKeeper - The King of Coordination about ZooKeeper at Elastic Cloud.

At Found, for example, we use ZooKeeper extensively for discovery,
resource allocation, leader election and high priority notifications.
In this article, we'll introduce you to this King of Coordination and
look closely at how we use ZooKeeper at Found

不羁少年 2024-08-12 08:34:55

Solr 还致力于集成 ZooKeeper。在这里你可以看到它们用于动态配置、分片、SPOF 消除(主/从选举)、重新平衡等。

Solr is also working to integrate ZooKeeper. Here you can see they are using for dynamic config, sharding, SPOF elimination (master/slave election), rebalancing, etc.

哥,最终变帅啦 2024-08-12 08:34:55
  • Storm多家公司提供支持(Twitter 和 Groupon 是其中两家较知名的公司)并依赖 Zookeeper。
  • Kafka 由 Linkedin 使用,依赖于 Zookeeper。

Storm 使用 Zookeeper 存储所有状态,以便它可以从任何(分布式)组件服务的中断中恢复。

这允许组件服务是无状态的,并且在需要配置数据时只需下载或与 Zookeeper 服务器同步。如果您曾经需要恢复生产服务器,您就会知道这有多令人头痛!

Kafka 队列消费者可以使用 Zookeeper 来存储已消费信息(高水位线)从队列中。

  • Storm is used by a number of companies (Twitter and Groupon being two of the better known) and relies on Zookeeper.
  • Kafka is used by Linkedin and relies on Zookeeper.

Storm uses Zookeeper to store all state so that it can recover from an outage in any of its (distributed) component services.

This allows the component services to be stateless and simply download or sync with the Zookeeper servers when configuration data is needed. If you have ever had to recover a production server you will know what a headache this can be!

Kafka queue consumers can use Zookeeper to store information (high water mark) on what has been consumed from the queue.

月牙弯弯 2024-08-12 08:34:55

就我而言,我们将配置文件存储在zookeeper ensemble中以供集群使用。
我们正在使用领导者->追随者模式。因此,当一个动物园管理员关闭时,我们会切换到另一个动物园管理员(复制模式)

In my case we are storing configuration files in zookeeper ensemble for cluster usage .
We are using leader -> follower schema . So when one zookeeper down we are switched for another one (replicated mode)

终止放荡 2024-08-12 08:34:55

除了配置之外,Zookeeper 还用于许多其他用途。
这是使用 Zookeeper 实现分布式原语的官方列表。

https://zookeeper.apache.org/doc/current/recipes.html

Zookeeper was used for many things other than configuration.
Here is a official list of implement distributed primitives using zookeeper.

https://zookeeper.apache.org/doc/current/recipes.html

花期渐远 2024-08-12 08:34:55

Neo4j 使用 Zookeeper 作为高可用性企业服务器! http://docs.neo4j.org/chunked/milestone/ha.html

Neo4j uses Zookeeper their High Availability enterprise server! http://docs.neo4j.org/chunked/milestone/ha.html

迷离° 2024-08-12 08:34:55

datomic 使用 apache Zookeeper 来管理基于 riak 的数据存储。

由于 Riak 目前仅支持最终一致性,因此在 Riak 上运行的 Datomic 系统还利用 Apache ZooKeeper,这是一种高可用的协调服务。 Datomic 使用 ZooKeeper 进行事务处理故障转移协调,以及每个数据库需要使用 CAS 更新的少量密钥。来源:http://blog.datomic.com/2012/11 /riak-and-couchbase-support.html

datomic uses apache zookeeper to manage riak based data storage.

Because Riak supports only eventual consistency at this time, a Datomic system running on Riak also utilizes Apache ZooKeeper, a highly-available coordination service. Datomic uses ZooKeeper for transactor failover coordination, and for the handful of keys per database that need to be updated with CAS. source: http://blog.datomic.com/2012/11/riak-and-couchbase-support.html

泡沫很甜 2024-08-12 08:34:55

以下是一些有关 HBase 如何使用 ZooKeeper 的详细信息,包括有关他们打算如何使用它的信息未来。通常,他们通过使用 ZooKeeper 实现的领导者选举来消除区域服务器上的 SPOF。

Here's some detail on how HBase uses ZooKeeper, including information on how they intend to use it in future. Generally they use it for eliminating SPOF on the region servers via Leader election implemented using ZooKeeper.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文