一种分片数动态调整方法、装置、设备及介质

By periodically monitoring historical data volume in Elasticsearch daily and dynamically adjusting the number of shards, the cluster downtime issue caused by improper default shard settings was resolved, achieving reasonable sharding and ensuring cluster stability and effective data ingestion.

CN115658689BActive Publication Date: 2026-07-17HANGZHOU DBAPPSECURITY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU DBAPPSECURITY CO LTD
Filing Date
2022-10-21
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

In a big data environment, improper default sharding settings for Elasticsearch indexes can lead to disk overload or excessive JVM usage, causing cluster downtime, affecting data querying and aggregation, and even causing cluster crashes.

Method used

By regularly checking the historical data volume every day, the target index and target number of days are determined, the number of shards is dynamically adjusted, the expected number of shards is calculated based on the target number of days and data volume, the target number of shards is set in combination with the number of nodes, and the number of shards is adjusted in real time to achieve reasonable sharding.

Benefits of technology

This effectively avoids wasting sharding resources, prevents excessive index creation during rolling, achieves reasonable sharding, and ensures stable operation of the Elasticsearch cluster and normal data ingestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658689B_ABST
    Figure CN115658689B_ABST
Patent Text Reader

Abstract

本申请公开了一种分片数动态调整方法、装置、设备及介质,涉及计算机技术领域,该方法包括:每天定时检测历史数据量;基于历史数据量确定出满足预设条件的目标索引,并确定按天划分的目标索引对应的目标天数;根据不同目标天数选择直接将节点数设置为目标分片数,或,选择基于不同目标天数获取不同天数的目标数据量,并基于目标数据量计算预期分片数,然后根据预期分片数与节点数的数量关系设置目标分片数。由此可见,本申请按天分索引减少数据量,并根据目标索引的目标天数和目标数据量实时调整分片数,以达到确定合理分片数以进行合理分片的目的。
Need to check novelty before this filing date? Find Prior Art