You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2013/02/23 02:40:12 UTC

[jira] [Commented] (SOLR-4492) Please add support for Collection API CREATE method to evenly distribute leader roles among instances

    [ https://issues.apache.org/jira/browse/SOLR-4492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13584936#comment-13584936 ] 

Hoss Man commented on SOLR-4492:
--------------------------------

poorly thought through suggestion from the peanut gallery...

* it seems like picking the leaders on collection creation should use the same algo as leader election when a leader goes down
* instead of picking leaders purely randomly, it seems like the leader election algo could be a lottery, with the number of tickets each node has inversely proportionate to the amount of "load" that node is handling
* "load" could be an generic numeric concept contributed by various things along the lines of "(num_local_shards + (17 * num_shards_we_are_leader_for) + $some_admin_configurable_property) * OperatingSystemMXBean.html.getAvailableProcessors() / OperatingSystemMXBean.html.getSystemLoadAverage()" 

(where "$some_admin_configurable_property" gives users the ability to say "this machine is N times beefier then that machine")
                
> Please add support for Collection API CREATE method to evenly distribute leader roles among instances
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-4492
>                 URL: https://issues.apache.org/jira/browse/SOLR-4492
>             Project: Solr
>          Issue Type: New Feature
>          Components: SolrCloud
>            Reporter: Tim Vaillancourt
>
> Currently in SolrCloud 4.1, a CREATE call to the Collection API will cause the server receiving the CREATE call to become the leader of all shards.
> I would like to ask for the ability for the CREATE call to evenly distribute the leader role across all instances, ie: if I create 3 shards over 3 SOLR 4.1 instances, each instance/node would only be the leader of 1 shard.
> This would be logically consistent with the way replicas are randomly distributed by this same call across instances/nodes.
> Currently, this CREATE call will cause the server receiving the call to become the leader of 3 shards.
> curl -v 'http://<HOST>:8983/solr/admin/collections?action=CREATE&name=test&numShards=3&replicationFactor=2&maxShardsPerNode=2'
> PS: Thank you SOLR developers for your contributions!
> Tim Vaillancourt

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org