Default index shard allocation

I am trying to understand Elasticsearch default rules for shard allocation.
I have 6 nodes and created a test index with all default settings (5
shards, 1 replica). To my surprise, all 5 primary shards are collocated in
a single node (the node to which the creation request was sent -- not sure
if this is coincidence) while replicas are spread around. I realize this
configuration is contrived, but I would appreciate any help in
understanding why the primary shards are not being scattered.

My cluster and indexes all report healthy status. I have created other
indices with similar effects: even a 12-shard index seems very unevenly
distributed over the 6 nodes (some nodes only hold replicas). Is it
reasonable to expect a more even shard distribution without tweaking shard
allocations manually?

Thanks.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/abbefd82-579e-452a-8922-29dcb099cce6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Primary shards in elasticsearch don't really do much more work than
replicas. Elasticsearch doesn't worry too much about them but tries to
balance the total number of shards (including replicas) across all nodes.
You can fiddle with that using the allocation settings if you need to.
On Oct 23, 2014 9:20 PM, raidex.sym@gmail.com wrote:

I am trying to understand Elasticsearch default rules for shard
allocation. I have 6 nodes and created a test index with all default
settings (5 shards, 1 replica). To my surprise, all 5 primary shards are
collocated in a single node (the node to which the creation request was
sent -- not sure if this is coincidence) while replicas are spread around.
I realize this configuration is contrived, but I would appreciate any help
in understanding why the primary shards are not being scattered.

My cluster and indexes all report healthy status. I have created other
indices with similar effects: even a 12-shard index seems very unevenly
distributed over the 6 nodes (some nodes only hold replicas). Is it
reasonable to expect a more even shard distribution without tweaking shard
allocations manually?

Thanks.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/abbefd82-579e-452a-8922-29dcb099cce6%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/abbefd82-579e-452a-8922-29dcb099cce6%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAPmjWd38%2B0Zyn9hrWPecG6ifcLKYee%2B8k3g_LampExUscP0kcg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.