如果只有一个客户端写入集群,是否需要对Cassandra进行时钟同步? [英] Do I need clock synchronisation for cassandra if only one client writes to cluster?

查看:76
本文介绍了如果只有一个客户端写入集群,是否需要对Cassandra进行时钟同步?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从cassandra的文档中,我知道cassandra使用查询的时间戳来解决两次写操作之间的冲突,因此需要同步集群所有节点上的时钟。在我的用例中,我们只有一个客户端在向集群写入数据,而有多个客户端在从集群读取数据。因此,如果我使用客户端时间戳生成器(我相信版本3是默认的时间戳生成器),我是否仍需要使群集节点时钟彼此同步?

From cassandra's documentation I got to know that cassandra uses timestamps of query to resolve conflicts between two writes and hence the clocks on all the nodes of the cluster needs to be synchronised. In my use-case we have only one client writing to the cluster and multiple clients reading from the cluster. So, if I use client-side timestamp generator (which I believe is default for version>3) do I still need to have cluster node clocks synchronised with each other?

推荐答案

在与存储的数据相关联的写入时间戳记的情况下,如果您使用客户端时间戳记和单个客户端,则不需要时钟同步。

In the context of write timestamps associated with data being stored, clock synchronization is not needed if you are using client timestamps and a single client.

但是,我仍然不鼓励至少不要在Cassandra集群中保持时钟同步。在某些情况下,时钟偏斜会影响Cassandra的其他部分。例如, CASSANDRA-11991 显示了时钟偏斜影响节点时钟的情况。用于轻量级交易。尽管已解决了该特定问题,但努力进行同步似乎仍然是一个好主意。

However, I would still discourage not at least trying to keep clocks in sync in a Cassandra cluster. There have been cases where clock skew affects other parts of Cassandra. For example, CASSANDRA-11991 shows a case where clock skew effected the node clocks used for light weight transactions. While that particular issue has been addressed, it still seems like a good idea to make an effort to synchronize.

这篇关于如果只有一个客户端写入集群,是否需要对Cassandra进行时钟同步?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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