Settings in question: cluster.routing.allocation.total_shards_per_node index.routing.allocation.total_shards_per_node
Actual Question:
Lets say I have multiple indices and I set index.routing.allocation.total_shards_per_node to 5.
Does that block other indices from having shards on the node?
Scenario: Index A has index.routing.allocation.total_shards_per_node: 5 Index B has index.routing.allocation.total_shards_per_node: 5
If Node 1 has 5 shards from index A on it can it accept any from index B?
should work, but this is one of the classic examples, where quick testing beats guessing.
You can easily test this, using the following snippet and tweaking the values
DELETE _all
PUT _cluster/settings
{
"transient": {
"cluster.routing.allocation.total_shards_per_node" : 1
}
}
PUT a
{
"settings": {
"index.routing.allocation.total_shards_per_node" : 1,
"number_of_shards": 2
}
}
PUT b
{
"settings": {
"index.routing.allocation.total_shards_per_node" : 1,
"number_of_shards": 2
}
}
# this will show if the shards have been assigned or not
GET _cat/shards
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.