Switching from index names to alias - performance impact?

We use Elasticsearch for time series data with indices created every day. We perform all operations (ingest, search etc) using the REST APIs. We keep 60-days worth of data available to query.

Currently, when we do search we specify the relevant indices in the GET call. Example when searching for data from Jan 01 to Jan 03, the GET call used is:

GET es-nodes:9200/my-index-20220101,my-index-20220102,my-index-20220103/_search

But we want to migrate to aliases and use those in search calls.
my-index alias pointing to index-pattern my-index-*

My concern is, instead of previously querying only 3 indices, we would be querying 60 indices, will that be worse for performance?

Thanks for any insight.

Welcome to our community! :smiley:

Elasticsearch will manage this efficiently for you when it goes to the indices under the alias. You might want to look at migrating entirely to ILMbtw :slight_smile:

Thank you, I have read through the ILM - nice addition indeed.
Currently, though I am stuck at an older version (5.5) and need to scale it before being able to upgrade.

But good to know that Elasticsearch will manage the aliases and routing the calls to relevant shards efficiently.

Ahh 5.5 is pretty old, it's EOL and no longer supported.
I don't remember what 5.X does for this sorry.

If I recall correctly the improvements and query rewriting was done in later releases, so using an alias pointing to all indices would most likely lead to worse performance or at least higher load on the cluster.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.