Search code examples
node.jsamazon-web-serviceslambdaredisamazon-elasticache

How to test performance of redis in AWS Elasticache?


I want to test the Redis performance running in AWS ElastiCache. I have tried redis-benchmark tool to test it in my local machine. I need the same to test in ElastiCache but I believe there is no terminal access or redis-benchmark utility tool.

How can the redis-benchmark test be done for the redis in AWS ElastiCache?

Is there any other way to test the performance of the redis in ElastiCache?


Solution

  • Redis-benchmark tool is included on redis installation. What you may do is; connecting to your redis cluster from ec2. This tutorial shows the steps to connect it from your ec2 instance.

    Then you may connect to your instance like this;

    redis-cli -h mycachecluster.eaogs8.0001.usw2.cache.amazonaws.com -p 6379
    

    Just like connecting to your cluster you may use

    redis-benchmark -h mycachecluster.eaogs8.0001.usw2.cache.amazonaws.com -p 6379
    

    to benchmark your cluster. It will print something like this;

    ====== 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