Re-index in ElasticSearch with zero downtime

0

Hi Everyone,

We use Elasticsearch 7.9, time to time we may need to do re-indexing. We are using aliases and the applications are pointing to alias instead of real index. I read some articles and it looks in most cases we would lose some update's/deletes that happen during the re-indexing process.

based on what I read, Below are the steps that I am planning to do.

Note : old_index is pointing to index-alias(it's alias name)

1- create new index(new_index) 2- do re-indexing from old_index to new_index 3- point the alias(index-alias) to new_index 4- Do second round of re-indexing from old_index to new_index

below are some of issues with this approach:

1- Two round of re-indexing needs to be done. This will become problematic, if we have large data in that index. 2- After step (3) , we may lose some of the deletes/updates on new_index.

What is the best method to do re-indexing with zero downtime and minimal impact for end-users?

Thanks in advance.

已提问 2 年前561 查看次数
1 回答
0

Does your data have any field to get the CDC like timestamp (for updated record) and id (for new record). If there is any field you can do the delta reindex on second iteration that will help speed up the second time reindex and will be way faster to sync the changes before you go live..

AWS
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则