title: Solr AutoScaling - Add replicas on new nodes
body: <p>Using Solr version 7.3.1<br>
  Starting with 3 nodes:  </p>
  
  <p>I have created a collection like this:</p>
  
  <pre><code>wget "localhost:8983/solr/admin/collections?action=CREATE&amp;autoAddReplicas=true&amp;collection.configName=my_col_config&amp;maxShardsPerNode=1&amp;name=my_col&amp;numShards=1&amp;replicationFactor=3&amp;router.name=compositeId&amp;wt=json" -O /dev/null
  </code></pre>
  
  <p>In this way I have a replica on each node.</p>
  
  <p>GOAL:</p>
  
  <ul>
  <li>Each shard should add a replica to new nodes joining the cluster.</li>
  <li>When a node are shoot down. It should just go away.</li>
  <li>Only one replica for each shard on each node. </li>
  </ul>
  
  <p>I know that it should be possible with the new <a href="https://lucene.apache.org/solr/guide/7_2/solrcloud-autoscaling-overview.html#quick-start-automatically-adding-replicas" rel="noreferrer">AutoScalling API</a> but I am having a hard time finding the right syntax. The API is very new and all I can find is the documentation. Its not bad but I am missing some more examples. </p>
  
  <p>This is how its looks today. There are many small shard each with a replication factor that match the numbers of nodes. Right now there are 3 nodes.
  <a href="https://i.stack.imgur.com/Ya087.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Ya087.png" alt="enter image description here"></a></p>
  
  <p><a href="https://www.youtube.com/watch?v=D4bi8Pfc4Ts&amp;list=PLq-odUc2x7i8FAEwzj2LO8S3ztrw0T_uG&amp;index=12" rel="noreferrer">This video</a> was uploaded yesterday (2018-06-13) and around 30 min. into the video there is an example of the Solr.HttpTriggerListener that can be used to call any kind of service, for example an AWS Lamda to add new nodes.</p>
  
  <p><a href="https://i.stack.imgur.com/sUgfs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/sUgfs.png" alt="enter image description here"></a></p>