【问题标题】:How to test performance of redis in AWS Elasticache?如何在 AWS Elasticache 中测试 redis 的性能?
【发布时间】:2020-11-19 00:05:10
【问题描述】:

我想测试在 AWS ElastiCache 中运行的 Redis 性能。 我已经尝试过redis-benchmark 工具在我的本地机器上对其进行测试。 我需要在 ElastiCache 中进行测试,但我相信没有终端访问或 redis-benchmark 实用工具。

如何对 AWS ElastiCache 中的 redis 进行redis-benchmark 测试?

有没有其他方法可以测试 ElastiCache 中 redis 的性能?

【问题讨论】:

    标签: node.js amazon-web-services lambda redis amazon-elasticache


    【解决方案1】:

    Redis-benchmark 工具包含在 redis 安装中。你可以做的是;从 ec2 连接到您的 redis 集群。这个tutorial 显示了从您的 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
    

    【讨论】:

    • 所以我必须创建一个新的 EC2 实例,安装 redis 并运行 redis-benchmark?
    • @DeekshithHegde 是的,很快就会推出一个新的并做好准备。完成后,您可以终止它。您无法从本地连接到 Elasticache 实例,因为它没有公共 IP 地址,因此无法从 VPC 外部访问。
    猜你喜欢
    • 2021-03-19
    • 2018-06-07
    • 2019-09-12
    • 1970-01-01
    • 2022-01-27
    • 2013-09-23
    • 1970-01-01
    • 2015-06-09
    • 2017-09-27
    相关资源
    最近更新 更多