title: Setting up Redis cluster dynamically with uneven number of master and slaves
body: <p>I want to set up 1 master and 2 slaves or 1 master and 1 slave for certain number of servers. So it will have 20 nodes and 45 instances. I'm wondering how I can set it up so that it's like this:</p>
  
  <pre><code>"127.0.0.1",|1M2S|port 40000~40002  e.g. 127.0.0.1:4000(master), 127.0.0.1:4001(slave)127.0.0.1:4002(slave)
  "127.0.0.2",|1M2S|port 40000~40002
  "127.0.0.3",|1M2S|port 40000~40002
  "127.0.0.4",|1M2S|port 40000~40002
  "127.0.0.5",|1M2S|port 40000~40002
  "127.0.0.6",|1M1S|port 40000~40001
  "127.0.0.7",|1M1S|port 40000~40001
  "127.0.0.8",|1M1S|port 40000~40001
  "127.0.0.9",|1M1S|port 40000~40001
  "127.0.1.0",|1M1S|port 40000~40001
  </code></pre>
  
  <p>I also want the slaves distributed across servers. I belive this --replicas will automatically try to distribute the slaves so that the master and slaves are not on the same server/IPadress.      </p>
  
  <pre><code>./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 \ 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005
  </code></pre>
  
  <p>But that only works if there are even number of slaves and masters. How do I make it so it will put 2 slaves on server 1~5?
  I also have to set up another cluster that has <code>8M11S|40700~40718</code> so I would like to know if there is a way of distributing these simply as opposed to manually getting the ID's of master from a different server and adding a slave.</p>