node.js - 如何在 AWS Elasticache 中测试 redis 的性能?
问题描述
我想测试在 AWS ElastiCache 中运行的 Redis 性能。我已经尝试过redis-benchmark
在我的本地机器上测试它的工具。我需要在 ElastiCache 中进行测试,但我相信没有终端访问或redis-benchmark
实用工具。
如何对redis-benchmark
AWS ElastiCache 中的 redis 进行测试?
有没有其他方法可以测试 ElastiCache 中 redis 的性能?
解决方案
Redis-benchmark
工具包含在 redis 安装中。你可以做的是;从 ec2 连接到您的 redis 集群。本教程展示了从您的 ec2 实例连接它的步骤。
然后你可以像这样连接到你的实例;
redis-cli -h mycachecluster.eaogs8.0001.usw2.cache.amazonaws.com -p 6379
就像连接到您的集群一样,您可以使用
redis-benchmark -h mycachecluster.eaogs8.0001.usw2.cache.amazonaws.com -p 6379
对您的集群进行基准测试。它会打印出这样的东西;
====== mycachecluster.eaogs8.0001.usw2.cache.amazonaws.com ======
100000 requests completed in 1.83 seconds
50 parallel clients
3 bytes payload
keep alive: 1
99.36% <= 1 milliseconds
99.83% <= 2 milliseconds
99.92% <= 3 milliseconds
99.95% <= 4 milliseconds
99.96% <= 5 milliseconds
99.97% <= 6 milliseconds
99.99% <= 7 milliseconds
100.00% <= 7 milliseconds
54585.15 requests per second
推荐阅读
- scala - 如何在 IntelliJ IDEA 的 sbt shell 中扩展控制台中的代码?
- css - CSS:在考虑间隙空间时如何让网格尊重边距?
- swiftui - 为什么我在用户登录时看不到我的动画?
- javascript - 如何索引不和谐频道?
- azure-aks - 在 docker 容器内调用时,Azure AKS 获取凭据不起作用
- windows-7 - 为什么我刚打开 TortoiseHG 时可能会突然被拒绝权限?
- python - “numpy.ndarray”对象没有“替换”属性:运行 yfinance(雅虎财经)读取股票数据时,我收到股票列表错误
- javascript - 在 iframe 链接中触发 css a:hover
- c# - 处理 Date 和 Datetime 对象的时区
- sql - 在 Pivot 中计算数据