了解 Cassandra 消息延迟指标 [英] Understanding Cassandra message latency metric

查看:18
本文介绍了了解 Cassandra 消息延迟指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试了解如何使用 org.apache.cassandra.metrics:type=Messaging 指标.我设置了 3 个数据中心,每个数据中心有 1 个节点.当我测量指标时,对于每个节点,我得到 2 个跨数据中心指标和 1 个跨节点延迟指标,如下(对于 DC-2 中的节点)

I'm trying to understand how to use the org.apache.cassandra.metrics:type=Messaging metric. I setup 3 datacenters with 1 node each. When I measure the metric, for each node I get 2 cross-datacenter metrics and 1 cross-node latency metric as follows (for node in DC-2)

org.apache.cassandra.metrics:type=Messaging,name=dc3-Latency
5.3387457013878636E7
org.apache.cassandra.metrics:type=Messaging,name=CrossNodeLatency
1.1471964354991291E8
org.apache.cassandra.metrics:type=Messaging,name=dc1-Latency
1.6108579786605054E8

但是,我目前没有使用集群的进程.Cassandra 是否在做一个虚拟写来衡量这个指标?另外,这里的跨节点延迟指标是什么意思,每个DC只包含一个节点.

However, I have no processes using the cluster currently. Is Cassandra doing a dummy write to measure this metric? Also, what does the cross-node latency metric mean here, each DC contains only one node.

推荐答案

该指标记录使用消息服务的所有事物的传入延迟.消息服务用于读/写,但也用于流媒体和八卦.Gossip 在所有节点之间每 1 秒触发一次,因此这可能在您的情况下占主导地位.在某些情况下,即使是非常空闲的系统,也可以将一些表写入(system_distributed、system_traces 和一些 dse 表,如果使用 dse).

The metric records incoming latency from all things using the message service. The message service is used for read/writes but its also used for streaming and gossip. Gossip fires every 1 second between all the nodes so this is probably dominating it in your situation. Also some tables may be written to (system_distributed, system_traces, and some dse tables if using dse) with even a pretty idle system in some situations.

每当消息从一个节点发送到另一个节点时,它都会为其附加一个时间戳以及一些版本信息.接收系统要做的第一件事(忽略明显的操作系统/套接字/等)或多或少是将该时间戳与现在"进行比较.这就是驱动指标的原因.然后,它会查看源所在的数据中心,以确定哪些指标要增加多少.

Whenever a message is sent from one node to another, it attaches a timestamp to it along with some versioning information. The first thing the receiving system will do (ignoring the obvious os/socket/etc) more or less is compare that timestamp to "now". This is what drives the metric. It will then look at the datacenter the source is from to determine which metrics to increment by how much.

这篇关于了解 Cassandra 消息延迟指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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