They should be pretty well distributed by default, but if you want to take manual control, you can use the createNodeSet param on CREATE (with replication factor of 1) and then ADDREPLICA with the node param to put replicas for shards exactly where you want.
Best, Erick On Wed, Nov 5, 2014 at 2:12 PM, CTO직속IsabellePhan <ip...@coupang.com> wrote: > Hello, > > I am testing a small SolrCloud cluster on 2 servers. I started 2 nodes on > each server, so that each collection can have 2 shards with replication > factor of 2. > > I am using below command from Collections API to create collection: > > curl ' > http://serveraddress/solr/admin/collections?action=CREATE&name=cp_collection&numShards=2&replicationFactor=2&collection.configName=cp_config > ' > > Is there a way to ensure that for each shard, leader and replica are on a > different server? > This command sometimes put them on 2 nodes from the same server. > > > Thanks a lot for your help, > > Isabelle