title: how to set Jedispool configuration parameter with jedis cluster?
body: <p>I'm using Ubuntu 16.04 version redis version 3.2.5 I've done a cluster in redis but my question is that whenever i set pool configuration in jedispool parameter it doesn't effect on that here suppose i set setMinIdle parameter to 2 but it can't effect means minimum two connection remain open but after complete execution of program connection is zero(0).
  also here when JedisCluster object is created five connection automatically done i can't understand why only five connection always establish ?  here below is my code snippet</p>
  <pre><code>public static void main(String[] args) throws InterruptedException {     
      int maxConnection = 100;                                             
      Set&lt;HostAndPort&gt; jedisClusterNodes = new HashSet&lt;HostAndPort&gt;();     
      jedisClusterNodes.add(new HostAndPort(&quot;192.168.0.36&quot;, 7000));        
      jedisClusterNodes.add(new HostAndPort(&quot;192.168.0.36&quot;, 7001));        
                                                                       
      Jedis j = null;                                                      
                                                                       
      JedisPoolConfig poolConfig = new JedisPoolConfig();                  
      poolConfig.setMaxTotal(100);                                         
      poolConfig.setMinIdle(2);                                            
      JedisCluster jc = new JedisCluster(jedisClusterNodes, poolConfig);   
                                                                       
      long start = System.currentTimeMillis();                             
                                                                       
      for (int i = 0; i &lt; maxConnection; i++) {                            
          RunIt rt = new RunIt(jedisClusterNodes, jc);                     
          Thread t = new Thread(rt);                                       
          t.setName(&quot;t&quot; + i);                                              
          t.start();                                                       
      }                                                                    
      long end = System.currentTimeMillis();                               
      long diff = end - start;                                             
      double secs = (double) (diff / 1000);                                
      Thread.currentThread().sleep(60000);                                 
      System.out.println(&quot;Main Program executed&quot;);    
  </code></pre>
  <p>}</p>
  <p>here below is my other class</p>
  <pre><code>public class RunIt implements Runnable{                                                                  
                                                                                                       
      Set&lt;HostAndPort&gt; jedisClusterNodes = null;                                                           
      JedisCluster jc = null;                                                                              
      static int conCount=0;                                                                               
      static long errCount =0;                                                                             
      public RunIt() {                                                                                     
      }                                                                                                    
      public RunIt(Set&lt;HostAndPort&gt; jedisClusterNodes , JedisClusterjc){                                  
          this.jedisClusterNodes = jedisClusterNodes;                                                      
          this.jc= jc;                                                                                     
      }                                                                                                    
                                                                                                       
      @Override                                                                                            
      public void run() {                                                                                  
          for(int i=0; i&lt; 1; i++){                                                                         
              connectToRedis(jedisClusterNodes,jc);                                                        
          }                                                                                                
          conCount++;                                                                                      
      }                                                                                                    
                                                                                                       
      private static void connectToRedis(Set&lt;HostAndPort&gt; jedisClusterNodes, JedisCluster jc){             
                                                                                                       
          try{                                                                                             
          jc.get(&quot;86ba15059795607378751a61eec9c&quot;);                                                         
          jc.get(&quot;ac64150607619266806e8be5abaf0&quot;);                                                         
          }catch (Exception e) {                                                                           
              e.printStackTrace();                                                                         
              errCount++;                                                                                  
              System.out.println(conCount+&quot;  --  &quot;+Thread.currentThread().getName()+&quot;  --  &quot;+errCount);    
              return;                                                                                      
          }                                                                                                
          System.out.println(&quot;Thread name : &quot;+Thread.currentThread().getName());                           
          //jd.close();                                                                                    
      }
  }                                                                                                 
                       
  </code></pre>
  <p>after that connect with redis using this command in my case : redis-cli -p 7000 -c</p>
  <p>and check the connection list using command : client list</p>