Cassandra:更大的复制因子=更快的读取? [英] Cassandra: bigger replication factor = faster reads?
问题描述
增加群集上的复制因素还会提高读取速度吗?
Does increasing replication factor on a cluster also increase the read speed?
我理解,当复制因子为1,并且有6个节点和令牌平均分布时 - 那么给定节点只有16,66%的机会有数据,如果没有它,它会询问负责的节点,这需要额外的时间。
I understand that when replication factor is 1, and there's 6 nodes and the tokens are distributed equally - then it's only 16,66% chance that given node has the data, if it does not have it, it asks the node responsible and that takes extra time.
我想,复制因子设置为6,每个节点都有完整的数据集,可以立即获取数据而不需要请求其他节点(我们使用读一致性= 1)。所以增加复制因子应提高阅读速度。它是否正确?
I guess that with replication factor set to 6, each node has the full dataset and can fetch data immediately without asking other nodes (we're using read consistency=1). So increasing replication factor should increase reading speed. Is this correct?
我们的应用程序写入数量相对较少,但每秒可以执行超过10k次get()操作。我们在集群中有6个节点,我们需要所有的读操作都非常快,这就是为什么我们正在寻找一种提高cassandra读取性能的方法。
Our app has relatively few writes but more than 10k get() operations per second. We have 6 nodes in the cluster and we need all read operations to be extremely fast, that's why we're looking for a way to improve cassandra's read performance.
推荐答案
这是正确的,只要你使用ConsistencyLevel.ONE。
That's correct, as long as you're using ConsistencyLevel.ONE.
这篇关于Cassandra:更大的复制因子=更快的读取?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!