我想测试在 AWS ElastiCache 中运行的 Redis 性能。我已经尝试过redis-benchmark在我的本地机器上测试它的工具。我需要在 ElastiCache 中进行测试,但我相信没有终端访问或redis-benchmark实用工具。
如何对redis-benchmarkAWS ElastiCache 中的 redis 进行测试?
有没有其他方法可以测试 ElastiCache 中 redis 的性能?
我想测试在 AWS ElastiCache 中运行的 Redis 性能。我已经尝试过redis-benchmark在我的本地机器上测试它的工具。我需要在 ElastiCache 中进行测试,但我相信没有终端访问或redis-benchmark实用工具。
如何对redis-benchmarkAWS 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