Rebalancing a cluster

I have a cluster with one index which is much more heavily used than the
rest. My problem is keeping the busy index distributed across all nodes.
For example, do to recent changes in the the cluster, I now have 1 node
with 80 percent of the hot primary shards, and two nodes doing almost
nothing.

I been using "i.r.a.include.name" to force elasticsearch to move shards
around, but since it always wants to evenly distribute the number of
shards, the load often ends up skewed. This can work, but it take a few
pushes to get the shards to fall nicely, and isn't a maintainable solution
(also if anyone knows how to unset an index setting, I'd like to get rid
of the "index.routing.allocation" settings when I'm done, so they don't
need to be updated if the cluster gets resized).

So, is there a better way to balance a cluster?
Should I just double or tripple the shard count, so they're more likely to
get evenly distributed?

Thanks,
-jim

--

Did you find any solution for this?

On Thursday, August 23, 2012 1:21:03 AM UTC+4, James Bardin wrote:

I have a cluster with one index which is much more heavily used than the
rest. My problem is keeping the busy index distributed across all nodes.
For example, do to recent changes in the the cluster, I now have 1 node
with 80 percent of the hot primary shards, and two nodes doing almost
nothing.

I been using "i.r.a.include.name" to force elasticsearch to move shards
around, but since it always wants to evenly distribute the number of
shards, the load often ends up skewed. This can work, but it take a few
pushes to get the shards to fall nicely, and isn't a maintainable solution
(also if anyone knows how to unset an index setting, I'd like to get rid
of the "index.routing.allocation" settings when I'm done, so they don't
need to be updated if the cluster gets resized).

So, is there a better way to balance a cluster?
Should I just double or tripple the shard count, so they're more likely to
get evenly distributed?

Thanks,
-jim

--

Hi,

Maybe you can set "index.routing.allocation.total_shards_per_node" for that
nasty index.

Regards,
Ferhat

On Thursday, August 23, 2012 12:21:03 AM UTC+3, James Bardin wrote:

I have a cluster with one index which is much more heavily used than the
rest. My problem is keeping the busy index distributed across all nodes.
For example, do to recent changes in the the cluster, I now have 1 node
with 80 percent of the hot primary shards, and two nodes doing almost
nothing.

I been using "i.r.a.include.name" to force elasticsearch to move shards
around, but since it always wants to evenly distribute the number of
shards, the load often ends up skewed. This can work, but it take a few
pushes to get the shards to fall nicely, and isn't a maintainable solution
(also if anyone knows how to unset an index setting, I'd like to get rid
of the "index.routing.allocation" settings when I'm done, so they don't
need to be updated if the cluster gets resized).

So, is there a better way to balance a cluster?
Should I just double or tripple the shard count, so they're more likely to
get evenly distributed?

Thanks,
-jim

--

Oh, very nice.

On Wed, Jan 16, 2013 at 5:56 PM, ferhatsb ferhat.sobay@gmail.com wrote:

Hi,

Maybe you can set "index.routing.allocation.total_shards_per_node" for
that nasty index.
Elasticsearch Platform — Find real-time answers at scale | Elastic

Regards,
Ferhat

On Thursday, August 23, 2012 12:21:03 AM UTC+3, James Bardin wrote:

I have a cluster with one index which is much more heavily used than the
rest. My problem is keeping the busy index distributed across all nodes.
For example, do to recent changes in the the cluster, I now have 1 node
with 80 percent of the hot primary shards, and two nodes doing almost
nothing.

I been using "i.r.a.include.name" to force elasticsearch to move shards
around, but since it always wants to evenly distribute the number of
shards, the load often ends up skewed. This can work, but it take a few
pushes to get the shards to fall nicely, and isn't a maintainable solution
(also if anyone knows how to unset an index setting, I'd like to get rid
of the "index.routing.allocation" settings when I'm done, so they don't
need to be updated if the cluster gets resized).

So, is there a better way to balance a cluster?
Should I just double or tripple the shard count, so they're more likely
to get evenly distributed?

Thanks,
-jim

--

--

On Wed, Jan 16, 2013 at 8:56 AM, ferhatsb ferhat.sobay@gmail.com wrote:

Maybe you can set "index.routing.allocation.total_shards_per_node" for
that nasty index.
Elasticsearch Platform — Find real-time answers at scale | Elastic

I wish the elasticsearch docs tagged features in the docs with their
release. I don't think this was in the stable version when I first asked,
but I'm not sure now.

I ended up having to schedule a full cluster shutdown to clear this up.
Also, last time I checked, there still is no way to remove index settings
without restarting, but many of them now treat an empty string as if it
were unset.

-jim

--

If you're not sure, search google/github will typically bring you to the
issue that added the feature:

Not ideal, but it works.

On Wednesday, January 16, 2013 9:19:47 AM UTC-7, James Bardin wrote:

On Wed, Jan 16, 2013 at 8:56 AM, ferhatsb <ferhat...@gmail.com<javascript:>

wrote:

Maybe you can set "index.routing.allocation.total_shards_per_node" for
that nasty index.
Elasticsearch Platform — Find real-time answers at scale | Elastic

I wish the elasticsearch docs tagged features in the docs with their
release. I don't think this was in the stable version when I first asked,
but I'm not sure now.

I ended up having to schedule a full cluster shutdown to clear this up.
Also, last time I checked, there still is no way to remove index settings
without restarting, but many of them now treat an empty string as if it
were unset.

-jim

--