Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

使用 Zookeeper

使用 Akka

创建一个自定义解决方案

...


Geode做的最好事情之一是成员管理管理是动态的, 毫无单点故障.  稍微弱的地方是 Locator 服务, 如果所有的 Locators 都有一个急速下降的客户端数, 不能获得服务器的相关信息, 且新的服务器不能添加到集群中, 直到一个Locator再次恢复可用性.  即时 Locators 都宕掉了, 服务器集群仍然是可用的, 客户端仍然能够连接到服务器上.

对于这种情况, 如 Zookeepr 看起来是不满足要求的. 用户必须配置Zookeeper集群, 保证集群是配置好的, 把服务器丢失连接的风险降低到最小. 丢失一个集群的连接将需要一个服务器停机. Zookeeper集群通常情况下比较小, 因此一个 带有200台服务器的Geode 用户将会感觉存在风险, 当使用 一个大的, 7个节点的Zookeeper 集群时.Zookeeper并不响应7~11个节点的需求, 或者提供 UDP 消息通信.

 

JGroups 已经牵扯和解决了大量的必须在Geode 中 2.2.9 版本上修复的问题. 然而, 为了使用它, 我们 Fork 了一个版本, 修改特定的部分为了满足4, 7, 9 和 10版本.我们 Fork 出特定的部分, 如GMS 和故障检测协议 , 但是视图(View)类需要传递认证的 Credentials.  如果你没有在集群成员关系上使用它, JGroups 仍然在可靠的 UDP 消息传输上是有用的.

Akka 看起来是有前途的, 现在有大量的人使用它.

没有利用其他工程的自定义解决方案也能实现这个功能, 特别是如果 JGroups 被用于可靠地  UDP 消息传输时.

上述选项检查

本章节我们看一下每个选项, 看一下每个选项如何定位这些需求

...

For this reason a solution like Zookeeper seems inadequate.  Users would have to configure Zookeeper clusters and make sure the cluster is configured so that servers have minimal risk of losing contact with it.  Losing contact with the cluster would require a server to shut down.  Zookeeper clusters are typically pretty small, so a Geode user with 200 servers might feel at risk when using even a large 7-node Zookeeper cluster.  Zookeeper also doesn't answer requirements 7 through 11 or offer UDP messaging.

JGroups has evolved and solved a lot of problems that had to be fixed in the 2.2.9 copy currently in the Geode repository.  However, in order to use it we would have to fork it and modify certain parts in order to answer requirements 4, 7, 9 and 10.  We could fork only parts, such as GMS and the failure detection protocols but the View class needs to carry Credentials for authentication in order to be useful to Geode.  If not used for cluster membership, JGroups might still be useful for reliable UDP messaging.

Akka looks promising and a lot of people are using it.  

A custom solution that does not leverage other projects for clustering could also be implemented, especially if JGroups is used for reliable UDP messaging.

Examination of the options

In this section we'll look at each of the options and see how it might address the requirements.

JGroups

A newer version of JGroups could be modified to fit the requirements, just as is being done with the initial, incubating, version of Geode.

...

So, to sum up, zookeeper could be used as the basis for a membership management service, replacing some of the functionality we currently have built into JGroups.  We would have to implement a fair portion of what we need outside of zookeeper, and using zookeeper comes with some risks.  We'd still need a different solution for UDP messaging.

Akka

...

集群

Akka is used by Google 被用于Google Compute Engine and other projects for clustering.  Google has posted that it achieved 1500 nodes in a cluster with stable performance using a simple application and fairly loose timeouts.和其他的集群工程中.  Google 发布博客宣称在一个集群中它能够达到1500个节点, 且性能稳定, 同时超时范围宽松.

Akka 集群的相关文档, 如下所示Akka clustering documentation can be found herehttp://doc.akka.io/docs/akka/snapshot/common/cluster.html

Akka uses configured seed-nodes to join the cluster, which is compatible with Geode’s Locator discovery pattern, but they have not solved the concurrent-startup problem for seed nodes that Geode has licked in its JGroups improvements.  The first seed node needs to be brought up before any other seed nodes are started使用配置的种子节点加入到集群中, 它兼容 Geode的 Locator 发现模式, 但是对于种子节点, 它也不能够解决并发启动的问题,  Geode 尝试了JGroups 增强实现.  第一个种子节点需要提出, 在其他的种子节点启动之前.

Akka delivers membership change notifications using an Actor model for individual MemberUp/MemberRemoved events and you can also get the cluster state.  Cluster state is fairly complete and has both a lead-member, a sorted set of members and a set of unreachable members.  One thing missing from cluster state is any form of unique identifier.

...