webrtc - CoTURN 使用统计
问题描述
我对 WebRTC 世界还是有点陌生,并试图找到自己的出路。我已成功设置 CoTURN,并且能够使用 CoTURN 在防火墙后面路由呼叫。现在我想知道是否有可能以某种方式检查并可能可视化 CoTURN 的使用统计信息?我很想知道在任何给定时间有多少用户在使用服务器,带宽和 CPU 使用率是多少等?我在官方文档中看到了有关如何优化带宽和 CPU 使用率的详细信息,但我没有找到任何有关实际监控使用情况的信息。任何帮助将不胜感激。
解决方案
如果您想监控标准使用统计信息,例如 CPU 使用情况、负载、带宽等,您可以专注于您的基础架构可用的内容。例如,在 AWS 中,您可以使用 CloudWatch,或者在通用 Linux 部署中使用 Prometheus 导出使用统计数据,然后使用 Grafana 呈现它们。
对于 coturn/TURN 特定的统计信息,coturn 允许在 Redis 中存储一些指标;它在https://github.com/coturn/coturn/blob/master/turndb/schema.stats.redis中有描述
Total traffic information is also reported when the allocation is deleted. The keys are
"turn/user/<username>/allocation/<id>/total_traffic" or "turn/user/<username>/allocation/<id>/total_traffic/peer".
Applications interested in the total amount of traffic per allocation can subscribe to these events as:
psubscribe turn/realm/*/user/*/allocation/*/total_traffic
psubscribe turn/realm/*/user/*/allocation/*/total_traffic/peer
推荐阅读
- xdebug - 有没有办法在lando网站上关闭一些请求的Xdebug
- r - 拆分字符串以删除最后一个点之前的所有内容并删除字符串末尾的下划线?
- css - Bootstrap 4 flexbox 导航,带有居中的徽标和两侧的项目
- python - 关于比较Python中两个列表的问题
- javascript - EJS 页面显示为纯文本
- file - 如何为列表中的每个项目执行循环?VB.NET
- c - 如何在C语言中反转字符串中单词中的每个字符?
- php - 在 jQuery 变量 WooCommerce 中获取产品变量数组
- javascript - JavaScript setTimeout 执行顺序
- javascript - 尝试对 Web 表单方法进行 Ajax 调用并获得内部服务器错误。我已经尝试了几乎所有类似问题的解决方案