title: redis cluster benchmarks vs standalone
body: <p>I have been using redis stand alone for many years now. Since now the requirement is that all software must be clustered to make it highly-available I am evaluating redis-cluster. <br/></p>
  
  <p>When I try a simple rpush on a single redis key , the cluster takes 5x more the time for rpush as compared to a standalone instance</p>
  
  <p>Is there something I should be doing to improve the performance of the cluster. The redis server version is 3.2.3</p>
  
  <p>The code is below ( php) </p>
  
  <pre><code>&lt;?php
  $redis_standalone = new Redis();
  $redis_standalone-&gt;connect("localhost");
  $redis_standalone-&gt;del("JOBS_QUEUE");
  echo time()."\n";
  for($i=0;$i&lt;100000;$i++){
          $redis_standalone-&gt;rpush("JOBS_QUEUE",$i);
  }
  echo time()."\n";
  ?&gt;
  </code></pre>
  
  <hr>
  
  <p>And for the cluster </p>
  
  <pre><code>&lt;?php
  $redis_cluster = new RedisCluster('myclustername', ['127.0.0.1:7000','192.168.50.166:7001','192.168.50.167:7000','192.168.50.168:7000','192.168.50.169:7000','192.168.50.171:7000']);
  $redis_cluster-&gt;del("JOBS_QUEUE");
  echo time()."\n";
  for($i=0;$i&lt;100000;$i++){
          $redis_cluster-&gt;rpush("JOBS_QUEUE",$i);
  }
  echo time()."\n";
  ?&gt;
  </code></pre>