zalando-incubator / es-operator

Kubernetes Operator for Elasticsearch
353 stars 46 forks source link

Calculate and set total_shards_per_node per index #372

Open otrosien opened 11 months ago

otrosien commented 11 months ago

Expected Behavior

When scaling out we want to achieve that the indexes allocated on an EDS should be spread out across the nodes as good as possible, which can be achieved by setting index.routing.allocation.total_shards_per_node to the total number of shards of an index divided by the number of nodes (rounded up). This ensures that we avoid CPU skew in case only one index has high load. And when scaling down we need to revert this setting again accordingly.

Actual Behavior

es-operator doesn't know about this property.