ZooKeeper的替代品? (集群协调服务) [英] ZooKeeper alternatives? (cluster coordination service)

查看:1176
本文介绍了ZooKeeper的替代品? (集群协调服务)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ZooKeeper 是针对数据中心的高度可用的协调服务.它起源于Hadoop项目.在此之上,可以实现锁定,故障转移,领导者选举,小组成员资格和其他协调问题. 还有ZooKeeper的替代品吗? (当然是免费软件)

ZooKeeper is a highly available coordination service for data centers. It originated in the Hadoop project. One can implement locking, fail over, leader election, group membership and other coordination issues on top of it. Are there any alternatives to ZooKeeper? (free software of course)

推荐答案

我已经广泛研究了Zookeeper/ Curator Eureka etcd 和领事.如果您在Java世界中,Zookeeper/Curator和Eureka在许多方面都是最精致,最容易集成的. Etcd 非常酷并且非常灵活,但是它实际上只是一个HA密钥存储区,因此您必须编写很多代码才能将其转变为经过认真研究的服务发现系统.

I've looked extensively at Zookeeper/Curator, Eureka, etcd, and consul. Zookeeper/Curator and Eureka are in many ways the most polished and easiest to integrate if you are in the Java world. Etcd is pretty cool and very flexible, but It is really just a HA key store so you would have to write a lot of code to turn it into an opinionated service discovery system.

领事(对我而言)是两全其美的.这是一个自觉的服务发现系统,写在 serf 之上,使用筏进行集群共识并使用八卦进行通信.它使用完善的REST api公开发现/注册端点,还允许您发现具有DNS SRV记录的服务,并通过配置注册服务(即,您可以注册无法与之集成客户端的数据库或应用程序,或者如果您只是想让您的服务发现与您的应用脱钩)

Consul is (to me) the best of both worlds. It is an opinionated service discovery system written on top of serf, using raft for cluster consensus and gossip for communication. It exposes the discovery / registration endpoints with a well documented REST api, and also allows you to discover services with DNS SRV records, and register services with configuration (i.e. so you can register a database or application you can't integrate a client with, or if you just want to keep your service discovery decoupled from your app)

我写了关于领事的博客帖子,其中您可以了解更多并浏览我的试用"演示

I've written a blog post about consul where you can learn more and walk through my "try it out" demo

我还讨论了与etcd& ; docker ,如果您想了解更多有关自定义代码的外观的话.

I've also discussed service discovery with etcd & docker if you want to see more about what that custom code might look like.

最后一件事!等领事是用go编写的,因此维护它们要比Zookeeper之类的Java解决方案容易得多.您只需要consul/etcd二进制文件.没有依赖项,没有链接的库,没有jvm.

One last thing! etcd & consul are written in go, so maintaining them is much easier then java solutions like zookeeper. All you need is the consul / etcd binary. no dependencies, no linked libraries, no jvm.

这篇关于ZooKeeper的替代品? (集群协调服务)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆