卡桑德拉(Cassandra)中的摘要请求 [英] Digest request in Cassandra

查看:74
本文介绍了卡桑德拉(Cassandra)中的摘要请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于摘要请求,我有几个问题,我通读了文档,以下信息不是重点,

I have few questions regarding the digest request, I read through the docs and the following informations are not up to the point,

1)假设我有10个

同样,为了理解,让副本为节点1,节点2和节点3,协调器为节点4。

Also for understanding let the Replicas be Node 1, Node 2 and Node 3 and Coordinator be Node 4.

p>

对于读取请求,根据我的理解,第一协调器(节点4)将直接请求发送到延迟较低(动态侦听)的节点之一,说节点1并得到数据,然后在接收到数据后,将摘要请求发送到下一个等待时间节点(例如节点2)之一,仅获取哈希值,并将其与从直接请求中计算出的哈希值进行比较。

For the read request, As per my understanding first coordinator (Node 4) sends the direct request to one of the node with the lower latency (Dynamic snitch) say Node 1 and gets the data, then after receiving the data It sends the digest request to one of the next latency node say Node 2 and gets only the hash and compares with the hash calculated from direct request.

问题1 :摘要请求在接收到直接请求后是否与直接请求(或)一起并行发送(到节点2)?摘要请求?

Ques 1 : Is the digest request send parallelley (to Node 2) with the direct request (Or) after receving the direct request It send the digest request ?

问题2:我知道也会为数据一致性而发送对节点3的摘要请求,但是协调器(节点4)何时会发送发送摘要请求到第三副本(节点3)?是在协调员回复客户之后吗?

Ques 2 : I know the digest request for Node 3 also will be sent for data consistency, But when does the coordinator (Node 4) send the digest request to the third replica (Node 3) ? Is it after coordinator responding back to the client?

问题3:另外,仅在完成读取修复后,文档中才提到协调器会响应客户端吗?

Ques 3 : Also It is mentioned in the doc only after completing the read repair the coordinator will respond back to the client?

问题4:除了进行跟踪之外,还可以有人解释实时识别读写请求流的方法吗?

Ques 4 : Apart from Tracing on, Could somebody explain the way to identify the read and write request flow in real time?

那太好了,如果你们可以用工作流程来解释这些问题,它将对每个人都有用。

It would be Great, If you guys could explain these question with workflow, It will be useful for everyone.

I请通读视频以供参考: https://www.youtube.com / watch?v = HuDJBTPdaOA& list = PLm-EPIkBI3YorKfmT9LXpBhyeZMYAM1M7

I read through video also for reference : https://www.youtube.com/watch?v=HuDJBTPdaOA&list=PLm-EPIkBI3YorKfmT9LXpBhyeZMYAM1M7

推荐答案

我正在假设您的情况。 N4是协调节点。您向N2(副本)发送了直接请求。收到N2的响应后,协调器节点(N4)将向所有包含其他副本的节点(N3或N1)发送摘要请求。假设N3更靠近节点。因此,摘要请求将被发送到N3以满足一致性级别。在收到来自N3的响应之后,N4将比较来自N2和N3的数据,并将更新后的数据返回给客户端。

I am assuming your situation. Here N4 is coordinator node. You sent direct request to N2(which is a replica). After receiving response from N2, coordinator node(N4) will send a digest request to any of the nodes(N3 or N1) that is containing other replica. Let's say N3 is nearer node. So, the digest request will be sent to N3 to satisfy consistency level. After receiving response from N3 , N4 will compare the datas from N2 and N3 and return the updated data to the client.

N1节点中还有另一个副本。现在,协调器节点将摘要请求发送到所有其他副本(在本例中为N1)。如果找到N4,则未更新任何节点(N1,N2,N3),它将运行读取修复请求。

There is another replica in N1 node. Now coordinator node sends digest request to all other replicas.(In this case N1). And if N4 finds, any node(N1, N2, N3) is not updated it runs a read repair request.

ps:我不知道答案4。

p.s: I don't know answer 4.

https://docs.datastax.com/zh-CN/cassandra/2.1/cassandra/dml/architectureClientRequestsRead_c.html

https://teddyma.gitbooks.io/learncassandra/content/client/read_requests.html

这篇关于卡桑德拉(Cassandra)中的摘要请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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