iT邦幫忙

2021 iThome 鐵人賽

DAY 17
0
Software Development

徵坦補! 新手可! Open-Match 配對框架系列 第 17

Day17 Grafana (gRPC, Go Processes, Redis)

昨天已經介紹過,透過 grafana 監控 matching 的品質 ,今天來介紹一下,透過 grafana 監控服務在資源上的消耗,包含了 gRPC 連線狀況、Redis 的存取狀況,以及由 golang 撰寫的 Open-Match,核心程序所消耗的資源。

gRPC

由於是由連線產生的 mertics 所揭露的資訊,可以用來觀察 Open-Match 核心接口被調用的狀況,以及單一接口所需花費的平均時間等資訊。

依照先前模板部署的話,dashboard 裡面有依照服務接口切分好的類別

https://i.imgur.com/ZcLxCZh.png

Client RTT 可以用來觀察平均執行時間
https://i.imgur.com/vA7THUx.png

Metric Name Description
Client Request Rate Average gRPC client side request per second by Open Match API methods
Server Request Rate Average gRPC server side request per second by Open Match API methods
gRPC Error Rate Ratio of gRPC calls that returned an non-OK status code by Open Match methods
Network IO per second Total network I/O rate per second
Bytes Sent per Call: openmatch.{Component}/{MethodName} Average bytes sent per call by quantile
Bytes Received per Call: openmatch.{Component}/{MethodName} Average bytes received per call by quantile
Client RTT: openmatch.{Component}/{MethodName} Average roundtrip latency by quantile

Redis

Redis 監控面板裡面包含了,常見的記憶體使用量、key 的數量、存取頻率、連線數等等
https://i.imgur.com/XqkVjxA.png

Metric Name Description
Uptime Redis uptime
Memory Usage Redis memory usage in percentage
Total DB Items Total Redis DB keys in Redis master
CPU Usage Percentage of Limit Current CPU usage to CPU resource limit ratio per pod (%)
Total Memory Usage Current and maximum Redis memory usage by Redis instances
Hits / Misses per Sec Cache hits/misses per second by Redis instances
Commands Executed / sec Executed Redis commands per second by Redis instances (excludes Redis sync calls)
Network I/O Total network I/O per second by Redis instances

Go Processes

由於 Open-Match 核心是由 golang 所編程,我們自然的會想要知道核心的記憶體使用量、GC的狀況、golang 獨有的併發方式 goroutines 數、以及 cpu 的使用率等等
https://i.imgur.com/oHQ5n0C.png

Metric Name Description
CPU Usage Limit Percentage Current CPU usage to CPU resource limit ratio per pod (%)
Go Routines Average number of Go routines by deployment
Process Memory Average number of resident/virtual memory by deployment
Process Memory Derivative Derivative of the average number of resident/virtual memory by deployment
Go Memstats Average number of bytes allocated/allocation rate/stack inuse/heap inuse by deployment
Go Memstats Derivative Derivative of the average number of bytes allocated/allocation rate/stack inuse/heap inuse by deployment
Open File Descriptors Average number of currently opened file descriptors by deployment
Open File Descriptors Derivative Derivative of the average number of currently opened file descriptors by deployment
GC Duration Quantiles Average number of garbage collection time by deployment and quantile

Reference


上一篇
Day16 Grafana (Match Making)
下一篇
Day18 Helm
系列文
徵坦補! 新手可! Open-Match 配對框架30

尚未有邦友留言

立即登入留言