Cassandra 如何选择协调节点和复制节点? [英] how Cassandra chooses the coordinator node and the replication nodes?

查看:19
本文介绍了Cassandra 如何选择协调节点和复制节点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cassandra 客户端如何选择协调节点?coordinator节点是否存储了复制前客户端发送的数据?

How the Cassandra client chooses the coordinator node? is the coordinator node stores the data sent by the client before replicating?

推荐答案

协调节点通常由考虑网络距离"的算法选择.任何节点都可以充当协调者,首先请求将发送到您的驱动程序知道的节点.但是一旦它连接并理解了集群的拓扑结构,它可能会变成一个更接近"的协调器.

The coordinator node is typically chosen by an algorithm which takes "network distance" into account. Any node can act as the coordinator, and at first requests will be sent to the nodes which your driver knows about. But once it connects and understands the topology of your cluster, it may change to a "closer" coordinator.

如果协调器最终成为负责数据令牌范围的节点之一,则协调器仅在本地存储数据(在写入时).

The coordinator only stores data locally (on a write) if it ends up being one of the nodes responsible for the data's token range.

这篇关于Cassandra 如何选择协调节点和复制节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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