为什么不让每个节点都是种子节点 [英] Why not make every node a seed node

查看:564
本文介绍了为什么不让每个节点都是种子节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Im a Cassandra newbie。我理解种子节点的目的。但是有与种子节点相关的任何成本吗?如果是,他们是什么。否则,我想知道为什么不让每个节点是种子节点?

Im a Cassandra newbie. I understand the purpose of the seed node. But are there any costs associated with a seed node? If so, what are they. Else, I wondering why just not make every node a seed node?

推荐答案

本质上没有与种子相关联的本地运行时成本,种子节点。然而,随着种子数量的增加,这种局部效应将逐渐变得不太明显。

There are essentially no local runtime costs associated with being a seed, other than you may receive more gossip traffic than a non-seed node. However with increasing number of seeds, this local effect will be progressively less pronounced.

更有趣的是分布式效应。种子节点喜欢说闲话,这意味着如果只有少数几个,更新将集中在那些少数种子。非种子节点将尝试向种子发送闲谈更新(从其种子列表中随机抽取),因此如果每个人都向相同的几个节点发送更新,则它们被绑定为具有最近的群集元数据。同时,闲话还涉及从种子接收元数据,这意味着每个使用少数种子节点闲谈的人也将从最近的更新中受益。最终结果是更新在整个集群中以相对较快的速度传播,代价是将一些闲话流量集中在较少的节点上。

More interesting are distributed effects. Seed nodes are favored for gossiping, which means that if there are only a few of them, updates will be concentrated among those few seeds. Non-seed nodes will try to send gossip updates to the seeds (picking randomly from their seed list), and so if everyone sends updates to the same few nodes, they are bound to have the most recent cluster metadata. At the same time, gossiping also involves receiving metadata from the seeds, which means that everyone who gossips with the few seed nodes will also benefit from the most recent updates. The end result is that updates are disseminated relatively quickly throughout the cluster, at the cost of concentrating some of the gossip traffic on fewer nodes.

与每个节点是种子。当一些节点闲话时,它基本上与集群中的另一个随机节点谈,这不是与集群的其余部分闲话的任何可能性。所以更新,我们的第一个节点刚刚发送到种子不会传播特别快。此外,因为种子没有接收到所有闲聊更新的更大比例,它能够发送回我们的节点的信息不是特别地最新的(事实上,两个节点将具有大约相同的不知道的概率关于集群中一些断开连接的更新)。因此,我们获得了完全的分散,但完全随机的更新传播。

Compare that to a situation where every node is a seed. When some node gossips, it essentially talks to another random node in the cluster, which is not any likelier to gossip with the rest of the cluster. So the update that our first node just sent to the "seed" is not going to propagate around especially quickly. Furthermore, because the seed does not receive a larger proportion of all gossip updates, the info it is able to send back to our node is not particularly up-to-date either (in fact both nodes would have approximately the same probability of not knowing about some disconnected update in the cluster). So we get full decentralization, but with completely random update propagation.

实际上,如果你有大量的种子,你可能会遭受拍打,重影与旧拓扑信息相关的其他奇怪的行为持续时间比它应该更长。

In real terms, if you have a large number of seeds, you may be subject to flapping, ghosting and other strange behaviors related to old topology info persisting for longer than it should.

这篇关于为什么不让每个节点都是种子节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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