Skip to content

Advanced Search: Estimate the number of shards for every index

Currently we have rake gitlab:elastic:estimate_cluster_size rake task for estimating the cluster size. I believe we should extend this command or create a new one for estimating the number of shards for each index.

We have a comprehensive guidance for choosing the number of shards in https://docs.gitlab.com/ee/integration/elasticsearch.html#guidance-on-choosing-optimal-cluster-configuration, but I think we should automate that. It should be pretty simple for document types, and for the main index we can use some kind of ratio of cluster size to number of documents using GitLab.com data.

@john-mason @changzhengliu WDYT?

Edited by 🤖 GitLab Bot 🤖