SWIM 协议新节点如何获取集群中现有节点的地址 [英] SWIM protocol how does a new node get an address of an existing node in a cluster

查看:70
本文介绍了SWIM 协议新节点如何获取集群中现有节点的地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:我一直在研究微服务,更具体地说是服务发现,我感兴趣的一件事是 SWIM 协议.但是当涉及到新节点加入网络时,我有点困惑.

Background: I've been looking into microservices more specifically service discovery, one thing thats interested me is the SWIM protocol. But I'm a little confused when it comes to new nodes joining the network.

加入集群的新节点如何获得现有集群的 1 个或多个节点的地址,而不是单点故障?

如果您需要更多信息或有任何疑问,请告诉我.

If you need any further information or have any questions just let me know.

推荐答案

请查看实现基于swim协议微服务的scalecube,并改进了gossip协议

please check out scalecube that implements microservices based on swim protocol with gossip protocol improvement

https://github.com/scalecube/scalecube

您可以找到参考资料:https://github.com/scalecube/scalecube/wiki/Distributed-Computing-研究

一般来说,当新节点加入网络时,它会加入一个已经在运行的集群节点(种子或成员)和集群关于新成员的八卦并创建一个集群",八卦协议感染"集群会员信息.

in general when new node joining to the network it joins one of the already running cluster nodes (seeds or members) and the cluster gossip about the new member and creating a "cluster" the gossip protocol "infects" the cluster with the membership information.

通常有一组节点用作集群的入口点,称为种子,它们可以是众所周知的成员,也可以使用不同的方法(例如 dns 名称)发现,因此当新成员加入集群时,它可以查找主机名种子",并解析为其当前或种子 IP 之一.

usually there is a set of nodes that serve as the entry point to the cluster called seeds and they can be a well known members or discovered using diffident methods such as dns name so when new member join the cluster it can look for a host name "seed" and that is resolved to its current or one of the seed ips.

在微服务架构中,种子也可以是 api 网关或充当种子的特定节点,通常最好选择种子作为最不受更改和升级影响的成员.

in microservices architecture seeds can also be the api-gateways or specific nodes that act as seeds usually its best to choose the seeds as the members that least subject to changes and upgrades.

我写了一篇讨论这个话题的帖子https://www.linkedin.com/pulse/swim-cluster-membership-protocol-ronen-nachmias/

I have written a post discussing the topic https://www.linkedin.com/pulse/swim-cluster-membership-protocol-ronen-nachmias/

这篇关于SWIM 协议新节点如何获取集群中现有节点的地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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