I've had a bad enough experience with the default shard placement that I create a collection with one shard, add the shards where I want them, then use add/delete replica to move the first one to the right machine/port.
Typically this is in a SolrCloud of dozens or hundreds of shards. Our shards are all partitioned by time so there are big performance advantages to optimal placement across JVMs and machines. What sort of situation do you not have trouble with default shard placement? On Wed, Nov 5, 2014 at 5:10 PM, Erick Erickson <erickerick...@gmail.com> wrote: > 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